Website · Documentation · Paper
quchip is an open-source Python toolkit for modelling quantum devices.
Its built-in models cover circuit QED; custom Hamiltonians, operators, and loss
channels describe other systems, such as a nitrogen-vacancy centre in diamond.
A predictive chip model needs more than a Hamiltonian. Device physics, control-line transformations, frames, approximations, dissipation, and measured observables all need explicit places in the model. Gain, delay, and crosstalk remain properties of the control chain instead of being folded into Hamiltonian coefficients by hand.
Declare the chip once, then use the same model for dressed-state analysis, model reduction, control sequences, open-system simulation, parameter sweeps, and JAX gradients.
QuTiP is the default simulation backend. The optional dynamiqs backend is JAX-native and keeps declared device and control parameters differentiable through a solve. The backend guide compares their numerical and workflow tradeoffs. The scqubits integration imports and exports selected device and composite models.
quchip uses GHz for ordinary frequencies, ns for time, and mK for temperature. The implemented conventions and approximations are documented in the physics guide.
Install
quchip requires Python 3.11 or newer.
python -m pip install quchip
Install optional support for dynamiqs, graph visualization, or scqubits as needed:
python -m pip install 'quchip[dynamiqs]'
python -m pip install 'quchip[viz]'
python -m pip install 'quchip[scqubits]'
Extras can be combined. To install the current source instead:
git clone https://github.com/quchip/quchip.git
cd quchip
python -m pip install .
Define and inspect a chip
from quchip import RWA, Capacitive, Chip, DuffingTransmon, Resonator
qubit = DuffingTransmon(
freq=5.0,
anharmonicity=-0.30,
levels=6,
label="q",
)
readout = Resonator(
freq=6.8,
levels=10,
internal_quality_factor=6800,
label="r",
)
coupling = Capacitive(qubit, readout, g=0.060, label="qr")
chip = Chip(
[qubit, readout],
couplings=[coupling],
frame="rotating",
approximation=RWA(),
)
authored_hamiltonian = chip.unresolved_hamiltonian()
resolved_hamiltonian = chip.hamiltonian()
f01 = chip.freq(qubit)
f12 = chip.transition_frequency(qubit, 1, 2)
fr0 = chip.freq(readout, when={qubit: 0})
fr1 = chip.freq(readout, when={qubit: 1})
chi = (fr1 - fr0) / 2
unresolved_hamiltonian() preserves the local device and coupling expressions you declared. hamiltonian() applies the chip's basis, frame, and approximation. Both return inspectable symbolic expressions; call .matrix(t=...) when a resolved expression is time-dependent and you need its numerical array.
The remaining calls read dressed transition frequencies and the resonator frequency conditioned on the qubit state. Their half-difference gives the dispersive shift $\chi$.
The defining and inspecting a chip guide continues from this example with LaTeX output, term inspection, frame transformations, projections, and graph views.
Add dynamics and readout
The dynamics guide adds control lines and pulse sequences to the chip above. It compares short and selective Gaussian qubit drives in the full multilevel model, then simulates conditional resonator readout.
Guides
- Your first chip: build a coupled model, inspect its Hamiltonian, and fit dressed targets.
- Spectra and parameter sweeps: follow an avoided crossing and compare a fluxonium model with measured spectroscopy.
- Pulses, leakage, and readout: compare pulse selectivity, conditional resonator response, and cavity depletion.
- Readout and fridge wiring: calculate VNA traces and qubit readout with receiver noise.
- Model reduction: compare a reduced model with the full pulse simulation.
- Gradients and parameter fitting: differentiate spectra and pulse responses, and fit measured circuit parameters.
- Extending quchip: define custom models, controls, dissipation and interoperability mappings.
- An NV centre in diamond: model a spin defect and its nucleus, from field-dependent resonances to Ramsey fringes.
- Cookbook: practical API choices, tips and common pitfalls.
- SQA 2026 examples: five short calculations from the talk.
Focused studies
- Purcell filtering and T1: how much can a Purcell filter suppress qubit decay while preserving readout bandwidth?
Project status and contributing
Report bugs and model requests through GitHub Issues. Use Discussions for questions and open-ended proposals. Read the contributing guide before making code or physics changes.
Paper and citation
The accompanying paper is quchip: A Differentiable Toolkit for Modeling Quantum Devices (arXiv:2607.17081).
The interactive walkthrough follows one five-device model through declaration, crosstalk identification and correction, adiabatic reduction from 576 to 16 dimensions, and gradient-based recovery of four directed crosstalk parameters.
If you use quchip in your work, please cite:
@misc{alyousef2026quchip,
title={quchip: A Differentiable Toolkit for Modeling Quantum Devices},
author={Ibraheem AlYousef},
year={2026},
eprint={2607.17081},
archivePrefix={arXiv},
primaryClass={quant-ph},
doi={10.48550/arXiv.2607.17081},
url={https://arxiv.org/abs/2607.17081},
}
Citation metadata for the software is also available in CITATION.cff.
License
quchip is distributed under the Apache License 2.0. See LICENSE.
Metadata
Release files for quchip 0.4.0
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 |
|---|---|---|---|---|
| quchip-0.4.0.tar.gz | 9.2 MB | With provenance | Details for quchip-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quchip-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for quchip-0.4.0-py3-none-any.whl |
Total release size: 9.9 MB
Release files / quchip-0.4.0.tar.gz
| Download URL | quchip-0.4.0.tar.gz |
|---|---|
| Size | 9.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
92335334c24d93e288ff7b936b9b30cfdc68e5f60497957fffbf25c142328e78
|
|
BLAKE2b-256 checksum How to use checksums |
1323877561004728f5628afda85b17c1346fcf3b9f2b19b70cf340fb9d9bb588
|
| 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 Sep 29, 2026.
Transparency logRelease files / quchip-0.4.0-py3-none-any.whl
| Download URL | quchip-0.4.0-py3-none-any.whl |
|---|---|
| Size | 627.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b480a6a4287b48c3b9f393a409bd22c752db78f69cc00f6ef194440e40678797
|
|
BLAKE2b-256 checksum How to use checksums |
16e4acf98aa4961fde62981765cc2d6ad26dc8998055187231de6df86b1ff433
|
| 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 Sep 29, 2026.
Transparency logSecurity for quchip 0.4.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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for quchip-0.4.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 Sep 29, 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.