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.
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.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.
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 loggingN - 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.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.
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})\]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.
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.
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.
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.
Evolve complex wavefunction arrays with explicit Hamiltonian, boundaries, normalization, and convergence checks.