How it works
The wavefunction ψ lives on a 512 × 512 grid on the GPU. Every step applies the
split-step Fourier method: rotate the phase by the potential, FFT into momentum space,
rotate the phase by the kinetic energy, FFT back, and rotate by the potential again.
Each piece is an exact phase rotation, so probability is conserved and the method never blows up.
Brightness is the probability density |ψ|². In Phase mode the hue shows the complex phase
of ψ, which is where the wave crests and interference fringes come from.
Measure samples a position from |ψ|² and collapses the wavefunction there.