How do you simulate a qubit that is leaking energy and phase into an environment you cannot track?
A qubit is never simulated alone and never undisturbed. The first topic here turns a qubit with a drive, the experiment every lab runs first. The second adds the environment, which gives the two clocks T1 and T2 and the equation (Lindblad’s) that QuTiP’s open-system solver is built on.
Set T1 and T2 (T2 is held to its legal range) and pick a starting point. The left plot is the Bloch vector as it decays, the right ones are the two experiments a lab runs: T1 (start in |1⟩, wait, measure) and Ramsey (start on the equator, wait, measure the phase). The dashed line is the exponential the Lindblad equation predicts, and the solid line is the integrator’s result.
Honest limits: this is the textbook model, in which the noise has no memory. Real qubits often decay non-exponentially (slow noise gives a Gaussian shape), and then no single T2 describes them. The box in the maths section says how to tell.
A real qubit is never alone. It sits in a material that has stray defects, it is wired to a cold line that carries a trace of heat, and the control electronics add noise. You cannot track all of that, and you do not want to. What you want is the effect on the qubit alone, and that is what the density matrix of topic 2 is for: it describes a qubit whose partner you have averaged away.
Two things go wrong, and they are different. The qubit can lose energy: an excited qubit drops to the ground state at a random moment, and the chance that it has not yet dropped falls as a decaying exponential with a time constant T1. Or it can lose its phase: a qubit in a superposition keeps its populations but forgets the relative phase between |0⟩ and |1⟩, so the Bloch vector shortens towards the vertical axis; that decays with time constant T2. Losing energy also loses phase, which is why T2 can never be longer than 2·T1; any extra dephasing, from noise that shifts the qubit’s frequency, makes T2 shorter. The leftover rate is the pure dephasing time, Tφ.
The master equation. The rule for a closed system was the Schrödinger equation. For a system that is leaking to an environment with no memory, the rule is the Lindblad equation: the closed-system turning, plus one extra term for each way the environment can act, called a jump operator or collapse operator. A qubit that decays has a jump operator that lowers it from |1⟩ to |0⟩; a qubit that dephases has one that kicks its phase at random. You choose the operators and the rates, and the equation tells you what the average does.
Why a gate time is measured against T1. A gate takes tens of nanoseconds on superconducting hardware; T1 and T2 are tens to hundreds of microseconds on good devices. The error a gate suffers from the environment alone is about the gate time divided by the coherence time, so coherence times are quoted as the number that sets how many gates fit before the qubit is gone. That ratio is why the records in topic 30 matter.
The Lindblad equation. For a density matrix ρ and collapse operators Lk with rates absorbed into them,
dρ/dt = −i[H, ρ] + Σk ( Lk ρ Lk† − ½ Lk†Lk ρ − ½ ρ Lk†Lk )
It is the most general equation of motion that is linear, has no memory and keeps ρ a valid state (positive, trace 1): Lindblad, Commun. Math. Phys. 48, 119 (1976); Gorini, Kossakowski & Sudarshan, J. Math. Phys. 17, 821 (1976). Without the sum it is the closed-system equation of topic 25 written for ρ.
One qubit. With L1 = √γ1 σ− (σ− = |0⟩⟨1|, the lowering operator, QuTiP’s destroy(2)) and L2 = √(γφ/2) σz, the equations for the elements of ρ are
dρ11/dt = −γ1 ρ11 dρ01/dt = −(γ1/2 + γφ) ρ01
so that P1(t) = e−t/T1 with T1 = 1/γ1, and the coherence decays as e−t/T2 with
1/T2 = 1/(2T1) + 1/Tφ, Tφ = 1/γφ, so T2 ≤ 2T1
The factor ½ in the σz operator is there because σzρσz − ρ turns ρ01 into −2ρ01. Forgetting it halves the dephasing rate without any warning. With T1 = 80 ns and T2 = 110 ns, Tφ = 352 ns, with P1 = e−t/80 ns and the coherence e−t/110 ns as the solver returns them.
What a gate costs. Idling for a time t under these two processes has average gate fidelity F = (3 + e−t/T1 + 2e−t/T2)/6, which for short times is 1 − t/(3T1) − t/(3Tφ). For the numbers above and a 25 ns gate, F = 0.8875 (an error of 11%: a deliberately poor qubit, so the effect is visible). The formula and QuTiP’s average_gate_fidelity of the simulated channel agree to five digits.
When one number is not enough. The equation assumes the environment forgets instantly. Slow noise, such as a flux that wanders over milliseconds, does not: the Ramsey signal then decays as a Gaussian, e−(t/T2*)², and an echo sequence that cancels the slow part gives a longer time. These are different quantities (T2* from Ramsey, T2E from an echo) and a quoted “T2” should say which. The records: a fluxonium with T2* = 1.48 ± 0.13 ms (Somoroff et al., Phys. Rev. Lett. 130, 267001, 2023) and tantalum transmons with T1 and T2 above 0.3 ms (Place et al., Nat. Commun. 12, 1779, 2021).
Try it in Python. mesolve is the master-equation solver: Hamiltonian, starting density matrix, times, a list of collapse operators, and the expectation values you want. Run on QuTiP 5.2.0, 25 October 2026:
import numpy as np
import qutip as qt
T1, T2 = 80.0, 110.0 # ns, so that T2 <= 2*T1 holds
g1 = 1 / T1 # energy-loss rate
gphi = 1 / T2 - 1 / (2 * T1) # extra pure-dephasing rate: 1/T2 = 1/(2 T1) + 1/Tphi
print("Tphi =", round(1 / gphi, 1), "ns")
c_ops = [np.sqrt(g1) * qt.destroy(2), # relaxation |1> -> |0>
np.sqrt(gphi / 2) * qt.sigmaz()] # dephasing, with the 1/2 that makes the coherence decay at gphi
times = np.linspace(0, 300, 7) # ns
# T1 experiment: start in |1>, no drive
t1 = qt.mesolve(0 * qt.sigmaz(), qt.fock_dm(2, 1), times, c_ops, e_ops=[qt.num(2)])
print(np.round(t1.expect[0], 4)) # excited-state probability: exp(-t/T1)
print(np.round(np.exp(-times / T1), 4))
# Ramsey-like experiment: start on the equator, watch the coherence <sigma_x>
plus = qt.ket2dm((qt.basis(2, 0) + qt.basis(2, 1)).unit())
ram = qt.mesolve(0 * qt.sigmaz(), plus, times, c_ops, e_ops=[qt.sigmax()])
print(np.round(ram.expect[0], 4)) # exp(-t/T2)
# What does idling for one 25 ns gate time cost? The average fidelity of "do nothing" for that long:
t_gate = 25.0
S = qt.propagator(0 * qt.sigmaz(), t_gate, c_ops) # the superoperator of the idle channel
F = qt.average_gate_fidelity(S, qt.qeye(2))
F_formula = (3 + np.exp(-t_gate / T1) + 2 * np.exp(-t_gate / T2)) / 6
print(round(float(F), 5), round(float(F_formula), 5)) # the two agree
print(round(1 - float(F), 4)) # the error from decoherence alone
Tphi = 352.0 ns
[1. 0.5353 0.2865 0.1534 0.0821 0.0439 0.0235]
[1. 0.5353 0.2865 0.1534 0.0821 0.0439 0.0235]
[1. 0.6347 0.4029 0.2557 0.1623 0.103 0.0654]
0.8875 0.8875
0.1125
mesolve builds the dissipator itself from each collapse operator c: it adds cρc† − ½{c†c, ρ}. So you pass c = √γ · σ−, not γσ−: the rate is the square of the operator’s size. Passing the rate itself makes the decay rate γ² instead of γ, which for γ = 0.01 per ns is a hundred times too slow.
For pure dephasing the prefactor depends on the operator you choose. With c = √(γφ/2) σz, as above, the coherence decays at γφ. With c = √(2γφ) |1〉〈1| it decays at the same rate; with √γφ instead it decays at half of it. Checking costs one short Ramsey run: read the decay constant off the curve. This is the question behind QuTiP’s Discussions entry collapse operator or lindblad dissipator.
The T1 and T2 on every spec sheet, and the noise model behind every error-correction threshold
The rates quoted for a device are the Lk of this topic, and the Pauli-error models used to estimate error-correction thresholds (the error-correction lesson) are a coarser description of the same noise. scqubits estimates T1 and T2 for a circuit from physical noise sources (topic 37), and those rates are what you would put in c_ops. The thing to remember is the model’s boundary: it is the right tool when the environment has no memory, a good first approximation for energy loss, and a poor one for slow flux or charge noise. A simulation that reproduces a measured T1 and a T2 that is shorter than the Lindblad prediction is telling you there is slow noise it does not contain.
Check yourself
A qubit has T1 = 80 ns. Which of these values of T2 cannot occur?
Losing energy also loses phase, so 1/T2 = 1/(2T1) + 1/Tφ with 1/Tφ ≥ 0. That gives T2 ≤ 2T1 = 160 ns. Every other value is allowed.
The tempting wrong answers.