Quantum Jump Simulation
A photon-counting trajectory describes a state conditioned on detected emissions. For an undriven excited atom, the entire trajectory is determined by one random decay time. Sampling that time exactly gives a useful first simulation: there is no integration-step bias, so discrepancies from the master equation come from finite sampling.
Helpful background. Quantum-jump trajectories explain conditional evolution; amplitude damping supplies the ensemble answer. The code uses Python 3 and NumPy.
One emission from an excited atom
Section titled “One emission from an excited atom”Work in the interaction picture with and . Assume ideal photon counting, unit efficiency, and no other channels. The unnormalized no-count state is
Its squared norm gives the survival probability . Differentiation gives the first-emission density . After emission the state is and stays there, so there is at most one jump.
If is uniform on , then has precisely this waiting-time distribution. NumPy’s exponential sampler performs the equivalent sampling directly. A time grid is used only to display the trajectories, not to decide when an emission occurs.
Run the simulation and quantify sampling error
Section titled “Run the simulation and quantify sampling error”Set in the chosen time unit. For independent trajectories, the fraction surviving at time estimates . Its standard deviation as an estimator is
This uncertainty is statistical; reducing a plot’s time spacing does not reduce it.
import numpy as np
rng = np.random.default_rng(20261013)Gamma = 1.0N = 100000tau = rng.exponential(scale=1/Gamma, size=N)for t in [0.25, 0.5, 1.0, 2.0]: estimate = np.mean(tau > t) exact = np.exp(-Gamma*t) se = np.sqrt(exact*(1-exact)/N) assert abs(estimate-exact) < 6*se print(t, 'survival:', estimate, 'exact:', exact, 'SE:', se)assert abs(tau.mean()-1/Gamma) < 6/(Gamma*np.sqrt(N))print('mean waiting time:', tau.mean())
# A finite observation window censors late emissions.T = 1.0observed = tau[tau <= T]conditional_mean = 1/Gamma-T/np.expm1(Gamma*T)assert abs(observed.mean()-conditional_mean) < 0.01print('mean among clicks before T:', observed.mean())
# General initial state (|g> + i|e>)/sqrt(2).# Half the trajectories never emit; finite times have density# (Gamma/2)*exp(-Gamma*t).u = rng.random(N)first = np.full(N, np.inf)finite = u < 0.5first[finite] = -np.log1p(-2*u[finite])/Gammano_count = first > Tv = np.array([1, 1j*np.exp(-Gamma*T/2)]) / np.sqrt(2)v /= np.linalg.norm(v)rho_no = np.outer(v, v.conj())rho_g = np.diag([1.0, 0.0])mean_rho = no_count.mean()*rho_no+(1-no_count.mean())*rho_gexact_rho = np.array([[1-0.5*np.exp(-Gamma*T), -0.5j*np.exp(-Gamma*T/2)], [0.5j*np.exp(-Gamma*T/2), 0.5*np.exp(-Gamma*T)]])assert np.linalg.norm(mean_rho-exact_rho) < 0.01assert np.linalg.eigvalsh(mean_rho).min() >= -1e-12print('ensemble state:', mean_rho, sep='\n')At , and the standard error for is about . A different seed changes the estimate within statistical fluctuations. Error need not decrease monotonically for every new seed or sample size; the law describes its scale across repeated samples.
Two traps in interpreting the record
Section titled “Two traps in interpreting the record”A finite window changes the observed mean. If you discard trials with no click before , the remaining times have conditional density on . Their mean is
At this is about , not . Keep the no-click trials when estimating a survival curve; do not normalize a truncated histogram and compare it with an untruncated exponential density.
A no-count state can change continuously. For , the unnormalized no-count state is . Its survival probability is , leaving probability of never emitting. Conditioning on no count gradually favors the ground component. The last part of the code includes this possibility and averages density matrices, not state vectors.
With inefficient detection, “no observed click” can also include an undetected emission. Its conditioned state is generally mixed. Deleting a random subset of the displayed clicks while retaining ideal pure conditional states would give the wrong state estimate.
Extend to a driven atom
Section titled “Extend to a driven atom”For , the atom can emit repeatedly. Evolve the unnormalized state with until its squared norm reaches a sampled uniform threshold, apply the jump, then restart. A numerical implementation must resolve threshold-crossing times and compare its ensemble with a Lindblad solver.
A fixed-step method instead uses . It introduces time-step bias; sufficiently many trajectories cannot remove that bias. In the simple excited-state example its survival probability after steps is , rather than .
Exercises
Section titled “Exercises”Waiting-time mean. Integrate and find the variance.
Solution
The first two moments are and , so the variance is . The sample mean over independent complete waiting times has standard error .
A no-count update. Start in . At , find the no-count probability and the conditional excited population.
Solution
The no-count probability is . Its unnormalized excited population is , so its normalized excited population is . The unconditional excited population remains after averaging the no-count and jump branches.
A sampling budget. How many excited-state trajectories give standard error at most at ?
Solution
Require , hence at least . This is a standard-error target, not a guarantee that every observed error is smaller than .
Step bias. Expand the fixed-step survival probability at fixed .
Solution
. Thus this method underestimates survival, with leading relative error .
References
Section titled “References”- H. J. Carmichael, An Open Systems Approach to Quantum Optics, Springer (1993).
- J. Dalibard, Y. Castin, and K. Mølmer, “Wave-function approach to dissipative processes in quantum optics,” Physical Review Letters 68, 580–583 (1992). doi:10.1103/PhysRevLett.68.580.
- K. Mølmer, Y. Castin, and J. Dalibard, “Monte Carlo wave-function method in quantum optics,” Journal of the Optical Society of America B 10, 524–538 (1993). doi:10.1364/JOSAB.10.000524.
- M. B. Plenio and P. L. Knight, “The quantum-jump approach to dissipative dynamics in quantum optics,” Reviews of Modern Physics 70, 101–144 (1998). doi:10.1103/RevModPhys.70.101.