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.
What Makes a Good Benchmark?
Section titled “What Makes a Good Benchmark?”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.
Benchmark Ladder
Section titled “Benchmark Ladder”Use benchmarks in layers:
| Layer | Purpose | Example |
|---|---|---|
| algebraic identity | catch assembly mistakes | Hermiticity, trace, normalization |
| small finite model | compare with dense exact result | two-level system |
| continuum exact solution | test discretization | infinite well, oscillator |
| scattering exact solution | test current and matching | rectangular barrier |
| radial singular problem | test endpoint handling | hydrogen radial equation |
| convergence benchmark | test observed order | grid and time-step refinement |
| regression benchmark | prevent future drift | saved validated cases |
A mature code or notebook usually uses several layers, not one heroic benchmark.
Infinite Square Well
Section titled “Infinite Square Well”The Infinite Square Well tests hard-wall boundary conditions, kinetic-energy stencils, eigenvalue ordering, normalization, and node counting.
For with ,
and
Numerical checks:
- low-lying eigenvalues converge under grid refinement;
- the th state has 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.
Harmonic Oscillator
Section titled “Harmonic Oscillator”The Quantum Harmonic Oscillator tests smooth confinement, basis truncation, grid-domain truncation, Gaussian tails, ladder structure, and long-time phase evolution.
The Hamiltonian is
The exact spectrum is
The oscillator length is
Numerical checks:
- energy spacing is constant and equal to ;
- the ground-state energy is ;
- wavefunction tails are negligible at the finite-box boundary;
- parity alternates between even and odd states;
- expectation values satisfy the virial relation ;
- 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
Section titled “Rectangular Barrier”Rectangular Barrier Tunneling tests matching conditions, current normalization, evanescent waves, transfer matrices, and exponentially small transmission.
For
with , define
The exact transmission coefficient for equal potentials on the two sides is
Numerical checks:
- transmission and reflection satisfy for a conservative calculation;
- current ratios, not raw amplitudes, define probabilities;
- the opaque-barrier limit gives ;
- 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.
Hydrogen Radial Equation
Section titled “Hydrogen Radial Equation”The Hydrogen Atom tests radial coordinates, singular endpoints, angular-momentum barriers, reduced mass, and Coulomb tails.
After separation, the reduced radial function satisfies
The bound-state energies are
Numerical checks:
- regularity at is enforced;
- the radial measure is handled consistently;
- and the tail decays at large ;
- degeneracy across allowed 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.
Two-Level System
Section titled “Two-Level System”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
The eigenvalues are
For the special Hamiltonian
starting in one computational basis state gives oscillatory population transfer:
Numerical checks:
- eigenvalues match ;
- time evolution remains unitary;
- Rabi oscillation frequency is correct;
- global phase from 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.
Free Particle on a Periodic Grid
Section titled “Free Particle on a Periodic Grid”A periodic free particle tests FFT conventions, momentum indexing, dispersion, and periodic wraparound.
On a periodic interval of length , Fourier modes have wavenumbers
The kinetic energies are
Numerical checks:
- FFT frequency ordering matches the kinetic-energy array;
- positive and negative modes with the same 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.
Benchmark Selection
Section titled “Benchmark Selection”Choose a benchmark that stresses the same feature as the intended calculation.
| Production feature | Benchmark to start with |
|---|---|
| hard-wall boundary eigenproblem | infinite square well |
| smooth bound states | harmonic oscillator |
| Fourier-grid dynamics | free particle on periodic grid |
| tunneling or evanescent tails | rectangular barrier |
| radial coordinates | hydrogen radial equation |
| finite-dimensional time stepping | two-level system |
| sparse eigensolver | finite-difference well or oscillator |
| quadrature-weighted basis | oscillator 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.
Acceptance Criteria
Section titled “Acceptance Criteria”Before running a benchmark, decide what “passes” means. Examples:
- first five oscillator energies agree within the estimated grid error;
- norm drift stays below over a specified time interval;
- observed convergence order is within a stated tolerance;
- transmission satisfies to the expected accuracy;
- the hydrogen 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.
Common Mistakes
Section titled “Common Mistakes”- 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.
Cross-Links
Section titled “Cross-Links”- Convergence Tests
- Error Estimates
- Matrix Diagonalization
- Sparse Eigensolvers
- Time-Stepping Methods
- PDE Solvers
- Infinite Square Well
- Quantum Harmonic Oscillator
- Rectangular Barrier Tunneling
- Hydrogen Atom
- Two-Level System
- Fast Fourier Transform
References
Section titled “References”- 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.
Exercises
Section titled “Exercises”- 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.
- 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.
- 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.
- In a rectangular barrier benchmark with equal potentials on both sides, why should ?
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 .
- 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.