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.
Metadata
Release files for qubit-playground 0.1.1
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 |
|---|---|---|---|---|
| qubit_playground-0.1.1.tar.gz | 4.0 kB | Without provenance | Details for qubit_playground-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qubit_playground-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for qubit_playground-0.1.1-py3-none-any.whl |
Total release size: 9.1 kB
Release files / qubit_playground-0.1.1.tar.gz
| Download URL | qubit_playground-0.1.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a399db085e363de7009afee35a1af8b2ee3796bc7ed7b0b7e8b69aa8fe42a84
|
|
BLAKE2b-256 checksum How to use checksums |
a26a21995b55ca916ef3f4233c93819559dd4ced38011b28b70a5187ccb11ff7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / qubit_playground-0.1.1-py3-none-any.whl
| Download URL | qubit_playground-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63cdf61bed875d47f9611ab5540bd2a7fafec121e0c320626651c7c8ecc84b3a
|
|
BLAKE2b-256 checksum How to use checksums |
e531e6fe2811782032de4247e6650c3c6461af65dad71de245bbc46409c72176
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Security for qubit-playground 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.