Skip to main content

Qubit Lab

PyPI DOI

An open source simulator for learning superconducting qubits, from the equations in the papers to full open system simulation, in an interactive 3D explorer. For students, engineers and researchers.

Every equation carries its paper and equation number, and is checked against a simulation built on maintained open source solvers: Dynamiqs, scqubits, Stim, PyMatching and JAX.

A cat losing its fringes to photon loss, with the ideal cat from theory as a wireframe

Flip rates Transmon
Qubit control: a DRAG pulse on the Bloch sphere Noise bias: a cat and a transmon at measured hardware numbers
Error correction: one surface code run in space-time Pulse optimizer: GRAPE vs DRAG on a 6 ns gate
Readout: two pointer states separating in the IQ plane Two-qubit gates: a transmon CZ and a cat CNOT
Architectures: an Xmon transmon exploded into its layers Playground: a Kerr state written by hand, with its Dynamiqs script
Checks

What you can do

View Try this
Phase space Grow a cat qubit from vacuum, then watch photon loss wash out its fringes, with the ideal cat from theory as a wireframe.
Flip rates Drag the cat size and watch bit-flips fall exponentially while phase-flips rise linearly.
Transmon Drag E_J/E_C and watch the charge bands flatten in 3D, next to the closed forms of Koch et al.
Qubit control Run Rabi, π pulse, DRAG, T1, Ramsey and echo on a 4-level transmon and follow the Bloch vector.
Readout Watch a qubit pull its resonator by ±χ, and compare χ from the exact spectrum with three textbook formulas.
Pulse optimizer Let gradient descent through the simulation design a fast gate, and compare it with DRAG.
Noise bias Compare bit-flip and phase-flip chances for cats and transmons at measured, cited hardware numbers.
Error correction Run surface and repetition codes with Stim, decode with PyMatching, and see errors in space-time.
Two-qubit gates Run a transmon CZ through the 11-20 crossing and a bias-preserving cat CNOT, next to the papers' error formulas.
Architectures Explode six qubit designs, from the Xmon to the Kerr cat, into their layers, with every size cited or marked schematic.
Playground Type your own Hamiltonian and losses, watch the Wigner function evolve, and copy the run as Python.

Every view has Share, a link that restores its inputs, and Copy as Python, a script that reruns the view's simulation next to its theory. CI runs every script, so they stay in step with the code.

How we know it's right

Each formula is compared with a simulation in a regime where it should hold and one where it should not, with the verdict written down before the run. A formula that misses where it should hold is reported, never hidden. The Checks view and docs/reference/checks.md list every comparison; qubitlab checks runs them in the terminal.

Run

Once a release is on PyPI, one command, no Node needed:

pipx run qubitlab serve      # or: pip install qubitlab && qubitlab serve

It opens the explorer at http://127.0.0.1:8000. qubitlab checks prints every formula vs the simulation in the terminal.

From a clone, to change the code:

uv sync --all-groups
cd web && npm install && cd ..
./scripts/dev.sh           # API on :8000, explorer on :5173, both reload on save

To try the packaged build from a clone: cd web && npm run build:package, then uv run qubitlab serve.

How it is built

Three layers, kept apart by a test:

  • Theory (src/qubitlab/theory/): each equation is a SymPy expression with its paper and equation number, compiled to JAX.
  • Simulation (src/qubitlab/sim/): Dynamiqs for the cat's and the driven transmon's Lindblad equations, scqubits for the transmon's spectrum, Stim and PyMatching for error correction, optax for pulse optimization.
  • Checks (src/qubitlab/checks/): theory vs simulation, with the verdict predicted before running.

Learn

Start with docs/learn/: a short course in five parts, from states and noise to qubit designs, control, gates and error correction. Every equation is listed with its source in docs/reference/formulas.md, and every comparison in docs/reference/checks.md.

Limits

The cat model is the standard effective one: a single mode with two-photon dissipation, no buffer mode. Chip geometry is schematic or taken from papers; computing it from a layout with Palace is next (see ROADMAP.md). Rates are in units of κ₂, not hertz. Measured hardware numbers are cited to their papers and shown beside the simulation, never fitted to it. Not affiliated with any company or lab whose work is cited.

Parts of this repo were written with AI coding assistants, directed and reviewed by me. Agent rules are in AGENTS.md.

Apache-2.0 · Pranav Reddy

Metadata

Release files for qubitlab 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qubitlab 1.1.0
File Size Uploaded Provenance Actions
qubitlab-1.1.0.tar.gz 1.8 MB With provenance Details for qubitlab-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qubitlab 1.1.0
File Interpreter ABI Platform Actions
qubitlab-1.1.0-py3-none-any.whl Python 3 none any Details for qubitlab-1.1.0-py3-none-any.whl

Total release size: 3.7 MB

Release files / qubitlab-1.1.0.tar.gz

Download URL qubitlab-1.1.0.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
25e6cf6c3f3c4e3b084ab77fa1ed2ac7a6273f1db3b8a9f3a2b3b133cbcfb83c
BLAKE2b-256 checksum
How to use checksums
323ec4d522eccf5f4bebda37be9ba694a69501eadf1bd5de49e7cc57d434c736
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 14, 2026.

Transparency log

Release files / qubitlab-1.1.0-py3-none-any.whl

Download URL qubitlab-1.1.0-py3-none-any.whl
Size 1.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d60f38e36dc6d6a8eb2f768b80872da30b8e108f515266022173823d02ea7806
BLAKE2b-256 checksum
How to use checksums
13f9782a3c00729799434c16ca9463594eb917a1b7b79eb0c5be02054cbadc4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 14, 2026.

Transparency log

Security for qubitlab 1.1.0

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.

Select from 2 files

Attestation for qubitlab-1.1.0.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 Nov 14, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page