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.
General
Where does the name “Haiqu” come from?
Where does the name “Haiqu” come from?
What is Haiqu SDK and who is it for?
What is Haiqu SDK and who is it for?
- Quantum researchers and engineers who want to push the limits of what runs on real QPUs today
- Enterprise teams exploring quantum advantage in optimization, simulation, machine learning, and finance
- Applied scientists who want reproducible, tracked quantum experiments without building their own infrastructure
Do I need a quantum computing background to use Haiqu SDK?
Do I need a quantum computing background to use Haiqu SDK?
QuantumCircuit, you can use Haiqu SDK. The hardest parts of running on real quantum hardware — optimizing transpilation, compressing a circuit, and applying error mitigation — are handled automatically by the SDK.If you are starting from scratch, the Quick Start gets you from zero to a running circuit, including error mitigation, with fewer than ten lines of code.Which quantum frameworks does Haiqu SDK support?
Which quantum frameworks does Haiqu SDK support?
QuantumCircuit objects. All core features — haiqu.run(), haiqu.state_compression(), haiqu.transpile(), and data loading — expect Qiskit circuits as input.Does Haiqu SDK give me access to quantum hardware, or do I need my own?
Does Haiqu SDK give me access to quantum hardware, or do I need my own?
- IBM Quantum: an IBM Quantum account and API token
- AWS Braket: AWS IAM credentials with Braket permissions
- IonQ Cloud: an IonQ Cloud API key
aer_simulator, fake_fez, fake_torino, and other fake_* backends) work out of the box with no external credentials and are the best place to start.Getting Started & Installation
What is the fastest way to get started?
What is the fastest way to get started?
Authentication & API Keys
How do I authenticate with Haiqu SDK?
How do I authenticate with Haiqu SDK?
haiqu.login() at the start of every session:I'm getting an authentication error even though I'm using the correct API key. What's wrong?
I'm getting an authentication error even though I'm using the correct API key. What's wrong?
- Trailing whitespace — copy-pasting an API key from an email or PDF often includes an invisible space or newline at the end. Try
api_access_key=key.strip(). - Wrong token — using the GitHub install token instead of the Haiqu API key (see the installation FAQ above).
- Expired or revoked key — keys can be rotated. Check the Dashboard or contact support at feedback.haiqu.ai to request a new key.
Do I need separate credentials for IBM Quantum or AWS Braket?
Do I need separate credentials for IBM Quantum or AWS Braket?
| Layer | What it does | Where it comes from |
|---|---|---|
| Haiqu API key | Authenticates you to the Haiqu platform | Your Haiqu welcome email |
| IBM / AWS / IonQ credentials | Authorizes QPU job submission to the hardware provider | Your IBM Quantum, AWS, or IonQ account |
How do I avoid entering my IBM or AWS credentials on every run?
How do I avoid entering my IBM or AWS credentials on every run?
options dict from haiqu.run() entirely — the SDK reads the stored credentials automatically.ionq_api_key directly in the options dict on each run — there is no persistent save helper for IonQ credentials at this time.Running Circuits
Why should I use haiqu.run() instead of submitting directly to IBM or AWS?
Why should I use haiqu.run() instead of submitting directly to IBM or AWS?
haiqu.run() wraps execution with:- Automatic transpilation to the target device’s gate set and qubit connectivity
- Optional error mitigation (
use_mitigation=True) to reduce the effect of hardware noise - Experiment tracking — every circuit and job is saved to your experiment history
- A unified interface across IBM, AWS, and IonQ — the same call works regardless of hardware provider
What is the difference between device_id and device?
What is the difference between device_id and device?
haiqu.run() — they are two ways to specify the same thing:device_id for quick one-liners. Use device when you want to inspect backend properties or reuse the same device object across multiple runs.What simulators can I use without hardware credentials?
What simulators can I use without hardware credentials?
| Backend | What it simulates |
|---|---|
aer_simulator | Ideal noiseless simulation |
fake_fez | IBM Fez noise model |
fake_torino | IBM Torino noise model |
other fake_* backends | Various IBM device noise models |
Does Haiqu SDK handle transpilation automatically when I call haiqu.run()?
Does Haiqu SDK handle transpilation automatically when I call haiqu.run()?
haiqu.run(). The SDK automatically transpiles to the target device’s native gate set and qubit connectivity.Call haiqu.transpile() explicitly only when you want to inspect the transpiled circuit or compare transpilation strategies:My job is stuck in a pending/queued state. What should I do?
My job is stuck in a pending/queued state. What should I do?
- Real QPUs (IBM, AWS, IonQ): queue times are controlled by the hardware provider and can range from minutes to hours depending on demand. This is outside Haiqu’s control. Use
job.progress()orjob.retrieve_status()to monitor without blocking your session. - Simulators: jobs should complete in seconds. If a simulator job is stuck, check your credit balance in the Dashboard and contact support at feedback.haiqu.ai if the issue persists.
How do I retrieve results from a job I ran in a previous session?
How do I retrieve results from a job I ran in a previous session?
haiqu.list_jobs(circuit=circuit_id).Circuit Compression
What does state_compression actually do to my circuit?
What does state_compression actually do to my circuit?
state_compression produces a shallower approximate circuit that acts on the all-zero input state in a way that closely mimics your original circuit. It is not lossless — the approximation quality is reported by job.quality after the job completes.The key insight is that on noisy hardware, a shallower approximate circuit often produces better results than the exact deep circuit. Fewer gates means less accumulated noise, which more than compensates for the approximation error. Haiqu’s compression is designed with this trade-off in mind: it actively uses the device’s noise profile to optimize for real-hardware performance, not just ideal-device fidelity.When should I use compression, and when should I skip it?
When should I use compression, and when should I skip it?
- Your circuit is deep (many two-qubit gates) and hardware noise is limiting your results
- You are targeting a real QPU and want to maximize the signal-to-noise ratio
- You want to run circuits that would otherwise be too deep to produce meaningful results
- Your circuit is already shallow — the approximation overhead is not worth the gain
- Your circuit uses mid-circuit measurements with classical feedforward logic (compression applies only to the portion before the first MCM)
- You are prototyping on a noiseless simulator — compression serves no purpose there
How do I choose the right compression_level?
How do I choose the right compression_level?
"balanced") and adjust based on your circuit depth and job.quality score:| Level | Best for |
|---|---|
"low" | Already-shallow circuits; very clean hardware; maximum fidelity preservation |
"balanced" | Default; best performance across most circuits and noise levels |
"high" | Very deep circuits where "balanced" does not reduce depth enough |
fine_tuning parameter also affects quality vs. speed:| Fine-tuning | When to use |
|---|---|
"disabled" | Fastest; good for rapid iteration |
"low" | Default; best balance of speed and accuracy |
"heavy" | Best accuracy; use for final production runs |
Which noise_profile should I set?
Which noise_profile should I set?
noise_profile to match the QPU device you plan to execute on. If they do not match, the compression is tuned for the wrong noise characteristics and you leave performance on the table.| Profile | Device family |
|---|---|
"ibm_eagle_r3" | IBM Eagle (e.g. ibm_brisbane) |
"ibm_heron_r1" | IBM Heron R1 |
"ibm_heron_r2" | IBM Heron R2 — default |
"ibm_heron_r3" | IBM Heron R3 |
"iqm_garnet" | IQM Garnet (via AWS Braket) |
"iqm_emerald" | IQM Emerald (via AWS Braket) |
Does compression work with mid-circuit measurements?
Does compression work with mid-circuit measurements?
How long does compression take, and can I run it in the background?
How long does compression take, and can I run it in the background?
state_compression is asynchronous — it submits a job and returns immediately. You can do other work while it runs and call job.result() when you need the output.At 100 qubits, approximate runtimes are:| Fine-tuning | Typical runtime |
|---|---|
"disabled" | 30 seconds |
"low" (default) | Up to 5 minutes |
"heavy" | Up to 15 minutes |
"disabled" or "low" during development and "heavy" for final runs.Error Mitigation
What does use_mitigation=True do under the hood?
What does use_mitigation=True do under the hood?
Is error mitigation always beneficial? Should I always set use_mitigation=True?
Is error mitigation always beneficial? Should I always set use_mitigation=True?
- Running on real QPUs where hardware noise is significant
- Your circuits are moderately deep (more 2Q gates = more noise = more mitigation benefit)
- Using simulators (
aer_simulator,fake_*) — there is no real noise to mitigate - Rapid prototyping and debugging — the overhead increases latency without benefit
- Your circuit is very shallow and the hardware noise floor is already low
Should I combine compression and error mitigation?
Should I combine compression and error mitigation?
- Compress the circuit with
haiqu.state_compression(), using thenoise_profilethat matches your target device - Run the compressed circuit with
haiqu.run(..., use_mitigation=True)
Transpilation
Do I need to transpile my circuit before calling haiqu.run()?
Do I need to transpile my circuit before calling haiqu.run()?
haiqu.run() transpiles automatically to the target device’s native gate set and qubit connectivity.Call haiqu.transpile() explicitly only when you want to:- Inspect the transpiled circuit before execution
- Compare the effect of different transpilation parameters (optimization level, layout)
What transpiler does Haiqu use?
What transpiler does Haiqu use?
How do I compare different transpilation strategies?
How do I compare different transpilation strategies?
haiqu.compare_metrics() to view depth, gate count, and other metrics side by side:Should I transpile before or after compression?
Should I transpile before or after compression?
state_compression— pass the un-transpiled circuit (or one with minimal transpilation). The compression algorithm prefers linear-connectivity input and handles device adaptation internally as part of the compression process.After compression, call haiqu.run() as usual. It will apply the final transpilation to your target device automatically.state_compression_2d — also pass the un-transpiled circuit. However, the function will output a transpiled circuit.Experiment Tracking
Do I have to call haiqu.init() before running circuits?
Do I have to call haiqu.init() before running circuits?
haiqu.init() with a descriptive name at the start of your session is strongly recommended. Experiments accumulate quickly, and without meaningful names it becomes difficult to find specific jobs in the Dashboard or via haiqu.list_jobs() later.What is the difference between haiqu.log() and haiqu.run()?
What is the difference between haiqu.log() and haiqu.run()?
haiqu.log() | haiqu.run() | |
|---|---|---|
| Executes the circuit | No | Yes |
| Saves to experiment history | Yes | Yes (automatically) |
| Returns | A tracked circuit object | A job object |
haiqu.log() when you want to register a circuit for tracking, analysis, or future reference without running it yet. In most workflows you can skip haiqu.log() entirely — haiqu.run() saves the circuit automatically.I ran a long experiment and closed my notebook. How do I get my results back?
I ran a long experiment and closed my notebook. How do I get my results back?
How do I share experiment results with my team?
How do I share experiment results with my team?
Hardware Integrations
How do I connect Haiqu SDK to my IBM Quantum account?
How do I connect Haiqu SDK to my IBM Quantum account?
How do I use AWS Braket hardware through Haiqu SDK?
How do I use AWS Braket hardware through Haiqu SDK?
device_id, for example "aws_ionq_aria_1". See the AWS Braket integration page for details.Can I use IonQ hardware?
Can I use IonQ hardware?
options dict:save_ionq_credentials() helper — you need to include ionq_api_key in options for each run.I have access to a QPU backend not listed in the docs. Can I still use it?
I have access to a QPU backend not listed in the docs. Can I still use it?
Credits & Pricing
What counts toward my early access credits?
What counts toward my early access credits?
How do I check my remaining credit balance?
How do I check my remaining credit balance?
What happens when I run out of credits?
What happens when I run out of credits?
Troubleshooting
I'm getting an ImportError when importing haiqu. What should I do?
I'm getting an ImportError when importing haiqu. What should I do?
- Is the right conda environment active?
- Is the Python version 3.10?
- Is the Haiqu SDK version updated?
- Did the installation complete successfully? Re-run the install command and confirm the final line reads
Successfully installed haiqu-sdk-x.y.z. - Is there a conflicting Qiskit version? Run
pip show qiskitand compare against the version installed by Haiqu SDK. Mixed-version environments are a frequent source of import errors.
The documentation seems to be out of sync with the SDK. What do I do?
The documentation seems to be out of sync with the SDK. What do I do?
My circuit results look wrong or significantly worse than expected on a real QPU.
My circuit results look wrong or significantly worse than expected on a real QPU.
- Enable error mitigation: is
use_mitigation=Trueset inhaiqu.run()? - Check circuit depth: very deep circuits degrade even with mitigation. Try
haiqu.state_compression()first and verify thejob.qualityscore. - Match the noise profile: if using compression, confirm
noise_profilematches your target device (see the compression FAQ above). - Run a simulator baseline: execute the same circuit on
aer_simulatorand compare. If the ideal simulator result also looks wrong, the issue is in the circuit logic, not hardware noise. - Check shot count: too few shots lead to high statistical variance. For distributions, try at least 1000 shots; for observables, 2000+ with mitigation.
haiqu.run() returns immediately but job.result() hangs. What is happening?
haiqu.run() returns immediately but job.result() hangs. What is happening?
haiqu.run() is non-blocking — it submits the job and returns a job handle right away. job.result() is blocking — it waits until the job is complete before returning.On real QPUs, jobs can sit in provider queues for minutes to hours. To track the progress of your job:Where do I report a bug or request a feature?
Where do I report a bug or request a feature?
- Haiqu SDK version (
pip show haiqu-sdk) - Python version (
python --version) - All relevant IDs (experiment, circuit, job, etc.)
- A minimal code snippet that reproduces the issue
- The full error message and traceback
I'm not finding an answer here. Where else can I look?
I'm not finding an answer here. Where else can I look?
- SDK Reference — full API documentation for every function and parameter
- API Reference — REST API documentation
- Cookbook — end-to-end code examples for real use cases (LR-QAOA, quantum dynamics, and more)
- Benchmarks — performance data and specifications across hardware platforms
- Support — direct contact with the Haiqu team