Skip to main content

Playground for simulating open quantum systems using dynamiqs and JAX.

Project description

qubit-playground

ci

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)

Photon-number decay

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


Download files

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

Source Distribution

qubit_playground-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

qubit_playground-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file qubit_playground-0.1.0.tar.gz.

File metadata

  • Download URL: qubit_playground-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 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

Hashes for qubit_playground-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a0f36aa249d47621e9d434ac6bb20b7134330a4317a45fe6b2c373d554d8cd93
MD5 748f06b0a67d708ebb187f5a68ac8bf7
BLAKE2b-256 9d70927748ca4b220c1efc0eca500d63d84b937f69b28885d3fddab0342b655f

See more details on using hashes here.

File details

Details for the file qubit_playground-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: qubit_playground-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 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

Hashes for qubit_playground-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c8d77a5785f7a0407bacc56c26afaa06689481fac0bd9c80caa4413c505998c
MD5 b649f44444b4ea8a15c3219bebe4fe9e
BLAKE2b-256 f15af796edb981fa3ff1cce8243d9c3fadd9efc8c4268f869b3621390b83f60c

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