Skip to content

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 Numerical Task Reference Result Check Derivation
Infinite square well finite-difference Hamiltonian eigenproblem En=n2π2ℏ2/(2mL2)E_n=n^2\pi^2\hbar^2/(2mL^2) 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 En=ℏω(n+1/2)E_n=\hbar\omega(n+1/2) 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 σx(t)\sigma_x(t) follows the analytic spreading law Wave Packet Spreading
Rectangular barrier propagate or match a scattering state current conservation and stationary transmission coefficient R+T=1R+T=1 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 ℏωc\hbar\omega_c and degeneracy A/(2πℓB2)A/(2\pi\ell_B^2) spacing, gauge convention, and finite-area degeneracy scaling are reported and checked Landau Levels

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 10−410^{-4} in chosen dimensionless units, norm drift below 10−1010^{-10} 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.

For finite-difference eigenproblems, check both energies and vector normalization. For a grid with spacing Δx\Delta x, a one-dimensional normalized state should satisfy

∑j∣ψj∣2Δx≈1.\sum_j \lvert\psi_j\rvert^2\Delta x \approx 1.

For closed-system time evolution, norm conservation is necessary but not sufficient. Also monitor energy expectation for time-independent Hamiltonians:

⟨H⟩(t)=⟨ψ(t)∣H∣ψ(t)⟩.\langle H\rangle(t) =\langle\psi(t)\vert H\vert\psi(t)\rangle.

For scattering benchmarks, use probability current. If the asymptotic wave numbers are kink_{\mathrm{in}} and koutk_{\mathrm{out}}, amplitudes alone do not define transmission:

T=joutjin.T =\frac{j_{\mathrm{out}}}{j_{\mathrm{in}}}.

For Landau-level calculations in a bulk region of area AA,

Nϕ=A2πℓB2,ℓB=ℏ∣q∣B.N_\phi =\frac{A}{2\pi\ell_B^2}, \qquad \ell_B=\sqrt{\frac{\hbar}{\lvert q\rvert B}}.

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.

Take an infinite well with L=1L=1 and ℏ2/(2m)=1\hbar^2/(2m)=1. With NN interior points, h=1/(N+1)h=1/(N+1), and the three-point second derivative, the lowest discrete eigenvalue is exactly

E1(h)=4h2sin⁡2 ⁣(πh2)=π2−π4h212+O(h4).E_1(h)=\frac{4}{h^2}\sin^2\!\left(\frac{\pi h}{2}\right) =\pi^2-\frac{\pi^4h^2}{12}+O(h^4).

This formula predicts the output of the discretized problem before running an eigensolver:

Interior points NN Spacing hh Discrete E1E_1 Relative error from π2\pi^2
31 0.031250 9.86167978 0.000802932
63 0.015625 9.86762277 0.000200781
127 0.007812 9.86910896 5.01984e-05

Halving hh reduces the error by about four, as expected for this second-order stencil. Agreement with these discrete values tests the matrix implementation; approach to π2\pi^2 tests the continuum limit. Domain truncation is absent here because the physical walls are represented exactly.

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

PT=∫0∞w(k)T(k) dk,w(k)=2π σ e−2σ2(k−k0)2.P_{\mathrm T}=\int_0^\infty w(k)T(k)\,dk, \qquad w(k)=\sqrt{\frac{2}{\pi}}\,\sigma\,e^{-2\sigma^2(k-k_0)^2}.

Here the initial position standard deviation is σ\sigma, 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 T(k)T(k).

The barrier notebook uses ℏ=m=1\hbar=m=1, height V0=1V_0=1, width a=2a=2, σ=7\sigma=7, and k0=1k_0=1. Its continuum target is approximately 0.073323050.07332305. With spacing 0.1250.125, time step 0.00250.0025, and box length 384384, the separated transmitted packet gives approximately 0.073299830.07329983, within the stated absolute tolerance of 10−410^{-4}. 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 ∑jVjΔx=V0a\sum_j V_j\Delta x=V_0a. 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.

  • 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.
  1. 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.

  1. A barrier-scattering notebook finds R+T=0.97R+T=0.97 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.

  1. A grid has Δx=200/512\Delta x=200/512 and represents a height-one barrier by six occupied cells, although the intended width is 22. 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 6Δx=2.343756\Delta x=2.34375, rather than 22: a relative excess of 17.1875%17.1875\%. 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.

  • 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.