skip to content
Ivan's wiki
Site Tools
Search
Tools
Show pagesource
Backlinks
Recent Changes
Media Manager
Sitemap
>
Recent Changes
Media Manager
Sitemap
qutip-mcsolve
This page is read only. You can view the source, but not change it.
# Mcsolve (monte carlo trajectories) **Mcsolve** runs stochastic trajectories of quantum evolution, applying [collapse operators](/qutip-collapse-operators) at random times. Each trajectory is a possible quantum history; averaging over many trajectories gives the ensemble result (matching [mesolve](/qutip-mesolve)). Monte Carlo simulations are useful for understanding how noise manifests at the individual-event level and for systems where many collapse operators dominate. ```python from qutip import * import numpy as np # Simple decay H = 0.5 * sigmaz() c_ops = [0.1 * sigmam()] times = np.linspace(0, 10, 50) psi0 = basis(2, 1) # Run 1000 trajectories result = mcsolve(H, psi0, times, c_ops, [sigmaz()], ntraj=1000) # result.expect: ensemble average (matches mesolve) # result.trajectories: individual runs (if stored) ``` ## How it works Each trajectory evolves via an effective non-Hermitian Hamiltonian: $$H_{\text{eff}} = H - \frac{i\hbar}{2} \sum_k L_k^\dagger L_k$$ At each step, with probability $p_k(dt)$, collapse operator $L_k$ is applied (normalized jump). Otherwise, evolution continues. After $N$ trajectories, expectations average to the master equation solution. ## Advantages and trade-offs **Advantages**: - Natural interpretation of quantum jumps - Efficient for many collapse operators - Can track individual quantum events **Trade-offs**: - Slower than mesolve for small $N_{\text{traj}}$ (needs many runs for good statistics) - More memory if storing trajectories - Statistical noise in results Use mcsolve when you need trajectory-level understanding or when many dissipation channels dominate.
Page Tools
Show pagesource
Backlinks
Back to top