Skip to main content

Superconducting quantum device simulation toolkit

Project description

quchip

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.

Qubit populations during the π pulse

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quchip-0.1.0.tar.gz (833.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quchip-0.1.0-py3-none-any.whl (444.5 kB view details)

Uploaded Python 3

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

Hashes for quchip-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d4423d8b3071a798f35ea1d9c19c8488104bdf9acea3013a96e24468b0160bff
MD5 c7882f054fc53400218c7d185f975d66
BLAKE2b-256 fec3448360c6e0ad94a3df44d97095241036ba658d72237f303f90c127472302

See more details on using hashes here.

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

Hashes for quchip-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3721466c5400f309ca32afeb486014e736e89e8d6c57dcfe64f4e41da31f8e84
MD5 51083210ae9587b402c0bf68c77bf28b
BLAKE2b-256 eb9205e26cb12095c6f100638d51b241877b0a9222c19d3565c6ffaabe1803d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page