Open-System Trajectory Visualizer

The same driven, damped two-level system described twice: as a Lindblad master equation and as an ensemble of quantum trajectories with jumps.

A two-level system is driven at Rabi frequency \Omega, detuned by \Delta, and decays to its ground state at rate \gamma:

H = \frac{\Delta}{2}\sigma_z + \frac{\Omega}{2}\sigma_x, \qquad L = \sqrt{\gamma}\,\sigma_-.

The app runs two descriptions of that system at once. The Lindblad master equation gives a density matrix, drawn here as a Bloch vector: it moves smoothly and sinks inside the sphere as the state becomes mixed. The Monte Carlo wave function unravelling gives individual pure states, which stay on the surface and fall to the ground state at random instants — the quantum jumps. Neither picture is more correct than the other. Average enough trajectories and you recover the master equation exactly.

These demonstrations were built with generative AI.

Time
0.00
⟨σz⟩ master
-1.000
⟨σz⟩ trajectories
-1.000
Difference
0.000
Jumps so far
0

Reading the picture

The circle is a slice of the Bloch sphere through the xz plane, with |e\rangle at the top and |g\rangle at the bottom. The green vector is the master-equation state. Its length is the purity: it starts on the surface, shortens as the drive and the decay together turn the state mixed, and settles part-way in.

The pale dots are the individual trajectories. Every one of them is a pure state, so they never leave the surface — they only move around it and get thrown back to |g\rangle when a jump happens. The orange dot is one trajectory picked out to follow.

In the plot, the thick green curve is \langle \sigma_z \rangle from the master equation, the thin orange one is that single trajectory, and the blue one is the average over all of them. The single trajectory looks nothing like the master equation. The average does.

The point

The difference readout is the gap between the two, and it is the whole argument. Set the trajectory count to 1 and it stays large and erratic. Raise it and the gap falls off as 1/\sqrt{N}, the ordinary statistical error of an average. Measured over a full run at the default settings, the root-mean-square gap is 0.68 at N = 1, 0.14 at 25, 0.06 at 100 and 0.04 at 400 — multiply each by \sqrt{N} and you get 0.68, 0.68, 0.62, 0.75, near enough constant.

The master equation itself can be checked against algebra. On resonance the steady state of the Bloch equations is

\langle \sigma_z \rangle_{\text{ss}} = -\frac{\gamma^2}{\gamma^2 + 2\Omega^2},

which at \Omega = 3, \gamma = 1 is -1/19 = -0.0526. That is what the readout settles on, to four decimals.

There is no approximation being made in either direction. The unravelling is exact: averaging the trajectory density matrices reproduces the Lindblad solution for any N in expectation, and the residual gap is sampling noise, not bias.

Method

The Bloch vector is integrated with RK4 from

\dot{x} = -\Delta y - \tfrac{\gamma}{2}x, \qquad \dot{y} = \Delta x - \Omega z - \tfrac{\gamma}{2}y, \qquad \dot{z} = \Omega y - \gamma (z + 1).

Each trajectory is evolved under the non-Hermitian H_{\text{eff}} = H - \tfrac{i\gamma}{2}\sigma_+\sigma_-, also with RK4 and renormalised each step, with a jump to |g\rangle taken with probability \gamma |\langle e | \psi \rangle|^2\,\Delta t. The step is \Delta t = 0.005.