This simulation launches two Gaussian quantum wave packets toward each other inside a one-dimensional box and evolves them by solving the time-dependent Schrödinger equation with the split-operator (Fourier) method. With no potential present, each packet propagates and spreads freely; when they overlap you see the probability density |ψ|² develop the characteristic bright-and-dark fringes of constructive and destructive interference, and you can optionally display the real and imaginary parts of the wavefunction.
Interference of matter waves is one of the deepest features of quantum mechanics, captured by the superposition principle: a particle can exist in a sum of states whose amplitudes add and cancel. The same physics underlies electron diffraction, atom interferometry, neutron interferometers and the precision measurements used in quantum sensing and matter-wave technology.
What is a quantum wave packet?
A wave packet is a localised bundle of waves that represents a quantum particle with a fairly well-defined position and momentum. Here each packet is a Gaussian envelope multiplied by a plane wave; its central wavenumber k sets how fast and in which direction it moves.
What does the interference pattern show?
When the two packets overlap, their complex amplitudes add. Where they are in phase the probability density grows (constructive interference) and where they are out of phase it drops toward zero (destructive interference), producing a fringed pattern in |ψ|² that is the hallmark of quantum superposition.
What numerical method does the simulation use?
It uses the split-operator (or split-step Fourier) method. The kinetic-energy part of the evolution is applied in momentum space using a fast Fourier transform, which makes the integrator fast, stable and accurate for the free-particle Schrödinger equation modelled here.
They set the wavenumber (and hence momentum and direction) of each packet. Positive k moves a packet to the right and negative k to the left, so opposite signs send the packets toward each other to collide and interfere, while equal values make them travel together.
Sigma sets the spatial width of each Gaussian packet. A narrow packet has a well-defined position but a broad spread of momenta and disperses quickly; a wide packet is more monochromatic and holds together longer, in line with the Heisenberg uncertainty principle.
A localised wave packet is built from a range of momentum components that travel at slightly different speeds. This dispersion causes the packet to broaden as it propagates, even with no forces acting — a purely quantum-kinematic effect of the Schrödinger equation.
It plots the real and imaginary parts of the wavefunction ψ in addition to the probability density |ψ|². These oscillating components reveal the underlying phase that drives interference, which the |ψ|² curve alone hides.
Norm is the total integrated probability, which should stay close to 1 because the particle must be found somewhere. Watching it confirms the simulation conserves probability; a slow decrease reflects the absorbing edges that emulate the walls of the box.
The simulation applies a smooth absorbing boundary near each edge. This soaks up the wavefunction before it wraps around (an artefact of the Fourier method), approximating a particle that leaves the visible region rather than reflecting unphysically.
Matter-wave interference has been demonstrated with electrons, neutrons, atoms and even large molecules. It is the basis of atom interferometers and quantum sensors that measure gravity, rotation and time with extraordinary precision, all relying on the same superposition principle shown here.