Landau–Zener Simulation
The infinite-sweep Landau–Zener formula is exact, but a numerical propagation never begins at , never ends at , and never uses an infinitesimal step. This notebook turns those three differences into separate tests. It propagates a swept two-level state with a unitary fourth-order Magnus method, compares two independent integrators, varies the endpoint and step independently, and records both probability and phase-sensitive state error.
The main numerical result is intentionally less tidy than a single agreement number. With exact instantaneous eigenstates prepared and measured at finite endpoints, the transition probability approaches with an oscillatory error. At , the absolute error falls from at to at , but it does not decrease monotonically between those windows. A calculation that instead prepares and measures the bare diabatic state can differ by more than one percentage point even at .
Meanwhile, the production Magnus state at and changes by only when the step is halved. The residual difference from the asymptotic formula is therefore an endpoint effect, not an integration error.
Run the investigation. Download the complete package, extract it, and run python run.py --output-dir results in the environment described by Running an Experiment. The package verification report records the tested source, actual execution date, environment and scientific checks.
Canonical Boundaries
Section titled “Canonical Boundaries”This page owns a reusable numerical experiment, not the general derivation of Landau–Zener physics.
| Object | Canonical home | Role here |
|---|---|---|
| Hamiltonian, basis dictionary, and exact probability | Landau–Zener Transition | analytic target |
| convention audit and one hand-worked finite-window calculation | Landau–Zener Transition Worked Example | interpretation and comparison |
| general adiabatic criterion | Adiabatic Approximation | slow-passage context |
| convergence logic | Convergence Tests | numerical standard |
| reusable solver, sweeps, and retained data | this page | computational benchmark |
The convention-sensitive state mapping is summarized here only to define the program’s input and output. Use the worked example when the factors of two or the words “stay” and “transition” are in doubt.
Physical Problem and Analytic Target
Section titled “Physical Problem and Analytic Target”The Hamiltonian is
Define
The time-dependent Schrödinger equation then becomes
The ideal infinite-sweep experiment prepares the lower instantaneous eigenstate at and asks for the probability of ending on the upper instantaneous branch at . Its exact target is
Small is the fast, nearly diabatic limit; large is the slow, nearly adiabatic limit. The calculation below covers
for which the exact probability ranges from approximately to .
Define the Finite Numerical Experiment
Section titled “Define the Finite Numerical Experiment”At a finite endpoint , let denote normalized instantaneous eigenstates. The primary observable is
This protocol prepares the exact lower eigenstate of the Hamiltonian actually used at the initial endpoint and projects onto the exact upper eigenstate at the final endpoint. Its difference from the asymptotic formula is
The program also evaluates a deliberately different protocol,
where is a fixed diabatic basis vector. The two protocols agree only asymptotically. At finite , replacing by changes the preparation, and replacing by changes the measurement.
That distinction is not a small implementation detail. It is a change of physical question.
Numerical Propagators
Section titled “Numerical Propagators”Write the equation as
Because is anti-Hermitian, exact evolution is unitary. A time step should preserve that structure when practical.
Fourth-order Gauss–Magnus method
Section titled “Fourth-order Gauss–Magnus method”For a step from to , define the midpoint and the two Gauss nodes
With , the fourth-order Magnus exponent is
For the linear Landau–Zener Hamiltonian, the commutator can be evaluated analytically. The result is
with
If
then the step is applied without a general matrix exponential:
Each step is unitary to floating-point roundoff. The commutator term is essential for fourth-order accuracy; dropping it gives exponential midpoint.
Independent comparators
Section titled “Independent comparators”The program implements two additional methods.
- Exponential midpoint: exponentiate exactly. It is unitary but only second order globally.
- Classical RK4: evaluate four right-hand-side stages. It is fourth order in the asymptotic step-size regime but is neither exactly unitary nor unconditionally stable.
Agreement between Magnus and RK4 after refinement is stronger evidence than agreement between two nearly identical exponential formulas. Midpoint supplies a separate order check and demonstrates that exact norm preservation does not imply high accuracy.
Error Metrics
Section titled “Error Metrics”Probability error
Section titled “Probability error”At fixed , the numerical probability is compared with a much finer Magnus reference:
A probability discards phase information. Its error can therefore be accidentally small even when the propagated state is not comparably accurate.
Phase-aligned state error
Section titled “Phase-aligned state error”The primary integrator metric is
Removing one global phase compares physical rays while retaining relative amplitude and relative-phase errors. Both states are normalized before this comparison, so RK4 norm loss is also reported separately rather than hidden inside the distance.
Norm drift
Section titled “Norm drift”The run records
For a unitary method, should remain near accumulated roundoff. For RK4 it is a stability and truncation diagnostic, but a small norm drift alone does not certify the state.
Production Parameters
Section titled “Production Parameters”| Control | Production value | Independent sweep or check |
|---|---|---|
| endpoint for formula comparison | through | |
| step | through | |
| production method | fourth-order Magnus | midpoint and RK4 |
| coupling | nine retained values | |
| trajectory example | , | output samples |
| finite-step reference | Magnus, | fixed , |
| arithmetic | IEEE 754 binary64 | norm and refinement audit |
| random sampling | none | deterministic output |
At the largest endpoint and coupling, the instantaneous generator has eigenvalue magnitude
Thus the endpoint dynamics, not only the central avoided crossing, constrain the step size. The production value gives a largest local phase increment of approximately for this hardest retained point.
Dynamics and Endpoint Convergence
Section titled “Dynamics and Endpoint Convergence”Panel (a) follows a state prepared as at . The upper-adiabatic and first-diabatic populations answer different questions at finite . Panel (b) shows the oscillatory difference and, for , the difference between exact finite-endpoint and bare-diabatic protocols. A favorable single window is not a convergence proof.
The trajectory begins with unit lower-adiabatic population, but the same state already has diabatic population
At the crossing, the upper-adiabatic population is . At it is , while the diabatic- population of that same propagated state is . Neither finite-time quantity is required to equal the asymptotic result exactly.
One window sweep in detail
Section titled “One window sweep in detail”For ,
| | | | | |---:|---:|---:|---:| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
The error changes sign repeatedly. Its envelope generally decreases, but individual values need not. In particular, the small error at is followed by a larger error at . Endpoint-generated amplitudes acquire rapidly varying dynamical phases and interfere with the principal transition amplitude.
The bare-protocol difference is even less monotone. Its value at is larger than at because it includes coherent endpoint rotations, not merely a positive geometric correction.
Coupling sweep at the largest window
Section titled “Coupling sweep at the largest window”| | | | relative formula difference | | |---:|---:|---:|---:|---:| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Across this retained range, the exact-endpoint result agrees with the asymptotic formula to better than relatively. This is a statement about the sampled parameters and window, not a universal endpoint bound.
Integrator Convergence and Stability
Section titled “Integrator Convergence and Stability”All curves use and . Panel (a) compares final rays with a Magnus reference at ; the thin guides scale as and . Panel (b) shows that midpoint and Magnus remain unitary to roundoff, whereas coarse RK4 loses norm and stability. Unitarity and accuracy are distinct tests.
The refined finite-window reference probability is
For comparison,
The finite-window difference is , much larger than the retained integration error.
| midpoint | Magnus | RK4 | RK4 | |
|---|---|---|---|---|
The median observed orders from the asymptotic part of the sweep are
The unitary methods have maximum norm errors below across this sweep. Yet midpoint at is about forty times less accurate in state space than fourth-order Magnus while preserving norm equally well. Structure preservation prevents one class of failure; it does not remove truncation error.
RK4 illustrates the complementary warning. At , its maximum norm error is , so the state is almost extinguished by numerical instability. By , fourth-order state convergence is visible, but the norm drift is still six orders of magnitude larger than the Magnus state error.
Independent Validation Ledger
Section titled “Independent Validation Ledger”| Check | Retained value | What it tests |
|---|---|---|
| Magnus order | commutator sign and fourth-order implementation | |
| midpoint order | independent second-order comparator | |
| RK4 order | independent right-hand-side implementation | |
| production Magnus step halving | state-level integration error at , | |
| largest unitary norm drift in method sweep | exponential-step implementation | |
| , formula difference | approach to the asymptotic target | |
| coarse-RK4 norm drift | stability diagnostic is active | |
| probability bounds | all values in | observable assembly |
These checks are complementary. The Magnus and midpoint norm tests share the same Pauli-exponential helper, so they are not independent validations of that helper. RK4 supplies an independently coded evolution equation, while the analytic probability supplies an asymptotic physical benchmark. The finite-window reference remains numerical; an exact finite-duration parabolic-cylinder solution would provide an additional independent check.
Error Budget at the Representative Point
Section titled “Error Budget at the Representative Point”Take , , and .
| Source | Retained scale | Interpretation |
|---|---|---|
| asymptotic replacement | in probability | finite versus |
| Magnus time step | in state distance | production versus halved step |
| Magnus norm drift | below | accumulated roundoff |
| endpoint basis protocol | problem-dependent, not an error bar | different preparation and measurement |
| model discrepancy | not tested | extra levels, nonlinear sweep, and environment absent |
The first row dominates the numerical comparison with the infinite-sweep formula. The last row is outside this computation: agreement with Landau–Zener theory does not validate a two-level reduction for a particular experiment.
Reproduce the Calculation
Section titled “Reproduce the Calculation”Extract the complete package linked above, then run its entry point from the extracted directory:
python run.py --output-dir resultsNumPy is the only required package. The optional —plot flag uses Matplotlib to generate quick-look PNGs from the retained CSV data. The documentation figures use the linked pgfplots sources.
| Artifact | Contents |
|---|---|
| Python program | propagators, sweeps, validation, and data export |
| window sweep | three couplings, twelve endpoint windows, and two basis protocols |
| coupling sweep | formula comparison at |
| trajectory | diabatic and adiabatic populations, phase, and norm |
| integrator convergence | state, probability, and norm errors for three methods |
| dynamics/window figure source | pgfplots source for the trajectory and endpoint sweep |
| integrator figure source | pgfplots source for convergence and norm drift |
Retained run metadata
Section titled “Retained run metadata”| Item | Value |
|---|---|
| run date | 2026-07-16 |
| Python | 3.12.13 |
| NumPy | 2.3.5 |
| arithmetic | binary64 complex amplitudes |
| random seed | not applicable; no random sampling |
| wall time on retained machine | |
| program license | MIT |
| figure data | direct, unfiltered CSV output |
Runtime is hardware-dependent and is not a validation target. Reproduction should compare retained values and the program’s embedded checks.
Algorithm Audit
Section titled “Algorithm Audit”The implementation follows a short, inspectable sequence.
- Construct the exact lower instantaneous eigenvector at .
- Choose an integer number of steps and adjust so the final point is exactly .
- Apply Magnus, midpoint, or RK4 steps while recording the maximum norm deviation.
- Project onto the exact upper instantaneous eigenvector at .
- Repeat from the bare diabatic state and project in the bare basis.
- Vary at fixed for integration convergence.
- Vary at fixed small for endpoint convergence.
- Compare full final rays with a refined finite-window reference.
No interpolation is used in the endpoint projection. Trajectory samples are diagnostic output only and do not feed back into the propagation.
Known Failure Modes
Section titled “Known Failure Modes”- Changing the Hamiltonian convention: if the diagonal entries, coupling, or sweep slope are renamed, the exponent and dimensionless equation must be translated together.
- Bare-state preparation at finite detuning: is not exactly . The resulting difference is coherent and need not decrease monotonically.
- One-window confirmation: an accidental cancellation can make one look converged. Test an envelope over several larger windows.
- One-step confirmation: agreement after halving says nothing about finite-endpoint error.
- Coarse RK4 at large detuning: the endpoint oscillation frequency grows with and can leave the RK4 stability region.
- Renormalizing every RK4 step: forced normalization hides norm loss but does not repair relative-phase or population error.
- Treating unitarity as accuracy: exponential midpoint preserves norm exactly while retaining second-order state error.
- Probability-only convergence: one scalar can converge through cancellation while the final ray remains inaccurate.
- Tiny probabilities: for large , relative errors become sensitive to underflow and absolute roundoff. Logarithmic formulations or exact asymptotics may be needed.
- Adaptive steps without a physical audit: a local tolerance does not automatically control the final transition probability or finite-window error.
- Repeated passages: two crossings produce Stückelberg interference and require a phase-aware multi-passage calculation.
- Open-system dynamics: relaxation, dephasing, and noise require a density-matrix or stochastic model; a norm-preserving spinor solver cannot represent them.
- More than two levels: an apparently isolated avoided crossing can be contaminated by nearby states even when this two-level computation is perfectly converged.
- Nonlinear or truncated ramps: the ideal exponent need not remain exact when detuning is nonlinear or coupling is time-dependent.
Further Investigations
Section titled “Further Investigations”- Implement the exact finite-duration solution with parabolic-cylinder functions and compare it directly with the numerical .
- Use a symmetric nonlinear sweep and identify which local slope, if any, controls an effective Landau–Zener exponent.
- Add a second passage and recover Stückelberg fringes as a function of waiting phase.
- Propagate a Lindblad master equation and separate dephasing from endpoint error.
- Compare fixed-step Magnus with an adaptive commutator-free exponential integrator.
- Repeat the state-error audit in a moving adiabatic basis and track the geometric connection explicitly.
Exercises
Section titled “Exercises”Nondimensionalize the equation
Section titled “Nondimensionalize the equation”Starting from
derive the dimensionless equation used by the program.
Solution
Set , so
Also . Substitution gives
Multiplying by and defining yields
Recover the Magnus commutator term
Section titled “Recover the Magnus commutator term”For the two Gauss nodes, show that the fourth-order exponent contains
Solution
Let , so . Using
one finds
Therefore
Multiplying by the Magnus coefficient gives
Together with the averaged generator, this is with the stated above.
Estimate the observed order
Section titled “Estimate the observed order”Use the Magnus state errors at and to estimate the convergence order.
Solution
For step halving,
Using and gives
Later pairs approach more closely. The deviation here reflects pre-asymptotic contributions and the finite numerical reference.
Separate endpoint and integration error
Section titled “Separate endpoint and integration error”At and , the production state changes by under step halving, but the probability differs from by . What conclusion is justified, and what conclusion is not?
Solution
The justified conclusion is that time-step error is negligible relative to the discrepancy with the infinite-sweep formula. The natural remaining numerical explanation is the finite endpoint , which should be tested by increasing while maintaining step resolution.
It is not justified to claim that the underlying two-level model describes a laboratory system to . Extra levels, ramp nonlinearity, decoherence, and parameter uncertainty are model errors absent from this calculation.
Explain why norm is insufficient
Section titled “Explain why norm is insufficient”At , both midpoint and Magnus preserve norm to about , yet their phase-aligned state errors are and . Why is there no contradiction?
Solution
Norm preservation constrains the state to remain on the unit sphere. It does not determine where on that sphere the state lies. A unitary approximation can rotate by the wrong angle or around the wrong axis while preserving norm exactly.
Magnus includes the leading noncommutativity correction and is fourth order. Exponential midpoint omits that term and is second order. Both are unitary, but their trajectory errors differ.
Design an endpoint stopping rule
Section titled “Design an endpoint stopping rule”Why is the criterion at one pair of windows unsafe here? Propose a stronger rule.
Solution
The endpoint error oscillates because small amplitudes generated near the boundaries acquire changing dynamical phases. Two neighboring windows can agree through accidental cancellation even when the envelope remains larger than .
A stronger empirical rule evaluates several increasing windows, such as , , , and , and requires all pairwise changes from the largest-window result to remain below the tolerance. It should be repeated after step refinement because the endpoint frequency grows with . When available, comparison with an exact finite-duration solution is stronger still.
Cross-Links
Section titled “Cross-Links”- Computational Notebooks
- Landau–Zener Transition
- Landau–Zener Transition Worked Example
- Landau–Zener Problem: First Encounter
- Adiabatic Approximation
- Sudden Approximation
- Time-Dependent Hamiltonians
- Unitary Time Evolution
- ODE Solvers
- Convergence Tests
References
Section titled “References”- L. D. Landau, “Zur Theorie der Energieübertragung. II,” Physikalische Zeitschrift der Sowjetunion 2, 46–51 (1932).
- C. Zener, “Non-Adiabatic Crossing of Energy Levels,” Proceedings of the Royal Society A 137, 696–702 (1932), doi:10.1098/rspa.1932.0165.
- E. Majorana, “Atomi orientati in campo magnetico variabile,” Il Nuovo Cimento 9, 43–50 (1932), doi:10.1007/BF02960953.
- N. V. Vitanov and B. M. Garraway, “Landau–Zener model: Effects of finite coupling duration,” Physical Review A 53, 4288–4304 (1996), doi:10.1103/PhysRevA.53.4288.
- S. N. Shevchenko, S. Ashhab, and F. Nori, “Landau–Zener–Stückelberg interferometry,” Physics Reports 492, 1–30 (2010), doi:10.1016/j.physrep.2010.03.002.
- W. Magnus, “On the exponential solution of differential equations for a linear operator,” Communications on Pure and Applied Mathematics 7, 649–673 (1954), doi:10.1002/cpa.3160070404.
- S. Blanes, F. Casas, J. A. Oteo, and J. Ros, “The Magnus expansion and some of its applications,” Physics Reports 470, 151–238 (2009), doi:10.1016/j.physrep.2008.11.001.
- E. Hairer, C. Lubich, and G. Wanner, Geometric Numerical Integration: Structure-Preserving Algorithms for Ordinary Differential Equations, 2nd ed., Springer, 2006.