A Byte of PhysicsLogo

Schrödinger equation numerically

The time-dependent Schrödinger equation says how a complex wavefunction changes. A numerical implementation turns a spatial continuum into an array, turns derivatives into stencils or matrices, and advances that array in small time increments. The important output is not only a pretty |ψ|² plot: it is a reproducible state plus evidence that the numerical method is behaving.

Think like a programmer

Split the solver into three pure layers: hamiltonian(psi, potential, grid), step(psi, dt), and probability(psi). Make grid spacing, boundary policy, time step, mass, potential, and integrator explicit inputs. Save diagnostics with each frame: probability norm, energy expectation when appropriate, maximum amplitude, and a refinement comparison.

Model checklist

Inputs
Complex initial samples ψ, potential V(x), mass, spatial step Δx, time step Δt, boundary policy, and integrator.
State
Real and imaginary amplitude arrays at the current time.
Rule
Approximate the Hamiltonian, then apply a norm-preserving or controlled approximate time update.
Output
Later complex state, probability density, and numerical diagnostics.
Check
The probability norm stays near one; halving Δt and Δx gives compatible results over the chosen interval.

For one nonrelativistic particle in one dimension,

\[i\hbar\frac{\partial\psi(x,t)}{\partial t}=\left[-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}+V(x)\right]\psi(x,t)=\hat H\psi(x,t)\]

The finite-difference kinetic term samples adjacent grid values:

\[\frac{\partial^2\psi}{\partial x^2}(x_j)\approx\frac{\psi_{j+1}-2\psi_j+\psi_{j-1}}{\Delta x^2}\]

That turns Ĥ into a matrix-like operator. A naive forward-Euler update is useful as a deliberately failing test fixture,

nextPsi = psi + (-i / hbar) * hamiltonian(psi) * dt;

but it is generally not unitary and can drift in norm. Do not hide that drift by normalizing every frame: doing so can conceal an unstable or inaccurate evolution. Prefer a method designed for unitary evolution, such as Crank–Nicolson, or explicitly report the error budget of a split-operator method.

The discrete probability test is

\[N=\sum_j |\psi_j|^2\Delta x\approx1\]

Use a tiny closed test case before a novel potential. For a free plane wave on a periodic grid, phase changes while |ψ|² is spatially constant. For an infinite well, compare stationary-state phase evolution with the analytic energy levels from the previous lesson. In both cases, run the same physical duration with smaller Δt and Δx; the output should converge rather than merely look smoother.

Try this experiment

Prediction: A method that is not norm-preserving will show a larger norm error when its time step is made larger, even if its curve initially looks plausible.

Imagine logging N - 1 after each step for two time steps, Δt and 2Δt, while holding total time fixed. Predict which trace has larger drift. Then list the information you would need before comparing two solver runs fairly.

Where this model breaks

A one-dimensional finite grid cannot capture every physical degree of freedom. Boundary reflections, aliasing, finite-domain truncation, and roundoff can dominate a result. The nonrelativistic one-particle equation omits spin, particle creation, many-body interactions, detector dynamics, and electromagnetic fields unless those terms are deliberately added.

Summary

Numerical quantum evolution is complex-array programming with unusually strict diagnostics. Keep the Hamiltonian, boundary policy, and integrator visible; track the norm; compare refinements; and treat a smooth animation as a hypothesis to test, not proof that the solver is correct.

Glossary

Self-check

  1. Why is forward Euler a useful warning but not a default quantum time stepper?
  2. What does the discrete norm sum test?
  3. Why should you compare runs at more than one Δt and Δx?

Sources

Model contract

Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.

\[\text{observable output} = f(\text{inputs},\,\text{state})\]
Inputs
Quantities you set or measure, with units and useful bounds.
State
Values the program must retain to reproduce the next result.
Rule
The relationship or update that turns inputs and state into a result.
Check
A known limit, unit check, invariant, or measured result that can expose a bad model.

Implement the idea as a model

For Schrödinger Equation Numerically, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Quantum Beginnings, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.

Guided experiment

Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.

Where this model breaks

This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.

Summary

Treat Schrödinger Equation Numerically as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.

Glossary

  • Input: a measured value or chosen parameter supplied to a model.
  • State: the smallest set of values needed to continue or reproduce a model.
  • Validation: comparing an output with a known result, limit, invariant, or measurement.

Self-check

  1. Which values are inputs, and which values must remain state?
  2. What observable result would tell you the model is behaving as expected?
  3. Which assumption would you test first before applying the model to a real system?

Model review: turn Schrödinger Equation Numerically into a test

Evolve complex wavefunction arrays with explicit Hamiltonian, boundaries, normalization, and convergence checks.

  1. Name the inputs and units that the quantum beginnings model needs.
  2. Separate the state you must keep from values you can calculate when needed.
  3. Write one rule that maps the current state and inputs to an observable result.
  4. Choose a limiting case, unit check, invariant, or known result before trusting an output.
  5. State one assumption you would change before using this simplified model for a real decision.

Share to: