Quantinuum Emulators
Running circuits on Quantinuum's NEXUS-hosted H1 and H2 emulators through the QbraidProvider, with a qBraid API key and no NEXUS account.
Device IDs: quantinuum:quantinuum:sim:h1-1le, h2-1le, h1-emulator, h2-emulator
· trapped ions · mid-circuit measurement and reset · free to
run · accessed through QbraidProvider
Using your own Quantinuum Nexus account? See Quantinuum (self-managed).
Access is limited. The Quantinuum devices on qBraid aren’t open to every account; they are enabled for selected users and projects. If you have a research project that needs a Quantinuum device, contact us at contact@qbraid.com. Anyone with their own Quantinuum Nexus account can use the self-managed route instead.
Devices on qBraid
Quantinuum’s System Model H1 and H2 are trapped-ion quantum computers, with all-to-all qubit connectivity and native measurement and reset partway through a circuit. qBraid gives you four of Quantinuum’s NEXUS-hosted emulators of those machines:
| Device ID | Qubits | Noise |
|---|---|---|
quantinuum:quantinuum:sim:h1-1le | 20 | None (ideal statevector) |
quantinuum:quantinuum:sim:h2-1le | 26 | None (ideal statevector) |
quantinuum:quantinuum:sim:h1-emulator | 20 | H1 hardware noise model |
quantinuum:quantinuum:sim:h2-emulator | 26 | H2 hardware noise model |
The LE targets are noiseless, which makes them the place to check that a circuit is correct. The Emulator targets add Quantinuum’s model of the real device’s gate, measurement, state-preparation, and idling errors, so they show what a circuit would look like on hardware.
These emulators currently cost 0 credits to run. With access enabled, you need only a qBraid API key, with no Quantinuum or NEXUS account. See Pricing.
Quick start
from qbraid.runtime import QbraidProvider
from qiskit import QuantumCircuit
provider = QbraidProvider()
device = provider.get_device("quantinuum:quantinuum:sim:h2-1le")
circuit = QuantumCircuit(3)
circuit.h(0)
circuit.cx(0, 1)
circuit.cx(1, 2)
circuit.measure_all()
job = device.run(circuit, shots=200)
job.wait_for_final_state(timeout=600)
print(job.result().data.get_counts())
# {'000': 88, '111': 112}The device takes OpenQASM 2, and qBraid transpiles to it for you, so a Qiskit, Cirq, Braket,
pyQuil, or pytket circuit can go straight to run().
Every NEXUS job is uploaded, compiled, and then executed, so even a tiny circuit usually takes 1
to 4 minutes from submission to result. Pass a timeout to wait_for_final_state() rather
than blocking indefinitely.
What actually ran
NEXUS compiles every circuit into the trapped-ion native gate set: single-qubit rotations U1q
and rz, and a two-qubit RZZ interaction. compiled_program() returns the program that was
really executed, as OpenQASM 2 in Quantinuum’s hqslib1 dialect:
compiled = job.compiled_program()
print(compiled.format) # qasm2
print(compiled.data)OPENQASM 2.0;
include "hqslib1.inc";
qreg q[3];
creg meas[3];
U1q(3.5*pi,0.5*pi) q[0];
U1q(0.5*pi,0.5*pi) q[1];
U1q(0.5*pi,0.5*pi) q[2];
RZZ(0.5*pi) q[0],q[1];
rz(3.5*pi) q[0];
U1q(2.5*pi,0.0*pi) q[1];
RZZ(0.5*pi) q[1],q[2];
U1q(0.5*pi,0.0*pi) q[2];
rz(1.5*pi) q[2];
barrier q[0],q[1],q[2];
measure q[0] -> meas[0];
measure q[1] -> meas[1];
measure q[2] -> meas[2];The two CX gates became two RZZ gates plus single-qubit rotations around them.
Runtime options
The Quantinuum emulators support one runtime option, passed as a dict through
runtime_options:
job = device.run(circuit, shots=200, runtime_options={"optimisation_level": 2})| Option | Type | Default | Effect |
|---|---|---|---|
optimisation_level | int | 1 | How hard the NEXUS compiler works to simplify the circuit, from 0 (rebase to native gates only) to 3. |
There is no seed. Any key in runtime_options other than optimisation_level is ignored
without an error, so sampling is never reproducible across jobs. Note the British spelling:
optimization_level is one of the ignored keys.
Choosing an optimisation level
A circuit with a lot of redundancy (two Hadamards, two CX gates, and two RZ rotations that all
cancel) leaves just a Bell pair. Compiled at each level:
redundant = QuantumCircuit(2)
redundant.h(0)
redundant.h(0)
redundant.cx(0, 1)
redundant.cx(0, 1)
redundant.rz(0.3, 1)
redundant.rz(-0.3, 1)
redundant.h(0)
redundant.cx(0, 1)
redundant.measure_all()
for level in (0, 1, 2):
job = device.run(redundant, shots=200, runtime_options={"optimisation_level": level})
job.wait_for_final_state(timeout=600)
print(level, job.compiled_program().data.count("RZZ"), job.result().data.get_counts())
# 0 3 {'00': 98, '11': 102}
# 1 2 {'00': 95, '11': 105}
# 2 1 {'00': 94, '11': 106}The answer is the same at every level, because the LE emulator is noiseless. The difference is in the compiled program: level 0 keeps all three two-qubit gates, and level 2 cuts them to the one the Bell pair needs. On noisy targets and on hardware that matters, because two-qubit gates are the main source of error, and fewer of them gives cleaner results.
An out-of-range level fails the job before anything runs. The reason is on the job’s status:
job = device.run(redundant, shots=10, runtime_options={"optimisation_level": 5})
job.wait_for_final_state(timeout=600)
print(job.status().status_message)
# Failed to create resource with status code: 422, message: {"detail":[{"type":"less_than", … "optimisation_level"], …Noiseless vs. noisy
An 8-qubit GHZ state should only ever read all zeros or all ones. On the noiseless target it does; on the noisy one a few shots leak into other bitstrings:
| Device | Shots in 00000000 or 11111111 |
|---|---|
h2-1le | 100.0% |
h2-emulator | 99.0% |
Develop and debug on an LE target, then check on the matching Emulator target how the circuit holds up under realistic noise.
Mid-circuit measurement and reset
Qubits can be measured and reset partway through a circuit, then reused. Here qubit 0 is flipped to 1, measured, reset, and reused to build a Bell pair with qubit 1:
from qiskit import ClassicalRegister, QuantumRegister
qubits = QuantumRegister(2, "q")
bits = ClassicalRegister(3, "c")
reuse = QuantumCircuit(qubits, bits)
reuse.x(0)
reuse.measure(0, 0) # always 1
reuse.reset(0)
reuse.h(0)
reuse.cx(0, 1)
reuse.measure(0, 1)
reuse.measure(1, 2)
device.run(reuse, shots=200).result().data.get_counts()
# {'001': 103, '111': 97}The first measurement (rightmost bit) is always 1, and the Bell pair after the reset gives 00
or 11 on the other two bits.
Gates can also be conditioned on a measurement result. Here qubit 1 is flipped only when qubit 0 was measured as 1, so the two always agree:
qubits = QuantumRegister(2, "q")
mid = ClassicalRegister(1, "m")
final = ClassicalRegister(2, "c")
feed_forward = QuantumCircuit(qubits, mid, final)
feed_forward.h(0)
feed_forward.measure(0, mid[0])
with feed_forward.if_test((mid, 1)):
feed_forward.x(1)
feed_forward.measure(qubits, final)
device.run(feed_forward, shots=20).result().data.get_counts()
# {'000': 9, '111': 11}QASM 2’s if (m == 1) x q[1]; works the same way.
Reading the results
Results come back at your circuit’s own width, and qubit ordering is little-endian: qubit 0 is the rightmost bit.
qc = QuantumCircuit(3)
qc.x(0)
qc.measure_all()
device.run(qc, shots=50).result().data.get_counts()
# {'001': 50}
# ^ qubit 0Running several circuits
The Quantinuum emulators don’t support
batch jobs
(device.profile.batch_job_support is False), so as_batch=True is rejected before anything is
submitted:
device.run([circuit_a, circuit_b], shots=100, as_batch=True)
# ValueError: Batch jobs are not supported by this device.Without as_batch=True, a list of circuits is submitted as separate jobs, and run() returns a
list of jobs, in order. They run in parallel on NEXUS, so a sweep takes about as long as its slowest
circuit, not the sum:
import numpy as np
angles = np.linspace(0, np.pi, 6)
sweep = []
for theta in angles:
qc = QuantumCircuit(1)
qc.ry(theta, 0)
qc.measure_all()
sweep.append(qc)
jobs = device.run(sweep, shots=200) # 6 jobs
for job in jobs:
job.wait_for_final_state(timeout=600)
counts = [job.result().data.get_counts() for job in jobs]Each job is sampled independently.
When a job fails
When a job fails, the reason is on its status:
job.wait_for_final_state(timeout=600)
status = job.status()
if status.name == "FAILED":
print(status.status_message)Read it there. On a failed job, job.result() returns success=False with no data, so
get_counts() raises a generic ValueError: Counts data is not available.
Troubleshooting
| Symptom | Cause |
|---|---|
| A job takes minutes to finish | Every NEXUS job is uploaded and compiled before it runs. Expect 1 to 4 minutes. |
ValueError: Counts data is not available. | The job failed. Read job.status().status_message. See When a job fails. |
status_message mentions optimisation_level | The level is out of range. Use 0 to 3. |
optimization_level or seed has no effect | Only optimisation_level (British spelling) is read. Other keys are ignored. |
ValueError: Batch jobs are not supported by this device. | Drop as_batch=True; a list runs as parallel jobs. See Running several circuits. |
Related links
- Run on qBraid: installing the SDK and saving your qBraid API key
- Batch & group jobs: running several circuits as separate, batch, or group jobs
- Quantinuum (self-managed):
QuantinuumProviderwith your own Nexus account - Pricing: the NEXUS emulators are free to run on qBraid
- Quantinuum emulators: Quantinuum’s own reference
Thanks for your feedback.

