Dyber SDK
Write gate-model quantum circuits in Python, OpenQASM 3, Qiskit or Cirq, and run them on an
exact local statevector simulator or on any server that speaks the Dyber job protocol. The
resource report and the optional noise come from an illustrative H-cat resource model (see
"What the simulator is (and is not)"). No H-cat hardware exists, and the hcat_qpu
backend is not available.
30-second quickstart
pip install dyber
from dyber import Dyber, Circuit
c = Circuit(2, "bell")
c.h(0); c.cx(0, 1); c.measure_all()
job = Dyber().backend("local_simulator").run(c, shots=1000)
print(job.result().counts()) # {'00': ~500, '11': ~500}
Five lines, a Bell state. Qubit 0 is the leftmost bit in result strings.
Three access modes
Same circuits, same job protocol, pick the surface that fits your workflow.
1. Python SDK
from dyber import Dyber, Circuit
dy = Dyber()
print(dy.backends()) # local_simulator (online), hcat_qpu (not available)
c = Circuit(2, "bell")
c.h(0); c.cx(0, 1); c.measure_all()
res = dy.backend("local_simulator").run(c, shots=1000, loss_per_cycle=0.005).result()
print(res.counts()) # measurement counts
print(res.resources) # model values (illustrative), not a hardware operating point
print(res.noise) # illustrative noise summary
2. Command line
The dyber command ships with the package (or use python -m dyber.cli):
dyber run bell.qasm --shots 1000 # run an OpenQASM file on the simulator
dyber run bell.qasm --json # machine-readable output for scripts
dyber backends # list backends and their status
dyber examples # bundled example circuits to get started
dyber serve # start the reference control plane (REST API)
dyber version
3. REST API
Start the reference control plane and submit jobs over HTTP. The protocol is documented in PROTOCOL.md.
dyber serve # listens on http://127.0.0.1:8787
curl -s -X POST http://127.0.0.1:8787/jobs \
-H "Content-Type: application/json" \
-d '{"qasm": "OPENQASM 3.0; qubit[2] q; h q[0]; cx q[0], q[1];", "shots": 1000}'
Then GET /jobs/{id}/result returns counts plus the model resource report and noise
summary. Jobs can also be submitted as circuit JSON ({"program": {...}}, see PROTOCOL.md).
The hcat_qpu backend is not available.
Bring your own language
Dyber deliberately has no proprietary circuit language. Circuits come in and out through open formats and the tools you already use:
- OpenQASM 3 import and export:
dyber.qasm.loads(text)anddyber.qasm.dumps(circuit). OpenQASM 2 programs are accepted on import. - Qiskit adapter:
dyber.interop.from_qiskit(qc)andto_qiskit(circuit)convert to and from a QiskitQuantumCircuit. - Cirq adapter:
dyber.interop.from_cirq(circuit)andto_cirq(circuit)convert to and from a CirqCircuit.
If your circuit already exists somewhere, it runs here. The adapters are duck-typed: neither Qiskit nor Cirq is a dependency of this package.
Examples
| Example | What it shows |
|---|---|
examples/run_local.py |
the illustrative resource model's fault-tolerant, NISQ and above-threshold regimes on the local simulator, with resource and noise reports (model values) |
examples/run_remote.py |
the same circuit over the network via the reference control plane |
dyber examples |
bundled circuits runnable straight from the command line |
What the simulator is (and is not)
The local_simulator backend is an exact statevector simulator for up to 14 qubits. Noise
is off unless you pass loss_per_cycle; with it, the simulator applies illustrative noise
taken from the SDK's resource report. The resource report (code distance, cats per logical
qubit, hardware modes) is always returned; without loss_per_cycle it uses 0.005.
Model value: abstract circuit model with assumed loss heralds. Not a hardware operating
point. The model's thresholds (0.79 percent per cycle by default, 0.898 percent
uncorrected) and distances describe the model only. At or above the model threshold the
report returns the above-threshold regime with a NISQ estimate. No H-cat hardware exists
or has been measured, and the hcat_qpu backend is not available.
The native summary in each result is an illustrative count of H-cat operations. In the H-cat encoding (J. Lee et al., PRX Quantum 5, 030322 (2024)), both logical states carry even cats. The logical Z value is read from the single photon, the logical X value from the photon's H/V outcome times the cat photon count mod 4, and cat photon-number parity only flags photon loss.
How it is layered
| Layer | Module | Role |
|---|---|---|
| Circuit | circuit.py |
gate-model program you write |
| Formats | qasm.py, interop.py |
OpenQASM 3 in/out, Qiskit and Cirq adapters |
| Simulator | simulator.py |
exact statevector run plus optional illustrative noise |
| Backends | backend.py |
local simulator, remote (HTTP), and the hcat_qpu placeholder (not available), one interface |
| Protocol | protocol.py |
the JSON job format shared by SDK and control plane, see PROTOCOL.md |
| Control plane | server.py |
reference server: runs jobs on the local simulator |
| CLI | cli.py |
the dyber command: run, serve, examples, backends, version |
Development
pip install -e .[dev] # from sdk/
python -m pytest tests -q
The native lowering here is illustrative: a count of H-cat operations, not a compiler. License: Apache-2.0.
Changelog
0.2.1
- Labeling and documentation release, with the output changes listed below.
Resource-report thresholds, distances and cat counts are labeled as model values
(abstract circuit model with assumed loss heralds, not a hardware operating point); the
simulator's optional noise is described as illustrative; the H-cat readout is described
as in the published encoding; the
hcat_qpubackend is described as not available. - The resource report and the noise summary carry a
basisfield with that label. The above-thresholdnotenow ends its label with "not a hardware operating point". - Breaking for code that reads
native['parity_measurements']: usenative['readouts']. The native summary keyparity_measurementsis renamedreadouts(the opmeasure_parityis nowhybrid_readout). - The
GET /descriptor'sbackendfield is nowlocal_simulator. hcat_qpuno longer probes the network:dyber backendsandDyber().backends()always report it as not available (no H-cat hardware exists), and running a job on it raisesConnectionError. An unreachable remote URL now gets a message that does not mentionhcat_qpu.- No change to circuits, OpenQASM, interop, simulator sampling, the numbers the model returns, or the job request format (protocol 1.0).
0.2.0
- OpenQASM 3 import and export, Qiskit and Cirq adapters, the
dyberCLI, a REST API that accepts OpenQASM, examples and a test suite.
Metadata
Release files for dyber 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dyber-0.2.1.tar.gz | 36.6 kB | With provenance | Details for dyber-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dyber-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for dyber-0.2.1-py3-none-any.whl |
Total release size: 68.5 kB
Release files / dyber-0.2.1.tar.gz
| Download URL | dyber-0.2.1.tar.gz |
|---|---|
| Size | 36.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de6eb19d89b89b5f1478ea4c1f42db3c6079fbb4523f3b0e4e3741fca3fc0877
|
|
BLAKE2b-256 checksum How to use checksums |
6c0b3f68a5fabf5125ef35db0f38d0e0b894c661e69cc83fd9b3216eba6637ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logRelease files / dyber-0.2.1-py3-none-any.whl
| Download URL | dyber-0.2.1-py3-none-any.whl |
|---|---|
| Size | 31.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ce7dbfbbd0c31f51293f022da7a8f053858af6bc91275870a2b6bfbe49fe943
|
|
BLAKE2b-256 checksum How to use checksums |
036f79ce7ed9b7fd0559740738e290f3a74350a852669cc98f339f2b30ee45e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logSecurity for dyber 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dyber-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.