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.
Notebook Contract
Section titled “Notebook Contract”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.
Initial Flagship Notebooks
Section titled “Initial Flagship Notebooks”| Notebook Path | Canonical Page | Method | Required Validation | Status |
|---|---|---|---|---|
one-dimensional-bound-systems/infinite-square-well.ipynb | Infinite Square Well | finite-difference Hamiltonian diagonalization | eigenvalues approach and eigenvectors are orthonormal | validated locally |
one-dimensional-bound-systems/finite-square-well-bound-states.ipynb | Finite Square Well | matrix diagonalization | bound-state count changes with depth and edge leakage is negligible | validated locally |
free-motion/gaussian-wave-packet-spreading.ipynb | Wave Packet Spreading | spectral time evolution | norm is conserved and width follows the analytic Gaussian result | validated locally |
scattering-tunneling/barrier-scattering-wave-packet.ipynb | Wave Packets and Scattering, Rectangular Barrier Tunneling | split-step time evolution | reflected, transmitted, and interface-neighborhood probabilities account for the conserved norm | validated locally |
harmonic-oscillator/harmonic-oscillator-eigenstates.ipynb | Quantum Harmonic Oscillator | finite-difference diagonalization | eigenvalues approach and eigenfunctions show expected parity | validated locally |
two-level-systems/two-level-system-dynamics.ipynb | Two-State Hamiltonians | exact matrix evolution | probability oscillations match the analytic two-state formula | validated locally |
hydrogenic/hydrogen-radial-wavefunctions.ipynb | Hydrogen Atom | analytic radial functions on quadrature grids | radial functions normalize with measure and energies scale as | validated locally |
three-dimensional/spherical-harmonics-gallery.ipynb | Spherical Harmonics | analytic angular functions on quadrature grids | angular normalization and orthogonality are checked numerically | validated locally |
electromagnetic-fields/landau-levels.ipynb | Landau Levels | Landau-gauge oscillator discretization | equally spaced levels and degeneracy scaling with flux are verified | validated locally |
Directory Plan
Section titled “Directory Plan”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.
Validation Patterns
Section titled “Validation Patterns”Analytic checks should be explicit. Examples:
For the infinite square well,
For a normalized one-dimensional wave packet on a grid,
For Landau-level degeneracy in area ,
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.
Plot Requirements
Section titled “Plot Requirements”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.
Common Mistakes
Section titled “Common Mistakes”- 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.
Where This Is Used
Section titled “Where This Is Used”- Exercise Sets includes computational extensions that should become notebooks.
- Benchmark Problems defines the volume-specific validation checks for those notebooks.
- Visualization Gallery records when notebook outputs are ready to become committed static or animated assets.
- Common Hamiltonians helps choose the Hamiltonian for each notebook.
- Spectra and Eigenfunctions Table gives analytic results used in validations.
References
Section titled “References”- 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.
Exercises
Section titled “Exercises”- Design the validation cell for an infinite-square-well diagonalization notebook. What two quantities should be checked?
Solution
Check eigenvalues against
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.
- 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.