Benchmarks for Wave-Mechanics Calculations
Benchmark problems are controlled calculations used to decide whether a notebook, solver, or plot can be trusted. The Mathematical Toolkit benchmark page explains the general numerical methods. This page specializes that guidance to the Wave Mechanics and Model Systems volume.
A benchmark should state the Hamiltonian, boundary conditions, numerical method, reference result, refinement variable, and pass criterion before the computation is run.
Benchmark Suite
Section titled “Benchmark Suite”| Benchmark | Numerical Task | Reference Result | Check | Derivation |
|---|---|---|---|---|
| Infinite square well | finite-difference Hamiltonian eigenproblem | low-lying energies converge under grid refinement and eigenvectors are orthonormal in the grid inner product | Infinite Square Well | |
| Harmonic oscillator | diagonalize a grid or basis Hamiltonian | low levels show constant spacing, expected parity, and negligible boundary-tail error | Quantum Harmonic Oscillator | |
| Finite square well | find bound states by shooting or diagonalization | matching equations and bound-state count | energies satisfy interface conditions and the number of bound states changes correctly with well depth | Finite Square Well |
| Free Gaussian packet | evolve a localized wave packet | analytic width and conserved norm | norm drift stays below the stated tolerance and follows the analytic spreading law | Wave Packet Spreading |
| Rectangular barrier | propagate or match a scattering state | current conservation and stationary transmission coefficient | within error and narrow packets agree with stationary transmission after momentum averaging | Rectangular Barrier Tunneling |
| Landau levels | compute magnetic-field spectrum or construct Landau-gauge states | equal spacing and degeneracy | spacing, gauge convention, and finite-area degeneracy scaling are reported and checked | Landau Levels |
Choosing a Useful Accuracy
Section titled “Choosing a Useful Accuracy”Every benchmark run should include:
- the physical parameters and unit convention;
- the grid, basis, time step, solver tolerance, and finite domain;
- the observable being compared, not only a plot;
- an error estimate or convergence table;
- a statement of which effects are finite-size, discretization, solver, or roundoff errors.
Typical pass criteria are scale dependent. A useful benchmark might require low-lying eigenvalue errors below in chosen dimensionless units, norm drift below over a stated time window, or observed second-order convergence for a second-order finite-difference stencil. The numerical tolerance should be justified by the purpose of the notebook.
Reference Checks
Section titled “Reference Checks”For finite-difference eigenproblems, check both energies and vector normalization. For a grid with spacing , a one-dimensional normalized state should satisfy
For closed-system time evolution, norm conservation is necessary but not sufficient. Also monitor energy expectation for time-independent Hamiltonians:
For scattering benchmarks, use probability current. If the asymptotic wave numbers are and , amplitudes alone do not define transmission:
For Landau-level calculations in a bulk region of area ,
Finite geometry, edges, and boundary conditions can shift finite-size counts. A benchmark should state whether it tests the bulk formula, a finite rectangle, or a specific boundary convention.
A Concrete Grid-Convergence Check
Section titled “A Concrete Grid-Convergence Check”Take an infinite well with and . With interior points, , and the three-point second derivative, the lowest discrete eigenvalue is exactly
This formula predicts the output of the discretized problem before running an eigensolver:
| Interior points | Spacing | Discrete | Relative error from |
|---|---|---|---|
| 31 | 0.031250 | 9.86167978 | 0.000802932 |
| 63 | 0.015625 | 9.86762277 | 0.000200781 |
| 127 | 0.007812 | 9.86910896 | 5.01984e-05 |
Halving reduces the error by about four, as expected for this second-order stencil. Agreement with these discrete values tests the matrix implementation; approach to tests the continuum limit. Domain truncation is absent here because the physical walls are represented exactly.
A Packet Transmission Benchmark
Section titled “A Packet Transmission Benchmark”A unitary propagation can conserve norm while predicting the wrong transmitted probability. For a Gaussian incident on a barrier, compare the late-time right-hand probability with the momentum-averaged stationary target
Here the initial position standard deviation is , the packet is prepared far to the left, and its negative-momentum weight is negligible. The two asymptotic potentials are equal. The packet-scattering discussion explains the momentum weighting; rectangular-barrier tunneling supplies .
The barrier notebook uses , height , width , , and . Its continuum target is approximately . With spacing , time step , and box length , the separated transmitted packet gives approximately , within the stated absolute tolerance of . Mesh and time refinements test discretization; increasing the box and extending the observation time test boundary contamination and packet separation separately.
The barrier faces stay on cell faces during grid refinement, keeping . A small norm error cannot detect a grid that represents the wrong barrier width. Also, choosing a later time is useful only while the scattered packets remain clear of the periodic boundary. The notebook demonstrates a smaller-box result that looks accidentally closer to the target after boundary contamination begins.
Common Mistakes
Section titled “Common Mistakes”- Passing a benchmark at one grid size and calling it convergence.
- Checking energy but not eigenfunction normalization or orthogonality.
- Reporting norm conservation while the wave-packet width, phase, or transmission is wrong.
- Comparing a finite-box calculation with an infinite-line formula without a domain-size study.
- Forgetting that scattering probabilities are current ratios.
- Testing a gauge-dependent wavefunction without stating the gauge.
- Moving benchmark tolerances after a code change to make the result pass.
Exercises
Section titled “Exercises”- A finite-difference infinite-well notebook reports the first five energies but does not check eigenvector orthogonality. Why is the benchmark incomplete?
Solution
The spectrum alone can look plausible even if the discrete inner product, boundary rows, or normalization convention is wrong. Orthonormality checks whether the finite matrix and grid weights correctly represent the Hilbert-space inner product. For a Hermitian discretized Hamiltonian, low-lying eigenvectors should be mutually orthonormal in the correct discrete inner product.
- A barrier-scattering notebook finds for a conservative rectangular barrier. List two possible diagnoses.
Solution
The packet may not have fully separated from the barrier or boundaries, so reflected and transmitted probabilities have not been measured over complete regions. Alternatively, the numerical time evolution may not conserve norm well enough, absorbing boundaries may be present, or the coefficients may have been computed from amplitudes instead of currents.
- A grid has and represents a height-one barrier by six occupied cells, although the intended width is . What integrated potential does it represent? Can exact norm conservation or an exhaustive left/near/right probability partition detect this error?
Solution
The sampled area is , rather than : a relative excess of . At fixed height this changes the represented width and can substantially change tunneling. Both norm conservation and the partition identity can hold for the wrong potential. Check the potential’s physical dimensions and sampled area, then compare transmission with an independent target while refining the grid.
References
Section titled “References”- D. J. Griffiths and D. F. Schroeter, Introduction to Quantum Mechanics, 3rd ed., Cambridge University Press, 2018.
- 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.
- J. M. Thijssen, Computational Physics, 2nd ed., Cambridge University Press, 2007.