Skip to content

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.

With ℏ=1\hbar=1, take

H=12(Ωσx+Δσz),ω=Ω2+Δ2.H=\frac12(\Omega\sigma_x+\Delta\sigma_z), \qquad \omega=\sqrt{\Omega^2+\Delta^2}.

Since H2=ω2I/4H^2=\omega^2I/4, the propagator is

U(t)=cos⁡ ⁣(ωt2)I−2iωsin⁡ ⁣(ωt2)H.U(t)=\cos\!\left(\frac{\omega t}{2}\right)I -\frac{2i}{\omega}\sin\!\left(\frac{\omega t}{2}\right)H.

Use the continuous limit at ω=0\omega=0. Starting from ∣0⟩\lvert0\rangle, the transition probability is

P1(t)=Ω2Ω2+Δ2sin⁡2 ⁣(ωt2).P_1(t)=\frac{\Omega^2}{\Omega^2+\Delta^2} \sin^2\!\left(\frac{\omega t}{2}\right).

For Ω=3\Omega=3, Δ=4\Delta=4, and t=π/5t=\pi/5, this gives P1=9/25P_1=9/25. Compare both the probability and the complex state or propagator. Populations alone cannot distinguish UU from its complex conjugate in this real-Hamiltonian example. Include a state such as (1,i)T/2(1,i)^T/\sqrt2 and a transverse observable to make sign errors visible.

For physically equivalent pure states, use fidelity F=∣⟨ψexact∣ψnum⟩∣2F=|\langle\psi_{\mathrm{exact}}\vert\psi_{\mathrm{num}}\rangle|^2 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.

For H=−∂x2H=-\partial_x^2 on (0,L)(0,L) with Dirichlet endpoints, the continuum eigenvalues are (nπ/L)2(n\pi/L)^2. For NN interior grid points and spacing h=L/(N+1)h=L/(N+1), the centered discrete Laplacian has

En(N)=4h2sin⁡2 ⁣(nπ2(N+1)),n=1,…,N.E_n^{(N)}=\frac4{h^2} \sin^2\!\left(\frac{n\pi}{2(N+1)}\right), \qquad n=1,\ldots,N.

First compare the numerical matrix solver with En(N)E_n^{(N)} and its sine eigenvectors. That isolates algebraic errors. Then compare En(N)E_n^{(N)} 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.

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 −iW(x)-iW(x), W≥0W\ge0, check the continuity relation −d∥ψ∥2/dt=(2/ℏ)⟨ψ∣W∣ψ⟩-d\|\psi\|^2/dt=(2/\hbar)\langle\psi|W|\psi\rangle 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.

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.

A propagator passes norm conservation to 10−1410^{-14} but gives P1=1P_1=1 for the detuned example above. What does the analytic result diagnose?

Solution

The correct probability is 9/259/25. Norm conservation did not validate the rotation axis or detuning. An implementation that drops Δ\Delta or rescales the drive may remain unitary while predicting the wrong transition probability.

  • 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.