Skip to content

Benchmark Problems

Benchmark problems are controlled quantum problems used to test numerical methods before trusting them on new physics. A benchmark has a known answer, a known convergence pattern, or an independent way to detect failure.

Good benchmarks are not decorative examples. They catch wrong boundary rows, missing quadrature weights, unstable time steps, mislabeled eigenstates, incorrect units, broken symmetry, phase errors, and false convergence.

This page collects the first benchmark set for numerical quantum mechanics. The canonical physics derivations live in the linked model pages; the role here is validation.

A good benchmark should have:

  • a clearly specified Hamiltonian, domain, and boundary conditions;
  • an exact or highly trusted reference answer;
  • a known scale for energy, length, and time;
  • observables that test the feature you care about;
  • a refinement path with expected behavior;
  • failure modes similar to the production calculation.

Do not benchmark only the easy part of the code. A time-evolution code needs phase and conservation tests, not just a static eigenvalue. A PDE solver with boundary conditions needs benchmarks that actually exercise boundaries. A Monte Carlo estimator needs known statistical behavior and bias checks.

Use benchmarks in layers:

LayerPurposeExample
algebraic identitycatch assembly mistakesHermiticity, trace, normalization
small finite modelcompare with dense exact resulttwo-level system
continuum exact solutiontest discretizationinfinite well, oscillator
scattering exact solutiontest current and matchingrectangular barrier
radial singular problemtest endpoint handlinghydrogen radial equation
convergence benchmarktest observed ordergrid and time-step refinement
regression benchmarkprevent future driftsaved validated cases

A mature code or notebook usually uses several layers, not one heroic benchmark.

The Infinite Square Well tests hard-wall boundary conditions, kinetic-energy stencils, eigenvalue ordering, normalization, and node counting.

For 0<x<L0\lt x\lt L with ψ(0)=ψ(L)=0\psi(0)=\psi(L)=0,

En=n2π2ℏ22mL2,n=1,2,3,…E_n = \frac{n^2\pi^2\hbar^2}{2mL^2}, \qquad n=1,2,3,\ldots

and

ψn(x)=2Lsin⁡nπxL.\psi_n(x) = \sqrt{\frac{2}{L}} \sin\frac{n\pi x}{L}.

Numerical checks:

  • low-lying eigenvalues converge under grid refinement;
  • the nnth state has n−1n-1 interior nodes;
  • eigenvectors are orthonormal in the discrete inner product;
  • boundary values satisfy the hard-wall condition;
  • high-energy states near the grid cutoff are not overinterpreted.

This benchmark is excellent for detecting boundary-row errors. It is less useful for testing smooth potentials because the potential is zero inside and infinite at the walls.

The Quantum Harmonic Oscillator tests smooth confinement, basis truncation, grid-domain truncation, Gaussian tails, ladder structure, and long-time phase evolution.

The Hamiltonian is

H=p22m+12mω2x2.H = \frac{p^2}{2m} + \frac12m\omega^2x^2.

The exact spectrum is

En=ℏω(n+12),n=0,1,2,…E_n = \hbar\omega \left( n+\frac12 \right), \qquad n=0,1,2,\ldots

The oscillator length is

ℓ=ℏmω.\ell = \sqrt{\frac{\hbar}{m\omega}}.

Numerical checks:

  • energy spacing is constant and equal to ℏω\hbar\omega;
  • the ground-state energy is ℏω/2\hbar\omega/2;
  • wavefunction tails are negligible at the finite-box boundary;
  • parity alternates between even and odd states;
  • expectation values satisfy the virial relation ⟨T⟩=⟨V⟩=En/2\langle T\rangle=\langle V\rangle=E_n/2;
  • a superposition revives with the correct relative phases.

This benchmark is sensitive to both grid spacing and finite-domain error. A box that is too small can spoil the Gaussian tail even when the grid is fine.

Rectangular Barrier Tunneling tests matching conditions, current normalization, evanescent waves, transfer matrices, and exponentially small transmission.

For

V(x)={0,x<0,V0,0<x<a,0,x>a,V(x)= \begin{cases} 0, & x\lt0,\\ V_0, & 0\lt x\lt a,\\ 0, & x\gt a, \end{cases}

with 0<E<V00\lt E\lt V_0, define

κ=2m(V0−E)ℏ.\kappa = \frac{\sqrt{2m(V_0-E)}}{\hbar}.

The exact transmission coefficient for equal potentials on the two sides is

T=[1+V02sinh⁡2(κa)4E(V0−E)]−1.T = \left[ 1+ \frac{V_0^2\sinh^2(\kappa a)} {4E(V_0-E)} \right]^{-1}.

Numerical checks:

  • transmission and reflection satisfy T+R=1T+R=1 for a conservative calculation;
  • current ratios, not raw amplitudes, define probabilities;
  • the opaque-barrier limit gives T∝e−2κaT\propto e^{-2\kappa a};
  • matching at discontinuities is implemented consistently;
  • tiny transmissions are larger than roundoff and truncation uncertainty.

This benchmark is excellent for detecting incorrect flux normalization and unstable treatment of growing and decaying exponentials.

The Hydrogen Atom tests radial coordinates, singular endpoints, angular-momentum barriers, reduced mass, and Coulomb tails.

After separation, the reduced radial function u(r)=rR(r)u(r)=rR(r) satisfies

[−ℏ22μd2dr2+ℏ2ℓ(ℓ+1)2μr2−e24πϵ0r]u(r)=Eu(r).\left[ - \frac{\hbar^2}{2\mu} \frac{d^2}{dr^2} + \frac{\hbar^2\ell(\ell+1)}{2\mu r^2} - \frac{e^2}{4\pi\epsilon_0 r} \right]u(r) = Eu(r).

The bound-state energies are

En=−μe42(4πϵ0)2ℏ21n2,n=1,2,…E_n = - \frac{\mu e^4}{2(4\pi\epsilon_0)^2\hbar^2} \frac{1}{n^2}, \qquad n=1,2,\ldots

Numerical checks:

  • regularity at r=0r=0 is enforced;
  • the radial measure is handled consistently;
  • u(0)=0u(0)=0 and the tail decays at large rr;
  • degeneracy across allowed ℓ\ell values is reproduced in the pure Coulomb model;
  • reduced mass is used when comparing physical hydrogen;
  • highly excited states require larger radial domains.

This benchmark is more demanding than the infinite well or oscillator because the coordinate singularity and long tail both matter.

The Two-Level System tests finite-dimensional linear algebra, exact matrix exponentials, unitarity, phase conventions, and time stepping without spatial discretization.

A general Hermitian two-level Hamiltonian can be written

H=c0I+b⋅σ.H = c_0I + \mathbf b\cdot\boldsymbol\sigma.

The eigenvalues are

E±=c0±∥b∥.E_\pm = c_0\pm\lVert\mathbf b\rVert.

For the special Hamiltonian

H=ℏΩ2σx,H = \frac{\hbar\Omega}{2}\sigma_x,

starting in one computational basis state gives oscillatory population transfer:

Pflip(t)=sin⁡2Ωt2.P_{\mathrm{flip}}(t) = \sin^2\frac{\Omega t}{2}.

Numerical checks:

  • eigenvalues match c0±∥b∥c_0\pm\lVert\mathbf b\rVert;
  • time evolution remains unitary;
  • Rabi oscillation frequency is correct;
  • global phase from c0Ic_0I does not affect probabilities;
  • time-step error appears as phase error before norm error in some methods.

This benchmark is ideal for separating time-integration errors from spatial discretization errors because there is no spatial grid.

A periodic free particle tests FFT conventions, momentum indexing, dispersion, and periodic wraparound.

On a periodic interval of length LL, Fourier modes have wavenumbers

kn=2πnL.k_n = \frac{2\pi n}{L}.

The kinetic energies are

En=ℏ2kn22m.E_n = \frac{\hbar^2k_n^2}{2m}.

Numerical checks:

  • FFT frequency ordering matches the kinetic-energy array;
  • positive and negative modes with the same ∣n∣\lvert n\rvert are degenerate;
  • free wave packets disperse at the correct rate;
  • periodic wraparound is recognized as a numerical boundary effect;
  • Parseval normalization agrees between position and momentum grids.

This benchmark is especially useful before using split-operator evolution.

Choose a benchmark that stresses the same feature as the intended calculation.

Production featureBenchmark to start with
hard-wall boundary eigenprobleminfinite square well
smooth bound statesharmonic oscillator
Fourier-grid dynamicsfree particle on periodic grid
tunneling or evanescent tailsrectangular barrier
radial coordinateshydrogen radial equation
finite-dimensional time steppingtwo-level system
sparse eigensolverfinite-difference well or oscillator
quadrature-weighted basisoscillator or hydrogen matrix elements

Passing an easy benchmark is useful but not sufficient. The benchmark should be close enough to expose the same numerical risks.

Before running a benchmark, decide what “passes” means. Examples:

  • first five oscillator energies agree within the estimated grid error;
  • norm drift stays below 10−1010^{-10} over a specified time interval;
  • observed convergence order is within a stated tolerance;
  • transmission satisfies T+R=1T+R=1 to the expected accuracy;
  • the hydrogen n=2n=2 degeneracy is resolved only at the controlled error scale;
  • independent methods agree within their combined error estimates.

Without acceptance criteria, benchmark comparison can become visual pattern matching.

  • Using a benchmark that does not test the feature that matters in production.
  • Comparing to formulas in different units or conventions.
  • Checking only the ground-state energy and ignoring wavefunctions or observables.
  • Trusting high-energy grid eigenstates near the cutoff.
  • Ignoring finite-box effects in oscillator and hydrogen benchmarks.
  • Testing time evolution only at short times when phase error has not accumulated.
  • Treating a benchmark plot as a substitute for a convergence table.
  • Updating reference benchmark values after code changes without investigating the change.
  • J. M. Thijssen, Computational Physics, 2nd ed., Cambridge University Press, 2007.
  • T. Pang, An Introduction to Computational Physics, 2nd ed., Cambridge University Press, 2006.
  • R. J. LeVeque, Finite Difference Methods for Ordinary and Partial Differential Equations, SIAM, 2007.
  • D. J. Tannor, Introduction to Quantum Mechanics: A Time-Dependent Perspective, University Science Books, 2007.
  • D. J. Griffiths and D. F. Schroeter, Introduction to Quantum Mechanics, 3rd ed., Cambridge University Press, 2018.
  • R. Shankar, Principles of Quantum Mechanics, 2nd ed., Springer, 1994.
  1. Which benchmark best tests hard-wall boundary rows in a finite-difference Hamiltonian?
Solution

The infinite square well is the natural first benchmark. Its energy quantization comes entirely from Dirichlet boundary conditions, and the exact eigenfunctions vanish at both endpoints. Boundary-row mistakes show up clearly in the spectrum and eigenfunctions.

  1. A harmonic-oscillator grid calculation gives accurate low energies but changes when the box is enlarged. What error source is indicated?
Solution

The calculation is likely limited by finite-domain error. The oscillator wavefunction tails are still feeling the boundary. Increase the box size until low-energy results are insensitive to boundary placement, then refine the grid spacing.

  1. Why is a two-level system a useful benchmark for time-stepping methods?
Solution

It has exact finite-dimensional dynamics and no spatial discretization. Therefore any error in norm, phase, transition probability, or energy expectation comes from the time integrator or matrix exponential implementation, not from grid spacing or boundary conditions.

  1. In a rectangular barrier benchmark with equal potentials on both sides, why should T+R=1T+R=1?
Solution

The Hamiltonian is conservative and Hermitian, and there is no absorption. Probability current is conserved. With equal asymptotic wave numbers, the incident current is split into reflected and transmitted currents, so the corresponding current ratios satisfy T+R=1T+R=1.

  1. Why is hydrogen a harder benchmark than the infinite square well?
Solution

Hydrogen has a singular Coulomb potential at the origin, an angular-momentum barrier in the radial equation, a long tail, and radial measure issues. The infinite square well has simple hard-wall boundaries and a constant interior potential. Hydrogen therefore tests endpoint regularity, domain truncation, coordinate factors, and degeneracy more severely.