GPU-accelerated and differentiable solvers for the Schrödinger equation, Lindblad master equation, and more.
pip install dynamiqs
Requires Python 3.11+. For GPU support, see installation guide.
Simulate a lossy quantum harmonic oscillator in just a few lines.
import dynamiqs as dq
import jax.numpy as jnp
# Define system parameters
n = 16 # Hilbert space dimension
omega = 1.0 # Oscillator frequency
kappa = 0.1 # Decay rate
# Create operators and initial state
a = dq.destroy(n)
H = omega * a.dag() @ a
jump_ops = [jnp.sqrt(kappa) * a]
psi0 = dq.coherent(n, 1.0)
# Run simulation
result = dq.mesolve(H, jump_ops, psi0, jnp.linspace(0, 10, 101))
Compute gradients of any simulation output with respect to any parameter. Perfect for optimal control and parameter estimation.
Learn about gradients →Run simulations on CPUs, GPUs, or TPUs. Batch thousands of simulations to run concurrently with automatic parallelization.
See examples →Full compatibility with the JAX ecosystem. Use JIT compilation, automatic differentiation, and functional transformations.
JAX documentation →Schrödinger equation, Lindblad master equation, stochastic master equation. Choose from modern adaptive ODE methods.
View API →Run parameter sweeps over Hamiltonians, initial states, or jump operators. Process entire datasets in one function call.
Learn batching →Familiar API for QuTiP users. Use QuTiP objects directly as arguments to any Dynamiqs function.
What is Dynamiqs? →Efficient diagonal sparse format for quantum arrays. Leverage structure in your operators for faster computations and lower memory usage.
Quantum arrays →Simulate quantum trajectories with jump and diffusive stochastic master equations. Batch over thousands of trajectories.
Stochastic solvers →Explore our comprehensive documentation, tutorials, and examples to get started with Dynamiqs. Join our community to ask questions and share your projects.