Skip to content

Numerical Benchmarks

Numerical benchmarks test the computation itself: convergence, conservation laws, stability, matrix properties, finite-size behavior, and regression against previously validated outputs. They complement analytic benchmarks. A code can match one exact energy and still fail as a numerical method.

A convergence test varies one refinement parameter at a time:

  • grid spacing,
  • box size,
  • basis size,
  • time step,
  • solver tolerance,
  • sample size,
  • bond dimension or truncation threshold.

Record the observed change in a physical observable, not only the change in a plot. If two refinement parameters interact, state the refinement path explicitly.

For Hamiltonian matrices, check:

  • Hermiticity under the correct inner product,
  • dimensions and basis ordering,
  • boundary rows,
  • units of kinetic and potential terms,
  • symmetry blocks when block diagonalization is expected.

For a closed finite-dimensional Hamiltonian, the numerical evolution operator should satisfy

U†U≈I.U^\dagger U\approx I.

The tolerance should reflect the time stepper and floating-point scale.

Closed-system wavefunction calculations should monitor:

  • norm conservation,
  • energy conservation for time-independent Hamiltonians,
  • expected symmetry quantum numbers,
  • probability current conservation in scattering.

Open-system calculations should monitor:

  • trace preservation,
  • Hermiticity of the density operator,
  • positivity or at least absence of unphysical negative eigenvalues beyond tolerance,
  • complete-positivity assumptions when a channel representation is used.

Norm conservation is necessary but not sufficient. A method can conserve norm while producing a wrong phase, width, current, or transition probability.

Monte Carlo, quantum trajectories, and randomized algorithms need statistical validation:

  • fixed seed for reproducibility,
  • multiple seeds for uncertainty,
  • sample size,
  • estimator definition,
  • confidence interval or standard error,
  • autocorrelation or effective sample-size check when relevant.

A single seeded run is a regression test, not a statistical uncertainty estimate.

Regression benchmarks prevent previously validated outputs from drifting. They should store compact reference values, not large opaque outputs. Good regression targets include:

  • first few eigenvalues,
  • norm drift summary,
  • trace-preservation summary,
  • convergence slope,
  • selected expectation values,
  • hash or checksum for exported data when needed.

If a regression changes, investigate before updating the reference value. A changed result can be a bug fix, a dependency change, a convention change, or an actual regression.

When a benchmark fails, classify the failure:

SymptomLikely Cause
correct low energies, wrong high energiesgrid cutoff or basis truncation
norm conserved, packet width wrongphase error, dispersion error, or wrong initial convention
R+T≠1R+T\ne1incomplete separation, absorption, current normalization, or time-step error
density matrix trace preserved but negativity appearsintegrator, generator, or complete-positivity issue
result changes with box sizefinite-domain effect
result changes with package versiondependency or API drift

The diagnosis should be attached to the notebook or benchmark report.

  • L. N. Trefethen and D. Bau III, Numerical Linear Algebra, SIAM, 1997.
  • R. J. LeVeque, Finite Difference Methods for Ordinary and Partial Differential Equations, SIAM, 2007.
  • Y. Saad, Numerical Methods for Large Eigenvalue Problems, 2nd ed., SIAM, 2011.
  • J. M. Thijssen, Computational Physics, 2nd ed., Cambridge University Press, 2007.
  • H.-P. Breuer and F. Petruccione, The Theory of Open Quantum Systems, Oxford University Press, 2002.