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.
Convergence Tests
Section titled “Convergence Tests”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.
Matrix Assembly Checks
Section titled “Matrix Assembly Checks”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
The tolerance should reflect the time stepper and floating-point scale.
Normalization and Conservation
Section titled “Normalization and Conservation”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.
Stochastic Benchmarks
Section titled “Stochastic Benchmarks”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
Section titled “Regression Benchmarks”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.
Failure Diagnosis
Section titled “Failure Diagnosis”When a benchmark fails, classify the failure:
| Symptom | Likely Cause |
|---|---|
| correct low energies, wrong high energies | grid cutoff or basis truncation |
| norm conserved, packet width wrong | phase error, dispersion error, or wrong initial convention |
| incomplete separation, absorption, current normalization, or time-step error | |
| density matrix trace preserved but negativity appears | integrator, generator, or complete-positivity issue |
| result changes with box size | finite-domain effect |
| result changes with package version | dependency or API drift |
The diagnosis should be attached to the notebook or benchmark report.
Cross-Links
Section titled “Cross-Links”References
Section titled “References”- 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.