Diffusive Trajectory Simulation
This notebook guide specifies a reproducible simulation of diffusive quantum trajectories for continuous weak qubit measurement. The baseline model is a monitored measurement with noisy records, stochastic state updates, state purification under monitoring, and ensemble averages that recover the unconditional master equation.
As of this review, no executable notebook under notebooks/density-open-systems/diffusive-trajectory-simulation/ is promoted as a reproduced artifact. This page is the admission contract for that notebook: it states the stochastic equation, record convention, numerical scheme, validation tests, convergence checks, and accepted outputs required before trajectories or records should be cited.
Purpose
Section titled “Purpose”The notebook should demonstrate how to:
- generate Wiener increments with a declared convention;
- simulate continuous weak measurement records;
- update a conditioned qubit density matrix with a diffusive stochastic master equation;
- distinguish conditional trajectories from unconditional master-equation dynamics;
- show state purification under efficient monitoring;
- average many trajectories to recover dephasing;
- test time-step, trajectory-number, and random-seed sensitivity;
- diagnose trace, positivity, and Itō-convention errors.
The first version should use a single qubit and one monitored observable. More elaborate homodyne, heterodyne, and feedback examples should wait until this baseline is validated.
Directory Plan
Section titled “Directory Plan”Use a dedicated directory:
notebooks/density-open-systems/diffusive-trajectory-simulation/ diffusive-trajectory-simulation.ipynb README.mdThe opening notebook cell or README.md should state:
- Python and package versions;
- basis ordering and Pauli convention;
- stochastic calculus convention;
- measurement strength and detection efficiency;
- time step and total time;
- number of trajectories;
- random-number generator and seed;
- normalization and positivity tolerances;
- date and commit identifier when the notebook is promoted.
Baseline Model
Section titled “Baseline Model”Use a continuous measurement of with collapse operator
where is the measurement-induced dephasing scale in this convention. With no Hamiltonian and no other dissipative channel, the unconditional generator is
where
The normalized diffusive stochastic master equation is
with efficiency and
The corresponding record convention is
The notebook must use the same convention for the SME and the record. Mixing record normalizations is one of the easiest ways to produce plausible-looking but wrong trajectories.
Itō Increment Checks
Section titled “Itō Increment Checks”Generate Wiener increments as
The notebook should check, for the generated increments,
These checks are not decorative. If the increments have variance instead of , the trajectory will be wrong even if the code runs without errors.
Numerical Update
Section titled “Numerical Update”For a first implementation, Euler-Maruyama is acceptable:
After each step, the notebook should measure:
- trace error;
- Hermiticity error;
- smallest eigenvalue;
- purity ;
- Bloch vector length;
- current conditional expectation .
Small numerical symmetrization may be used for plotting, but raw errors should be recorded before any repair. If positivity failures become visible at normal tolerances, reduce or use a more stable integrator.
Measurement Records
Section titled “Measurement Records”For each trajectory, store the time series
Also store the innovation estimate
The innovation should have zero mean and variance within sampling error. This is a central validation test: the state update must be driven by unpredictable record increments, not by the predicted signal that was already encoded in .
Ensemble Average
Section titled “Ensemble Average”The unconditional master equation is pure dephasing. If
then, under the convention above,
The notebook should average many conditioned trajectories,
and compare with the analytic unconditional solution. The maximum error should decrease as the number of trajectories increases, with the expected Monte Carlo scaling visible over a reasonable range.
State Purification
Section titled “State Purification”Start from the maximally mixed state,
For efficient monitoring, individual conditioned states should tend toward eigenstates as the measurement record accumulates information. A useful diagnostic is the purity
The ensemble average can remain mixed even while individual trajectories purify. This is the main conceptual point the notebook should make: conditioning on a record changes the state assignment, while ignoring the record gives the nonselective state.
The notebook should compare at least two efficiencies, such as and , to show how lost information weakens purification.
Plots and Outputs
Section titled “Plots and Outputs”The accepted notebook should produce:
- several sample measurement records or binned currents;
- sample trajectories for and purity;
- an ensemble-average density-matrix comparison with the analytic dephasing solution;
- innovation mean and variance diagnostics;
- convergence plots versus and number of trajectories.
Save accepted outputs under:
notebooks/density-open-systems/diffusive-trajectory-simulation/outputs/ sample-measurement-records.svg diffusive-trajectories-purity.svg ensemble-average-dephasing.svg innovation-diagnostics.svg diffusive-trajectory-validation.jsonThe JSON validation file should record:
- package versions;
- random seed;
- , , , total time, and trajectory count;
- maximum trace error;
- minimum eigenvalue observed;
- innovation mean and variance;
- maximum ensemble-average error against the analytic solution;
- whether convergence checks passed.
Validation Tests
Section titled “Validation Tests”The notebook should include automated checks:
| Check | Required behavior |
|---|---|
| Wiener scaling | sample variance of near |
| trace | stays near |
| Hermiticity | stays small |
| positivity | eigenvalues stay nonnegative within tolerance |
| record convention | innovations reconstruct generated |
| ensemble average | trajectories recover coherence decay |
| efficiency | lower reduces conditioned purification |
| convergence | errors decrease when is reduced |
The notebook should deliberately include one bad-step demonstration in an appendix or disabled cell: for example, using instead of should fail the validation tests. This is a good way to prove the tests can catch a common stochastic-simulation bug.
Common Mistakes
Section titled “Common Mistakes”- Treating as an ordinary deterministic small number.
- Generating Gaussian increments with variance instead of .
- Updating the state with one measurement-record convention and plotting another.
- Forgetting that ensemble averages must recover the unconditional master equation.
- Interpreting a conditioned trajectory as a hidden classical path of the system.
- Assuming purification occurs when the measurement record is discarded.
- Comparing one noisy trajectory to the master equation instead of comparing the ensemble average.
- Ignoring small positivity violations until they dominate the result.
Exercises
Section titled “Exercises”Wiener Scaling
Section titled “Wiener Scaling”If with , compute and .
Solution
Since ,
Since ,
This is the numerical version of the Itō rule .
Unconditional Coherence Decay
Section titled “Unconditional Coherence Decay”For , show that .
Solution
In the basis,
Therefore
Thus
so
Innovation Reconstruction
Section titled “Innovation Reconstruction”Given the record increment
write the innovation increment.
Solution
Subtract the predicted conditional signal:
Using the record equation, this gives
Thus the innovation is the unpredictable part of the observed record.
Conditional Versus Unconditional Purity
Section titled “Conditional Versus Unconditional Purity”Why can individual monitored trajectories become more pure while the ensemble average remains mixed?
Solution
The monitored trajectory is conditioned on a specific record, so the observer gains information about which eigenstate is favored. That information updates the conditional density matrix and can increase its purity. If the record is ignored, different possible records are averaged together. The average state then represents a mixture over incompatible records and can remain mixed even though each conditioned state became more definite.
Cross-Links
Section titled “Cross-Links”- Stochastic Master Equations
- Diffusive Trajectories
- Measurement Backaction
- Pure Dephasing Master Equation
- Solving Lindblad Equations
- Quantum Jump Simulation
- Circuit QED
- Cavity QED
References
Section titled “References”- H. M. Wiseman and G. J. Milburn, Quantum Measurement and Control, Cambridge University Press, 2010.
- K. Jacobs, Quantum Measurement Theory and its Applications, Cambridge University Press, 2014.
- H. J. Carmichael, An Open Systems Approach to Quantum Optics, Springer, 1993.
- H.-P. Breuer and F. Petruccione, The Theory of Open Quantum Systems, Oxford University Press, 2002.