Validation Against Analytic Benchmarks
An analytic benchmark compares a numerical result with an independently known solution or identity. Its purpose is to expose specific failure modes: a spectrum tests different parts of a calculation than a phase-sensitive propagator or a boundary flux. Passing one benchmark establishes the tested case, not the validity of every model accessible to the program.
Required background. Convergence studies separates approximation errors; array representations defines the objects to compare.
Benchmarks with different diagnostic roles
Section titled “Benchmarks with different diagnostic roles”Start with the smallest problem that exercises an implementation. A two-state Hamiltonian tests complex arithmetic and evolution without spatial discretization. A finite-difference square well tests stencil assembly, boundaries, and eigensolvers. The continuum square well additionally tests spatial convergence. A harmonic oscillator in a finite box tests the treatment of an artificial boundary.
Distinguish verification of the discretized equations from validation of a physical modeling approximation. Agreement with exact Schrödinger evolution cannot establish that a phenomenological Hamiltonian describes an experiment. Similarly, agreement between two codes sharing the same operator assembly is not an independent check of that assembly.
A phase-sensitive two-level test
Section titled “A phase-sensitive two-level test”With , take
Since , the propagator is
Use the continuous limit at . Starting from , the transition probability is
For , , and , this gives . Compare both the probability and the complex state or propagator. Populations alone cannot distinguish from its complex conjugate in this real-Hamiltonian example. Include a state such as and a transverse observable to make sign errors visible.
For physically equivalent pure states, use fidelity or a phase-aligned vector error. For a propagator, a global phase may matter when comparing against an explicitly declared energy zero or controlled operation. State what is being tested.
Discrete and continuum square wells
Section titled “Discrete and continuum square wells”For on with Dirichlet endpoints, the continuum eigenvalues are . For interior grid points and spacing , the centered discrete Laplacian has
First compare the numerical matrix solver with and its sine eigenvectors. That isolates algebraic errors. Then compare with continuum energies while refining the grid. High-index grid modes near the Nyquist scale are poorly resolved continuum states even when the finite-matrix residual is tiny.
The infinite square well derives the physical solution; the finite-difference page derives the numerical operator. Avoid copying a solver’s own assembled matrix into the “reference” routine: use the independent closed form.
Invariants and deliberately failing cases
Section titled “Invariants and deliberately failing cases”Hermiticity, norm conservation, trace preservation, and symmetry commutators are useful independent constraints. They are necessary in their applicable setting, not sufficient for accurate physics. A zero Hamiltonian preserves norm perfectly while producing the wrong dynamics for almost every nontrivial problem.
A useful test suite includes inputs designed to expose known mistakes: complex vectors for conjugation, nonsymmetric parameter choices for basis ordering, nonzero detuning for drive conventions, and boundary-localized vectors for stencil wraparound. Verify that deliberately changing a sign or endpoint rule causes the expected test to fail. This tests the diagnostic itself.
For an absorbing boundary, norm loss is intended. With a potential , , check the continuity relation when no current crosses the outer boundary, and separately check artificial reflection. For stochastic evolution, compare ensemble estimates with analytic expectations using statistical acceptance intervals. Demanding trajectory-by-trajectory agreement between different unravelings is physically inappropriate.
Reporting a benchmark result
Section titled “Reporting a benchmark result”Give the Hamiltonian and units, initial/boundary conditions, analytic target, actual numerical result, error measure, and acceptance tolerance. State which approximations remain fixed. Use at least one refinement sequence to justify the tolerance and avoid copying the achieved error into a threshold chosen afterward.
Keep executable investigations and environment instructions in Labs. A short analytic check can remain beside the method; large reproducible experiments should share their numerical implementation with downloadable artifacts.
Exercises
Section titled “Exercises”A propagator passes norm conservation to but gives for the detuned example above. What does the analytic result diagnose?
Solution
The correct probability is . Norm conservation did not validate the rotation axis or detuning. An implementation that drops or rescales the drive may remain unitary while predicting the wrong transition probability.
References
Section titled “References”- LeVeque, R. J., Finite Difference Methods for Ordinary and Partial Differential Equations, SIAM, 2007 — discrete spectra and consistency/stability verification.
- Tannor, D. J., Introduction to Quantum Mechanics: A Time-Dependent Perspective, University Science Books, 2007 — exact propagation examples and dynamical observables.
- Trefethen, L. N., and D. Bau III, Numerical Linear Algebra, SIAM, 1997 — residuals, structured matrix problems, and independent error assessment.