Superconducting quantum device simulation toolkit
Project description
quchip is an open-source Python toolkit for modeling superconducting quantum chips.
A predictive chip model needs more than a Hamiltonian: device physics, control-line transformations, frames and approximations, dissipation, and measured observables all belong to it. quchip represents each part explicitly. Line properties such as gain, delay, and crosstalk belong to the control chain, not to Hamiltonian terms written by hand.
Declare the chip once. The same declaration drives dressed-state analysis, model reduction, control sequencing, open-system simulation, parameter sweeps, and exact JAX gradients. The engine resolves each device's frame, applies the requested approximations, and records the bands it drops.
QuTiP is the default backend. The dynamiqs backend is JAX-native and keeps declared device and control parameters differentiable through the solve.
quchip uses GHz for ordinary frequencies, ns for time, and mK for temperature. The implemented conventions and approximations are recorded in PHYSICS.md.
Install
quchip requires Python 3.11 or newer. Install the current source:
git clone https://github.com/Quchip/quchip.git
cd quchip
python -m pip install .
Optional extras are available for the dynamiqs backend, graph visualization, scqubits interoperability, tests, and development:
python -m pip install '.[dynamiqs]'
python -m pip install '.[viz]'
python -m pip install '.[scqubits]'
Extras can be combined in one install.
A minimal chip
import numpy as np
from quchip import Capacitive, ChargeDrive, Chip, DuffingTransmon, Gaussian, QuantumSequence, Resonator
qubit = DuffingTransmon(freq=5.24, anharmonicity=-0.26, levels=3)
readout = Resonator(freq=6.65, levels=4)
chip = Chip([qubit, readout], couplings=[Capacitive(qubit, readout, g=0.060)], frame="rotating")
drive = ChargeDrive(qubit)
chip.wire(drive)
sequence = QuantumSequence(chip)
sequence.schedule(drive, envelope=Gaussian(duration=40.0, amplitude=0.030), freq=chip.freq(qubit))
result = sequence.simulate(
tlist=np.linspace(0.0, 40.0, 81),
initial_state=chip.state({qubit: 0, readout: 0}),
e_ops={qubit: qubit.projector(1, 1)},
)
print(float(result.expect_final(qubit).real))
fig = result.plot_populations(trace_out=readout)
fig.savefig("populations.png", dpi=200)
The pulse carrier comes from the dressed chip frequency. The printed value is the excited-state population after a nominal π pulse. The last two lines plot the qubit populations with the readout resonator traced out. The figure below is the saved output of the snippet.
Tests
Install the dependencies used by all shipped test lanes:
python -m pip install -e '.[test,dynamiqs]'
Run the full suite:
python -m pytest
Run one lane:
python -m pytest -m core
python -m pytest -m physics_sentinel
python -m pytest -m extended
Examples
Worked examples are being added incrementally.
Paper and citation
Paper reference: pending.
Citation metadata: pending.
License
quchip is distributed under the Apache License 2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quchip-0.1.0.tar.gz.
File metadata
- Download URL: quchip-0.1.0.tar.gz
- Upload date:
- Size: 833.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4423d8b3071a798f35ea1d9c19c8488104bdf9acea3013a96e24468b0160bff
|
|
| MD5 |
c7882f054fc53400218c7d185f975d66
|
|
| BLAKE2b-256 |
fec3448360c6e0ad94a3df44d97095241036ba658d72237f303f90c127472302
|
File details
Details for the file quchip-0.1.0-py3-none-any.whl.
File metadata
- Download URL: quchip-0.1.0-py3-none-any.whl
- Upload date:
- Size: 444.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3721466c5400f309ca32afeb486014e736e89e8d6c57dcfe64f4e41da31f8e84
|
|
| MD5 |
51083210ae9587b402c0bf68c77bf28b
|
|
| BLAKE2b-256 |
eb9205e26cb12095c6f100638d51b241877b0a9222c19d3565c6ffaabe1803d5
|