> ## Documentation Index
> Fetch the complete documentation index at: https://docs.haiqu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Started

> Get up and running with Haiqu SDK

<Steps>
  <Step title="Get Your API Key">
    To request access, please complete the contact form on our website: <br />[https://haiqu.ai/contactform](https://haiqu.ai/contactform)

    After submitting the form, our team will review your request and contact you with next steps. If approved

    <Check>
      You'll receive an email with your API key and access instructions.
    </Check>
  </Step>

  <Step title="Access JupyterLab Environment">
    Launch your pre-configured quantum development environment with everything set up.

    <Info>
      No installation required! Everything is pre-configured in your cloud environment.
    </Info>
  </Step>

  <Step title="Authenticate and Initialize">
    Log in and start your first experiment.

    ```python theme={null}
    from haiqu.sdk import haiqu
      
    # Login with your API key
    haiqu.login()
      
    # Initialize your first experiment
    haiqu.init("My First Quantum Experiment")
    ```

    <Check>
      You're now ready to build quantum applications!
    </Check>
  </Step>

  <Step title="Create and Run Your First Quantum Circuit">
    Build and execute a simple quantum circuit with error mitigation.

    ```python theme={null}
    from qiskit import QuantumCircuit

    # Create a simple Bell state circuit 
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0, 1)
    qc.measure_all()
      
    # Execute with built-in error mitigation
    job = haiqu.run(qc, shots=1000, device_id="fake_fez", use_mitigation=True)
    results = job.result()

    print(f"Execution results:", results)
      
    print(f"Circuit executed successfully!")
    ```

    <Check>
      Congratulations! You've executed your first quantum circuit with Haiqu SDK.
    </Check>
  </Step>
</Steps>

## AI agents

If you drive the Haiqu SDK from an AI coding assistant (Claude Code, Cursor, Copilot, or any agent that reads repository context), point it at the bundled **agent orientation**. It is a compact, task-focused brief that teaches an agent the canonical login → `init` → build → transpile → run workflow, the import that actually works (`from haiqu.sdk import haiqu` — plain `import haiqu` resolves to an empty namespace package), and the traps that local Qiskit intuition gets wrong (for example, that every `device_id` dispatches to the cloud, that data-loading results are opaque `HaiquCircuitGate` handles, and that `run(...).result()` returns probability distributions rather than integer counts).

The orientation is installed alongside the package at `haiqu/sdk/AGENTS.md` and is also published at [https://github.com/haiqu-ai/haiqu-sdk/blob/main/haiqu/sdk/AGENTS.md](https://github.com/haiqu-ai/haiqu-sdk/blob/main/haiqu/sdk/AGENTS.md).

Most agents automatically discover an `AGENTS.md`file. To load it explicitly, feed this prompt to your AI agent:

```python theme={null}
# Load Haiqu SDK AGENTS.MD into context
 from importlib.resources import files
 orientation = files("haiqu.sdk").joinpath("AGENTS.md").read_text()
```

Keeping the orientation in the agent's context measurably reduces the most common failure modes — attempts at local execution, calling `qc.depth()` on opaque cloud gates, or expecting shot counts from `result()`.
