Skip to content

Discretization

Discretization replaces an infinite-dimensional continuum problem by a finite problem that a computer can store and solve. A wavefunction becomes a vector of samples or basis coefficients; a differential operator becomes a matrix; an integral becomes a weighted sum.

The act of discretizing is not a harmless implementation detail. It chooses a finite domain, a resolution, a basis, an inner product, boundary conditions, and a notion of convergence. Those choices can change spectra, symmetries, conservation laws, and numerical stability.

Most analytically interesting quantum systems live in infinite-dimensional Hilbert spaces. A numerical calculation must make them finite:

  • a wavefunction on R\mathbb R is sampled on a finite grid;
  • L2L^2 inner products are replaced by weighted sums;
  • differential operators become finite matrices;
  • continuous spectra are approximated in a finite box;
  • a basis expansion is truncated at finite NN;
  • time evolution is computed on a finite state vector by a chosen time-stepping method;
  • a many-body Hilbert space is cut down by symmetries, occupation limits, or basis choices.

Every numerical result therefore has at least two layers of error: error from the finite model and error from solving that finite model.

Before solving, specify:

  • the physical domain or box;
  • the grid, mesh, or basis;
  • the boundary conditions;
  • the inner product and quadrature weights;
  • the finite operator matrices;
  • the units and scaling;
  • the refinement parameter, such as grid spacing hh or basis size NN.

Without these choices, a reported numerical wavefunction or spectrum is not reproducible.

For a one-dimensional coordinate interval, choose grid points

xj=xmin⁡+jh,j=0,…,N−1.x_j = x_{\min}+jh, \qquad j=0,\dots,N-1.

A wavefunction is represented by values

ψj≈ψ(xj).\psi_j \approx \psi(x_j).

The continuum norm

∥ψ∥2=∫∣ψ(x)∣2 dx\lVert\psi\rVert^2 = \int \lvert\psi(x)\rvert^2\,dx

becomes a weighted sum

∥ψ∥h2=∑jwj∣ψj∣2.\lVert\psi\rVert_h^2 = \sum_j w_j\lvert\psi_j\rvert^2.

For a uniform grid with a simple rectangle rule, wj=hw_j=h for interior points. More accurate Numerical Quadrature rules use different weights. The weights are part of the discrete Hilbert-space structure, not decoration.

On a grid, multiplication by a potential is usually represented by a diagonal matrix:

(Vψ)j=V(xj)ψj.(V\psi)_j = V(x_j)\psi_j.

Derivative operators require an approximation. Finite Difference Methods owns the derivative-stencil details. For the one-dimensional Hamiltonian

H=−ℏ22md2dx2+V(x),H = - \frac{\hbar^2}{2m} \frac{d^2}{dx^2} + V(x),

a basic centered approximation gives

(Hhψ)j=−ℏ22mψj+1−2ψj+ψj−1h2+V(xj)ψj.(H_h\psi)_j = - \frac{\hbar^2}{2m} \frac{ \psi_{j+1}-2\psi_j+\psi_{j-1} }{h^2} + V(x_j)\psi_j.

This formula is a discretized operator, not the original operator. Its eigenvalues should approach the continuum eigenvalues only in an appropriate refinement limit and only for states resolved by the grid and domain.

Boundary Conditions Are Part of the Operator

Section titled “Boundary Conditions Are Part of the Operator”

The same differential expression can define different operators depending on boundary conditions. On a finite interval, examples include:

  • Dirichlet: ψ=0\psi=0 at the boundary;
  • Neumann: normal derivative vanishes at the boundary;
  • periodic: values and derivatives match across the endpoints;
  • absorbing or outgoing approximations for scattering problems.

Changing the boundary condition changes the discrete matrix and may change the spectrum. A finite box with Dirichlet boundaries is not the same physical problem as a particle on the line, although it may approximate localized bound states if the box is large enough.

The continuum background is Boundary Conditions.

Instead of sampling in position space, one may choose basis functions ϕn\phi_n and approximate

ψ≈∑n=0N−1cnϕn.\psi \approx \sum_{n=0}^{N-1} c_n\phi_n.

If the basis is orthonormal, the coefficients cnc_n are the coordinates of the truncated state. The Hamiltonian matrix is

Hmn=⟨ϕm,Hϕn⟩.H_{mn} = \langle \phi_m,H\phi_n\rangle.

Solving the finite matrix eigenproblem gives approximate energies and coefficients. This is the Rayleigh-Ritz idea behind many variational and Spectral Methods calculations.

If the basis is not orthonormal, the overlap matrix

Smn=⟨ϕm,ϕn⟩S_{mn} = \langle \phi_m,\phi_n\rangle

appears, and the eigenvalue problem becomes

Hc=ESc.Hc=ESc.

Near-linear dependence in the basis can make SS ill conditioned; see Conditioning and Stability.

Two common philosophies are:

MethodBasic idea
projection or Galerkinrequire the residual to be orthogonal to a finite test space
collocationrequire the equation to hold at selected points

Basis truncation is often projection-based. Grid methods often look like collocation, although finite-volume and finite-element methods add additional structures.

The distinction matters because it affects conservation laws, Hermiticity, variational bounds, and convergence. A method that gives a Hermitian matrix in the correct discrete inner product is usually easier to validate for closed-system quantum mechanics.

A grid cannot represent arbitrarily short wavelengths. On a uniform grid, the largest resolvable wavenumber is of order

kmax⁡∼πh.k_{\max} \sim \frac{\pi}{h}.

Features with wavelengths comparable to or smaller than the grid spacing are under-resolved and may alias into incorrect low-frequency behavior.

For quantum mechanics, this means that the grid spacing must resolve the shortest de Broglie wavelength relevant to the state, the potential, and the observable being measured. Low-energy bound states may converge while high-energy states on the same grid do not.

A finite numerical domain usually turns a continuum spectrum into a discrete set of levels. This is useful but must be interpreted carefully.

For a localized bound state, increasing the box size should leave the low-lying energy nearly unchanged once the wavefunction is negligible at the boundary. For a scattering state, box levels depend strongly on boundary conditions and box size; extracting physical phase shifts requires additional analysis.

Thus a finite-box spectrum is not automatically the spectrum of the original infinite-domain problem.

A discretized calculation can contain several distinct errors:

  • domain truncation error from replacing an infinite domain by a finite one;
  • grid or basis truncation error from finite resolution or finite NN;
  • quadrature error in inner products and matrix elements;
  • operator approximation error from replacing derivatives by finite formulas;
  • algebraic solver error from diagonalization or linear solves;
  • roundoff error from finite-precision arithmetic.

These errors may move in opposite directions. For example, a finer grid can reduce discretization error while increasing roundoff amplification in derivative formulas.

Convergence Tests explains how to vary grid spacing, domain size, basis size, and time step systematically. Error Estimates explains how to turn refinement behavior, residuals, and statistical uncertainty into an honest numerical error budget.

A numerical result should be tested under refinement. Typical checks include:

  • decrease grid spacing hh while holding the physical domain fixed;
  • increase the domain size while holding resolution fixed;
  • increase basis size NN;
  • compare different boundary placements;
  • verify normalization with the discrete inner product;
  • check matrix Hermiticity in the weighted inner product;
  • compare with an exactly solvable case.

When two refinements change the answer in different ways, vary them separately. A single calculation at one grid size cannot reveal its own discretization error.

The discrete inner product should approximate the continuum one:

⟨ϕ,ψ⟩h=∑jwjϕj∗ψj.\langle \phi,\psi\rangle_h = \sum_j w_j\phi_j^\ast\psi_j.

An operator matrix that looks symmetric under the ordinary Euclidean dot product may not be Hermitian under this weighted inner product if the weights are nonuniform. Conversely, a carefully constructed discretization may preserve Hermiticity in the correct weighted sense.

This matters because Hermiticity controls real eigenvalues, orthogonality, and unitary time evolution.

Before trusting a discretized quantum calculation, record:

  • the domain and boundary conditions;
  • the grid or basis definition;
  • the inner-product weights;
  • the operator approximation;
  • the units and scaling;
  • the refinement parameter;
  • the residual or convergence test used;
  • any symmetry or conservation law checked.

Discretization should be treated as part of the mathematical model. The finite problem is what the computer actually solves.

  • Normalizing grid wavefunctions with ∑j∣ψj∣2=1\sum_j \lvert\psi_j\rvert^2=1 when the quadrature weights are needed.
  • Forgetting that a finite box changes a continuum spectrum.
  • Comparing high-energy states before checking that the grid resolves their wavelength.
  • Treating a finite matrix Hamiltonian as automatically Hermitian in the correct inner product.
  • Refining grid spacing without also checking box-size effects.
  • Interpreting spurious boundary-localized states as physical states.
  • Reporting eigenvalues without saying how the continuum problem was discretized.
  • Mistaking agreement at one grid size for convergence.
  • J. M. Thijssen, Computational Physics, 2nd ed., Cambridge University Press, 2007.
  • T. Pang, An Introduction to Computational Physics, 2nd ed., Cambridge University Press, 2006.
  • R. J. LeVeque, Finite Difference Methods for Ordinary and Partial Differential Equations, SIAM, 2007.
  • L. N. Trefethen, Spectral Methods in MATLAB, SIAM, 2000.
  • S. C. Brenner and L. R. Scott, The Mathematical Theory of Finite Element Methods, 3rd ed., Springer, 2008.
  1. A normalized continuum wavefunction on a uniform grid is represented by samples ψj\psi_j. Why should the discrete normalization usually include a factor of hh?
Solution

The continuum normalization is

∫∣ψ(x)∣2 dx=1.\int \lvert\psi(x)\rvert^2\,dx=1.

On a uniform grid, the rectangle-rule approximation is

h∑j∣ψj∣2≈1.h\sum_j \lvert\psi_j\rvert^2\approx1.

The factor hh carries the length element. Omitting it changes the scale of the discrete vector and makes the normalization depend on the number of grid points.

  1. Explain why putting a free particle in a finite box with Dirichlet boundary conditions changes the spectrum.
Solution

On the infinite line, the free particle has a continuous momentum and energy spectrum. In a finite box with ψ=0\psi=0 at both endpoints, only standing waves fitting the box are allowed. The boundary condition quantizes the allowed wavelengths, so the spectrum becomes discrete. The box problem can approximate some aspects of the line problem, but it is not the same operator.

  1. In a nonorthogonal basis, derive why the finite eigenvalue problem has the form Hc=EScHc=ESc.
Solution

Approximate

ψ=∑ncnϕn.\psi=\sum_n c_n\phi_n.

The eigenvalue equation Hψ=EψH\psi=E\psi is projected against ϕm\phi_m:

⟨ϕm,H∑ncnϕn⟩=E⟨ϕm,∑ncnϕn⟩.\left\langle \phi_m, H\sum_n c_n\phi_n \right\rangle = E \left\langle \phi_m, \sum_n c_n\phi_n \right\rangle.

Thus

∑nHmncn=E∑nSmncn,\sum_n H_{mn}c_n = E\sum_n S_{mn}c_n,

where Hmn=⟨ϕm,Hϕn⟩H_{mn}=\langle\phi_m,H\phi_n\rangle and Smn=⟨ϕm,ϕn⟩S_{mn}=\langle\phi_m,\phi_n\rangle. In matrix form this is Hc=EScHc=ESc.

  1. A uniform grid has spacing hh. Why is a wave with wavelength much smaller than hh not reliably represented?
Solution

The grid samples the wave only at separated points. If the wave oscillates substantially between adjacent grid points, the samples do not determine its oscillation pattern. A uniform grid resolves wavenumbers only up to order π/h\pi/h, so wavelengths comparable to or smaller than hh are under-resolved and can alias into incorrect lower-frequency behavior.

  1. A bound-state energy changes when the box size is increased but hardly changes when the grid spacing is reduced. What error source is suggested?
Solution

The dominant error is likely domain truncation or boundary placement, not grid resolution. The grid is already fine enough for the chosen box, but the finite box is still affecting the state. One should increase the physical domain until the localized wavefunction is negligible near the boundary, then refine the grid again if needed.