Solving Lindblad Equations
This notebook guide specifies a reproducible finite-dimensional calculation for solving Lindblad–GKSL master equations. The goal is not only to integrate an ordinary differential equation, but to verify the generator, compare solver representations, compute stationary states, inspect relaxation modes, and connect continuous-time dynamics with finite-time quantum channels.
As of this review, no executable notebook under notebooks/density-open-systems/lindblad-solvers/ is promoted as a reproduced artifact. This page is the admission contract for that notebook family: it states what the notebook should compute, what conventions it must declare, and which checks are required before any numerical output is cited.
Purpose
Section titled “Purpose”The notebook should demonstrate how to:
- build a finite-dimensional Lindblad generator from , , and rates;
- convert the generator into a matrix-vectorized Liouvillian;
- compare direct density-matrix right-hand sides with the vectorized Liouvillian;
- compare ODE integration with a matrix exponential for time-independent generators;
- compute steady states from the null space of the Liouvillian;
- inspect Liouvillian eigenvalues as decay rates and oscillation frequencies;
- validate trace preservation, Hermiticity, positivity, and complete positivity of finite-time maps;
- compare numerical results with analytic qubit models.
The first version should stay deliberately small: qubits and low-dimensional truncated oscillators are enough to expose the numerical issues.
Directory Plan
Section titled “Directory Plan”Use a dedicated directory:
notebooks/density-open-systems/lindblad-solvers/ solving-lindblad-equations.ipynb README.mdThe opening notebook cell or README.md should state:
- Python and package versions;
- basis ordering;
- density-matrix vectorization convention;
- Hamiltonian convention and units;
- whether rates are included in or kept as separate ;
- ODE solver method and tolerances;
- norm used for residuals;
- random seed, if random states or random Hamiltonians are used;
- date and commit identifier when the notebook is promoted.
Mathematical Convention
Section titled “Mathematical Convention”Use the Lindblad–GKSL equation in the same convention as Lindblad–GKSL Equation:
with
The notebook should decide in one place whether to represent each dissipator as or as . Both are standard, but mixing them is a common source of factor-of-two and factor-of-rate errors.
Column-Stacking Vectorization
Section titled “Column-Stacking Vectorization”For a matrix , define by stacking columns:
With this convention,
Therefore the time-independent master equation can be written as
where
This formula should be tested against a direct function that computes from matrix multiplications. The notebook should not rely only on a vectorization formula that has not been validated.
Baseline Models
Section titled “Baseline Models”Implement at least three analytically solvable generators. A later extension should add the driven two-level benchmark from Optical Bloch Equations to test detuning signs, saturation, and complex Liouvillian eigenvalues.
Pure dephasing qubit
Section titled “Pure dephasing qubit”Use
and
The analytic solution is
This model tests phase conventions, Hamiltonian signs, and coherence decay. Use Pure Dephasing Master Equation as the analytic reference.
Zero-temperature amplitude damping
Section titled “Zero-temperature amplitude damping”Use
and
In the interaction picture,
The finite-time channel has probability
This model tests nonunital relaxation and the relation between a master equation and a finite-time Amplitude-Damping Channel.
Finite-temperature two-level system
Section titled “Finite-temperature two-level system”Use
The excited-state population satisfies
so the steady-state value is
For a thermal bath, detailed balance additionally requires
This model tests steady states and rate-equation reductions. Use Pauli Rate Equations, Thermal Master Equations, and Detailed Balance for the physical assumptions.
Optional truncated oscillator
Section titled “Optional truncated oscillator”A harmonic oscillator with loss is often written
If included, the notebook must state the Fock-space cutoff and test cutoff convergence. A truncated oscillator is finite-dimensional numerically but only approximates the infinite-dimensional model.
Numerical Workflow
Section titled “Numerical Workflow”The notebook should follow a validation-first workflow:
- Define basis ordering and matrix constructors.
- Define a direct function for .
- Define column-stacking vectorization and its inverse.
- Build the matrix Liouvillian .
- Compare with on fixed test states.
- Integrate the direct ODE in density-matrix form.
- Integrate the vectorized ODE.
- Compare both ODE results with for time-independent generators.
- Compute the steady state from the null space of .
- Inspect Liouvillian eigenvalues and identify relaxation modes.
- Build finite-time maps at selected times and test them as quantum channels.
The first version should avoid random Hamiltonians as the main evidence. Fixed small systems make sign, transpose, and ordering errors easier to find.
Test States
Section titled “Test States”Use the same small density-matrix set as Simulating Quantum Channels:
and
Also test the maximally mixed state . For amplitude damping it should move; for pure dephasing it should not.
Solver Comparisons
Section titled “Solver Comparisons”For time-independent generators, compare three equivalent computations:
Here:
- comes from an ODE solver acting on real and imaginary parts of the density matrix or on a complex state vector if the solver supports it;
- comes from the vectorized ODE ;
- comes from .
The matrix exponential is not always the most efficient method for large systems, but it is an excellent validation tool for small time-independent examples.
For time-dependent Hamiltonians or rates, the notebook should not use unless is constant. A time-ordered or stepwise method is needed when the generator changes during the interval.
Steady States
Section titled “Steady States”A steady state satisfies
For the conceptual distinctions among fixed points, attractors, conserved sectors, gaps, and metastable modes, see Steady States and Relaxation.
In vectorized form,
The notebook should compute the null space and then impose trace normalization. For a unique steady state, the nullity should be one within numerical tolerance. If the nullity is larger, the model has multiple stationary states or conserved sectors, and the notebook should not silently pick an arbitrary vector. This null-space check is also a basic validation step for Reservoir Engineering, where uniqueness and the Liouvillian gap decide whether the intended target is actually stabilized.
For zero-temperature amplitude damping, the steady state is
For the finite-temperature two-level system,
in the basis.
Liouvillian Spectrum
Section titled “Liouvillian Spectrum”The Liouvillian spectrum gives the relaxation-mode structure. If
then the corresponding mode evolves as
For a stable finite-dimensional Markovian semigroup, nonstationary modes should have
The zero eigenvalues correspond to stationary operators. Negative real parts give decay rates. Nonzero imaginary parts give coherent oscillations or damped oscillatory modes.
The notebook should report:
- the eigenvalue closest to zero;
- the number of eigenvalues with magnitude below tolerance;
- the largest real part;
- the spectral gap when a unique steady state exists;
- whether eigenvectors reconstruct Hermitian modes or only complex mode pairs.
Eigenvectors of a nonnormal Liouvillian can be ill conditioned. The spectrum is useful, but residuals and physical checks remain necessary.
Finite-Time Channel Checks
Section titled “Finite-Time Channel Checks”For a time-independent generator, the finite-time map is
The notebook should build the superoperator matrix and convert it into the same Choi convention used by Choi Matrix. Then it should test:
For a correct Lindblad generator, should be positive semidefinite for , up to roundoff. This is a stronger check than testing positivity on a few system states.
The notebook should also compare special cases with known channels:
These comparisons link the master-equation notebook to the finite-channel notebook.
Validation Checks
Section titled “Validation Checks”The notebook should report pass/fail checks with numerical tolerances.
| Check | Requirement |
|---|---|
| Direct versus vectorized generator | |
| Trace preservation of generator | |
| Hermiticity preservation | for Hermitian |
| ODE versus exponential | |
| Analytic solution | matrix elements match the linked model page |
| Steady-state residual | |
| Steady-state trace | |
| Steady-state positivity | smallest eigenvalue |
| Finite-time trace preservation | Choi partial-trace residual below tolerance |
| Finite-time complete positivity | Choi eigenvalues nonnegative within tolerance |
Use a tolerance appropriate to double precision, such as for ODE comparisons and for exact algebraic identities, while keeping all tolerances declared in one place.
Expected Output
Section titled “Expected Output”The notebook should produce tables rather than only plots:
- model name, parameters, and units;
- direct-versus-vectorized residuals;
- ODE-versus-exponential residuals at selected times;
- analytic-versus-numerical residuals;
- trace and minimum-eigenvalue checks for evolved states;
- steady-state residuals and null-space dimensions;
- Liouvillian eigenvalues sorted by real part;
- finite-time Choi eigenvalue minima.
Plots are helpful, especially for population relaxation and Bloch-vector trajectories, but the validation table is the evidence.
Suggested Parameter Sets
Section titled “Suggested Parameter Sets”Use small parameter grids that include limiting cases:
For finite-temperature damping, use one equilibrium example such as
and verify that the steady excited-state population is .
Common Numerical Failures
Section titled “Common Numerical Failures”- Using row-major vectorization while applying column-stacking formulas.
- Forgetting the transpose in .
- Double-counting rates by using both and .
- Treating an ODE solver’s small trace drift as physical.
- Clipping negative eigenvalues without reporting the original residual.
- Calling a nonunique null space a unique steady state.
- Using for a time-dependent generator.
- Testing positivity on a few states but never testing complete positivity of the finite-time map.
- Forgetting that a truncated oscillator requires cutoff checks.
- Reporting only visual trajectories, with no residual table.
Exercises
Section titled “Exercises”Vectorization identity
Section titled “Vectorization identity”Using column stacking, show that .
Solution
Write
In column stacking, the pair is mapped to the single index . The matrix has entries
Multiplying by gives the same sum:
Pure dephasing modes
Section titled “Pure dephasing modes”For the pure dephasing qubit with Hamiltonian , what are the eigenvalues associated with the operators and ?
Solution
The coherences obey
and
Thus has Liouvillian eigenvalue
and has eigenvalue
They form a complex-conjugate pair, as expected for Hermiticity-preserving dynamics.
Thermal steady state
Section titled “Thermal steady state”For a two-level system with and , compute the steady excited-state probability.
Solution
The rate equation is
At stationarity,
Therefore
Trace-preserving left mode
Section titled “Trace-preserving left mode”Explain why a trace-preserving Liouvillian has a left zero mode corresponding to the identity operator.
Solution
Trace preservation means
for every . With the Hilbert–Schmidt pairing, this is
Equivalently,
Thus the identity is a zero mode of the adjoint generator. In matrix-vectorized form, the vector representing the trace functional is a left eigenvector of with eigenvalue zero.
Why check the Choi matrix?
Section titled “Why check the Choi matrix?”If a numerical finite-time map sends the notebook’s five test states to positive density matrices, why is that not enough to prove complete positivity?
Solution
Positivity on a finite list of system states only checks those particular inputs. Complete positivity requires positivity after the map is extended by an identity operation on an arbitrary reference system. A map can look harmless on a small set of system states and still fail when applied to part of an entangled state.
For finite-dimensional channels, Choi positivity is the practical test:
That is why the notebook should construct the finite-time Choi matrix instead of relying only on evolved sample states.
Cross-Links
Section titled “Cross-Links”- Noise Simulation
- Lindblad–GKSL Equation
- Lindblad Operators
- Quantum Dynamical Semigroups
- Pure Dephasing Master Equation
- Amplitude Damping Master Equation
- Optical Bloch Equations
- Pauli Rate Equations
- Steady States and Relaxation
- Thermal Master Equations
- Simulating Quantum Channels
- Formula Sheet
- Approximation Checklist
- Validation Tests
References
Section titled “References”- V. Gorini, A. Kossakowski, and E. C. G. Sudarshan, “Completely positive dynamical semigroups of N-level systems,” Journal of Mathematical Physics 17, 821–825 (1976).
- G. Lindblad, “On the generators of quantum dynamical semigroups,” Communications in Mathematical Physics 48, 119–130 (1976).
- H.-P. Breuer and F. Petruccione, The Theory of Open Quantum Systems, Oxford University Press (2002).
- C. W. Gardiner and P. Zoller, Quantum Noise, 3rd ed., Springer (2004).
- H. J. Carmichael, Statistical Methods in Quantum Optics 1, Springer (1999).
- E. Hairer, S. P. Nørsett, and G. Wanner, Solving Ordinary Differential Equations I, 2nd ed., Springer (1993).
- P. Virtanen et al., “SciPy 1.0: fundamental algorithms for scientific computing in Python,” Nature Methods 17, 261–272 (2020).
- J. R. Johansson, P. D. Nation, and F. Nori, “QuTiP 2: A Python framework for the dynamics of open quantum systems,” Computer Physics Communications 184, 1234–1240 (2013).