Skip to content

Numerical Notebooks Index

Numerical notebooks should make the canonical systems reproducible. A notebook is not just a plot generator: it should state the analytic result being checked, the numerical method, the parameters, the validation tolerance, and the known limitations.

The first flagship notebooks for this volume are committed under notebooks/wave-mechanics-canonical-systems/. They use NumPy-only validation cells so that the benchmark checks can run in a small local environment without optional plotting dependencies.

Every notebook in this volume should include:

  • purpose and canonical page being reproduced;
  • analytic result or benchmark target;
  • numerical method and discretization;
  • parameter values and dimensionless variables;
  • Python and library versions;
  • expected outputs and plots;
  • validation checks with tolerances;
  • known limitations and failure modes.

If a notebook cannot satisfy this contract, it should stay out of the index until it can.

Notebook PathCanonical PageMethodRequired ValidationStatus
one-dimensional-bound-systems/infinite-square-well.ipynbInfinite Square Wellfinite-difference Hamiltonian diagonalizationeigenvalues approach n2π2ℏ2/(2mL2)n^2\pi^2\hbar^2/(2mL^2) and eigenvectors are orthonormalvalidated locally
one-dimensional-bound-systems/finite-square-well-bound-states.ipynbFinite Square Wellmatrix diagonalizationbound-state count changes with depth and edge leakage is negligiblevalidated locally
free-motion/gaussian-wave-packet-spreading.ipynbWave Packet Spreadingspectral time evolutionnorm is conserved and width follows the analytic Gaussian resultvalidated locally
scattering-tunneling/barrier-scattering-wave-packet.ipynbWave Packets and Scattering, Rectangular Barrier Tunnelingsplit-step time evolutionreflected, transmitted, and interface-neighborhood probabilities account for the conserved normvalidated locally
harmonic-oscillator/harmonic-oscillator-eigenstates.ipynbQuantum Harmonic Oscillatorfinite-difference diagonalizationeigenvalues approach ℏω(n+1/2)\hbar\omega(n+1/2) and eigenfunctions show expected parityvalidated locally
two-level-systems/two-level-system-dynamics.ipynbTwo-State Hamiltoniansexact matrix evolutionprobability oscillations match the analytic two-state formulavalidated locally
hydrogenic/hydrogen-radial-wavefunctions.ipynbHydrogen Atomanalytic radial functions on quadrature gridsradial functions normalize with r2drr^2dr measure and energies scale as −1/n2-1/n^2validated locally
three-dimensional/spherical-harmonics-gallery.ipynbSpherical Harmonicsanalytic angular functions on quadrature gridsangular normalization and orthogonality are checked numericallyvalidated locally
electromagnetic-fields/landau-levels.ipynbLandau LevelsLandau-gauge oscillator discretizationequally spaced levels and degeneracy scaling with flux are verifiedvalidated locally

Use semantic subdirectories so notebooks can be found by model family:

notebooks/wave-mechanics-canonical-systems/
free-motion/
one-dimensional-bound-systems/
scattering-tunneling/
harmonic-oscillator/
two-level-systems/
three-dimensional/
hydrogenic/
electromagnetic-fields/

The first notebook in each subdirectory should include a short README or opening markdown cell explaining shared conventions, units, and expected runtime.

Analytic checks should be explicit. Examples:

For the infinite square well,

Enexact=n2π2ℏ22mL2.E_n^{\mathrm{exact}} =\frac{n^2\pi^2\hbar^2}{2mL^2}.

For a normalized one-dimensional wave packet on a grid,

∣1−∑j∣ψj∣2Δx∣<ϵnorm.\left\lvert 1-\sum_j \lvert\psi_j\rvert^2\Delta x \right\rvert \lt\epsilon_{\mathrm{norm}}.

For Landau-level degeneracy in area AA,

Nϕ=∣q∣BAh=A2πℓB2.N_\phi =\frac{\lvert q\rvert BA}{h} =\frac{A}{2\pi\ell_B^2}.

The notebook should state whether the comparison is exact, asymptotic, finite-grid, or finite-size. A failure to match an exact formula is not always a bug; it may be a boundary effect, a coarse grid, or an invalid parameter regime. The notebook should make that distinction visible.

Notebook-generated figures should follow the same discipline as Canonical Plots Gallery:

  • label axes and units or dimensionless variables;
  • distinguish wavefunction amplitude from probability density;
  • show boundary conditions, turning points, or interfaces when relevant;
  • record parameter choices in the caption or notebook cell;
  • include a text explanation of what the plot verifies.

Generated static figures should be exported to public/figures/wave-mechanics/ only after the notebook has a validation check. The corresponding source notebook should be listed in the figure caption or nearby text. The initial notebook batch deliberately leaves plotting optional; the committed artifacts focus first on reproducible numerical checks.

  • Publishing a plot without a validation check.
  • Treating agreement by eye as a numerical test.
  • Hiding boundary conditions in code rather than stating them in markdown.
  • Comparing finite-box numerics directly with infinite-line formulas without explaining the approximation.
  • Reporting an eigenvalue without specifying grid spacing and convergence behavior.
  • Using a gauge-dependent wavefunction plot as if it were a gauge-invariant observable.
  • 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.
  • 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.
  1. Design the validation cell for an infinite-square-well diagonalization notebook. What two quantities should be checked?
Solution

Check eigenvalues against

En=n2π2ℏ22mL2E_n=\frac{n^2\pi^2\hbar^2}{2mL^2}

for the lowest few states, and check numerical orthonormality of the eigenvectors with the grid inner product. A good notebook should also show convergence as the grid spacing is reduced.

  1. A wave-packet notebook conserves norm to high precision but its packet width disagrees with the analytic Gaussian formula. List two likely causes.
Solution

The initial state may not match the analytic Gaussian convention used in the formula, or the propagation may be affected by finite-box boundaries, grid dispersion, or time-step error. Norm conservation is necessary but not sufficient to validate the full evolution.