Playground for simulating open quantum systems using dynamiqs and JAX.
Project description
qubit-playground
Hands-on studies of differentiable open-quantum-system simulation with dynamiqs/JAX, motivated by superconducting cat-qubit platforms. Current content: a validated lossy harmonic oscillator; see Roadmap.
The physics example — lossy harmonic oscillator
A single cavity mode with Hamiltonian H = ω a†a under single-photon loss
(jump operator √κ a) obeys the Lindblad master equation. Starting from a
coherent state |α₀⟩, the mean photon number decays purely exponentially:
⟨a†a⟩(t) = |α₀|² · exp(−κ·t)
The dynamiqs simulation (dq.mesolve) reproduces this to within a maximum
absolute error of ~5e-6 over the full time window. This agreement is enforced
by the test suite in CI.
Setup
Requires Python 3.12+ and uv.
uv sync # create env, install deps
uv run python -m qubit_playground.plot_lossy_oscillator # regenerate the figure
uv run pytest # run the test suite
Layout
src/qubit_playground/
lossy_oscillator.py # model + simulation, analytic reference, error metric
plot_lossy_oscillator.py # figure generation + validation report
tests/ # analytic, decay-rate, truncation, and plot tests
figures/ # generated plots
Roadmap
- Fock-space and cat-state studies.
- Notes on solver internals (Diffrax).
- A semiclassical light–matter module driven by an external 2-D EM solver.
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 qubit_playground-0.1.1.tar.gz.
File metadata
- Download URL: qubit_playground-0.1.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a399db085e363de7009afee35a1af8b2ee3796bc7ed7b0b7e8b69aa8fe42a84
|
|
| MD5 |
b993512402689601e260e7ad67eb86d8
|
|
| BLAKE2b-256 |
a26a21995b55ca916ef3f4233c93819559dd4ced38011b28b70a5187ccb11ff7
|
File details
Details for the file qubit_playground-0.1.1-py3-none-any.whl.
File metadata
- Download URL: qubit_playground-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63cdf61bed875d47f9611ab5540bd2a7fafec121e0c320626651c7c8ecc84b3a
|
|
| MD5 |
02e6fb9a6db7ad8516fc0e312701ac9a
|
|
| BLAKE2b-256 |
e531e6fe2811782032de4247e6650c3c6461af65dad71de245bbc46409c72176
|