Lecture note · Fig. 14 · quantum mechanics
A wave packet meets a sphere: the Schrödinger equation in three dimensions
Numa Koudsie · for readers meeting quantum mechanics for the first time, from school to the second year of university
01A ball, a wall and a pillar
Throw a tennis ball at a garden wall and it comes straight back. Watch a swell roll into a harbour and meet a stone pillar standing in the water: the wave is not thrown back as a whole. It wraps round the pillar, and a few pillar-widths behind it the crests have closed up again as if the pillar were hardly there.
These are the two pictures of motion that classical physics offers. A ball is at one place at a time and follows one path; whether it gets over an obstacle is decided by its energy. A wave is spread out, it is partly reflected and partly bent round an obstacle, and how much of each happens depends on how the size of the obstacle compares with the wavelength. Quantum mechanics says that an electron, a proton or an atom is neither of these and borrows from both. It is described by a wave, and the strength of that wave at a place tells us how likely we are to find the particle there when we look. The particle is always found whole, like a ball; but where it is found is decided by a wave, which can reflect, bend and interfere.
The figure above follows such a wave. A particle, spread out as a small cloud called a wave packet, flies along the \(x\) axis towards a sphere. Inside the sphere the particle's potential energy is raised by a fixed amount, as if the sphere were a round hill with a flat top and steep sides. With the page's default settings the particle does not have enough energy to climb onto that hill. A classical ball aimed at it would bounce off. In the one-dimensional problem of every textbook, where the hill is a wall across the whole path, the wave would be reflected almost completely: we will find that a wave of exactly the packet's mean energy gets through only 2.5 times in ten million, and that the whole packet, whose energies are spread a little, gets through 4 % of the time. Yet at the end of the stored run 63 % of the probability lies ahead of the sphere, 24 % behind it, and 12 % still beside it. This note explains why, and how the computer found these numbers.
02The model
2.1The wave function and its equation
The state of one particle is described by a complex number at every point \(\mathbf r = (x, y, z)\) of space and every time \(t\), the wave function \(\psi(\mathbf r, t)\). A complex number has a size and an angle, \(\psi = |\psi|\,e^{i\varphi}\). The size tells us where the particle is likely to be; the angle \(\varphi\), called the phase, is what lets two parts of the wave add up or cancel when they meet. The rule that connects the wave to what we observe is Born's rule: the probability of finding the particle inside a region \(\Omega\) is
\[ P_\Omega(t) = \int_\Omega |\psi(\mathbf r, t)|^2 \, \mathrm{d}^3 r , \qquad \int_{\text{all space}} |\psi|^2\,\mathrm{d}^3 r = 1 . \tag{1} \]The second statement, the normalisation, says that the particle is certainly somewhere. The quantity \(|\psi|^2\) is a probability density: probability per unit volume.
How the wave changes in time is fixed by the time-dependent Schrödinger equation,
\[ i\hbar\,\frac{\partial\psi}{\partial t} = -\frac{\hbar^2}{2m}\,\nabla^2\psi + V(\mathbf r)\,\psi . \tag{2} \]Here \(m\) is the particle's mass, \(\hbar = 1.054\,6\times10^{-34}\ \mathrm{J\,s}\) is Planck's constant divided by \(2\pi\), \(V(\mathbf r)\) is the potential energy the particle would have at \(\mathbf r\), and \(\nabla^2 = \partial^2/\partial x^2 + \partial^2/\partial y^2 + \partial^2/\partial z^2\) is the Laplacian, which measures how much \(\psi\) at a point differs from its average over the neighbourhood. The right-hand side is the total energy acting on the wave: the first term is the kinetic energy and the second the potential energy. We will see in section 3 why the kinetic energy takes this form. Equation (2) cannot be derived from older physics; it is the basic law of non-relativistic quantum mechanics, in the same way as Newton's second law is the basic law of classical mechanics, and it is tested by every atom whose spectrum it predicts.
Two properties of (2) matter for everything that follows. It is linear: if \(\psi_1\) and \(\psi_2\) are solutions, so is any sum \(c_1\psi_1 + c_2\psi_2\). Waves therefore pass through each other and add, which is the origin of interference. And it keeps the normalisation (1): the total probability that is 1 at the start stays 1 for ever. Probability can flow from one region to another, but it is never created or destroyed. In section 6 we will see the numerical method inherit this property exactly.
2.2The sphere and the units
The obstacle is a sphere of radius \(R\) centred at the origin, inside which the potential energy is raised by \(V_0\):
\[ V(\mathbf r) = \begin{cases} V_0, & |\mathbf r| < R, \\ 0, & |\mathbf r| \ge R. \end{cases} \tag{3} \]We measure lengths in a unit \(a\) of our choosing, the grid unit, and choose units of time and energy so that \(\hbar = 1\) and \(m = 1\). The unit of time is then \(m a^2/\hbar\) and the unit of energy \(\hbar^2/(m a^2)\). Every number on the page is in these units, and (2) becomes
\[ i\,\frac{\partial\psi}{\partial t} = -\frac{1}{2}\,\nabla^2\psi + V(\mathbf r)\,\psi . \tag{4} \]Nothing is lost by this choice. The equation looks the same for every particle and every size of sphere; only the meaning of one unit changes.
Take an electron, \(m = 9.109\times10^{-31}\ \mathrm{kg}\), and let one grid unit be \(a = 0.1\ \mathrm{nm}\), about the radius of an atom. The unit of energy is \(\hbar^2/(m a^2) = 7.62\ \mathrm{eV}\) and the unit of time \(m a^2/\hbar = 8.64\times10^{-17}\ \mathrm{s}\). The default packet energy \(E = 2.5\) is then \(19.0\ \mathrm{eV}\) and the default barrier \(V_0 = 3\) is \(22.9\ \mathrm{eV}\). The sphere of radius \(4\,a\) is \(0.4\ \mathrm{nm}\) across its radius, and the whole stored run, \(t = 13.16\), lasts \(1.14\times10^{-15}\ \mathrm{s}\), about one femtosecond. These are the scales of an electron scattering from an atom or a small molecule.
2.3The starting packet
At \(t = 0\) the particle is a Gaussian wave packet centred at \((x_0, 0, 0)\):
\[ \psi(\mathbf r, 0) = \left(2\pi\sigma_0^2\right)^{-3/4} \exp\!\left[-\frac{(x - x_0)^2 + y^2 + z^2}{4\sigma_0^2} + i k_0 x\right] . \tag{5} \]Read it in two parts. The real exponential is a bell shape: \(|\psi|^2\) falls off as \(e^{-(x-x_0)^2/(2\sigma_0^2)}\) along each axis, so \(\sigma_0\) is the standard deviation of the particle's position, its width. The factor \(e^{i k_0 x}\) has size 1 and only turns the phase, by one full turn every \(2\pi/k_0\) along \(x\). That turning phase is what makes the packet move, as section 3 will show; \(k_0\) is called the mean wave number. The number in front makes the total probability exactly 1. The page sets \(x_0 = -14\,a\), \(\sigma_0 = 3\,a\) and \(k_0 = \sqrt{2E}\), where \(E\) is the packet energy chosen with the slider (we will see in section 3 where the square root comes from).
Table 1 collects the page's parameters and the combinations of them that decide what happens. Each of these combinations is a pure number, independent of the units, and each will appear in the following sections.
| quantity | symbol | on the page | default |
|---|---|---|---|
| packet energy | \(E\) | 0.5 to 4.5 in steps of 0.5 | 2.5 |
| barrier height | \(V_0\) | 0, 0.5, 1, 1.5, 2, 3, 4, 6, 8 | 3 |
| sphere radius | \(R\) | 2, 3, 4, 5, 6 | 4 |
| packet width, start | \(\sigma_0,\ x_0\) | 3, −14 | 3, −14 |
| mean wave number | \(k_0 = \sqrt{2E}\) | 1 to 3 | 2.236 |
| wavelength | \(\lambda = 2\pi/k_0\) | 6.28 to 2.09 | 2.81 |
| phase turns across the packet | \(k_0\sigma_0\) | 3 to 9 | 6.71 |
| sphere against wavelength | \(k_0 R\) | 2 to 18 | 8.94 |
| sphere against packet | \(R/\sigma_0\) | 0.67 to 2 | 1.33 |
| energy against barrier | \(E/V_0\) | 0.06 to ∞ | 0.83 |
Table 1. The page's parameters in the units \(\hbar = m = 1\), lengths in \(a\). The 405 combinations of \(E\), \(V_0\) and \(R\) are all computed and stored (section 8).
03A packet in free flight
Before the packet meets the sphere it flies through empty space, \(V = 0\). This free flight already shows the two facts that make a quantum particle different from a ball: its wave moves at one speed while its crests move at another, and it spreads.
3.1Plane waves
The simplest solution of (4) with \(V = 0\) is a plane wave running along \(x\), \(\psi = e^{i(kx - \omega t)}\), with a wave number \(k\) and an angular frequency \(\omega\) still to be related. Its time derivative is \(\partial\psi/\partial t = -i\omega\psi\), so the left side of (4) is \(i(-i\omega)\psi = \omega\psi\). Its second space derivative is \(\partial^2\psi/\partial x^2 = (ik)^2\psi = -k^2\psi\), so the right side is \(-\tfrac12(-k^2)\psi = \tfrac12 k^2\psi\). The two sides agree if
\[ \omega = \tfrac12 k^2 \qquad\text{or, with the units restored,}\qquad \hbar\omega = \frac{(\hbar k)^2}{2m} . \tag{6} \]This relation between frequency and wave number is called the dispersion relation. With de Broglie's identification of momentum \(p = \hbar k\) and Planck's identification of energy \(E = \hbar\omega\), the second form of (6) is simply \(E = p^2/(2m)\), the kinetic energy of a free particle. That is why the kinetic term in (2) has the form it has, and it is why the page sets \(k_0 = \sqrt{2E}\): in our units a plane wave of energy \(E\) has \(k = \sqrt{2E}\).
A plane wave has the same size everywhere, so by (1) it describes a particle that could be anywhere: it cannot be normalised. A particle that starts in a definite region must be a sum of many plane waves with nearby wave numbers, arranged to add up in that region and cancel elsewhere. That sum is the wave packet.
3.2The packet as a sum of plane waves
Along \(x\) the packet (5) is a sum of plane waves, which we write as a Fourier integral,
\[ \psi(x, 0) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} \phi(k)\,e^{ikx}\,\mathrm{d}k, \qquad |\phi(k)|^2 = \sqrt{\frac{2\sigma_0^2}{\pi}}\;e^{-2\sigma_0^2 (k-k_0)^2} . \tag{7} \]The weight \(\phi(k)\) of each wave number is the Fourier transform of \(\psi(x,0)\); for a Gaussian it is again a Gaussian (Problem 10.1 asks you to check this). The weights are centred on \(k_0\), and comparing the exponent with \(e^{-(k-k_0)^2/(2\sigma_k^2)}\) gives the spread of wave numbers \(\sigma_k = 1/(2\sigma_0)\). So
\[ \sigma_x\,\sigma_k = \sigma_0 \cdot \frac{1}{2\sigma_0} = \frac12 , \tag{8} \]and, with \(p = \hbar k\), \(\sigma_x\sigma_p = \hbar/2\). This is the smallest product that Heisenberg's uncertainty relation allows: a narrow packet needs a wide range of wave numbers, and a sharp wave number needs a long packet. In the \(y\) and \(z\) directions the packet has no \(e^{ik_0 x}\) factor, so there the wave numbers are centred on zero with the same spread \(1/(2\sigma_0)\).
The spread of wave numbers is a spread of energies. The mean of \(k_x^2\) over (7) is \(k_0^2 + \sigma_k^2\), and the means of \(k_y^2\) and \(k_z^2\) are \(\sigma_k^2\) each, so the mean energy of the packet is
\[ \langle E \rangle = \tfrac12\left(k_0^2 + 3\sigma_k^2\right) = \frac{k_0^2}{2} + \frac{3}{8\sigma_0^2} . \tag{9} \]The slider's \(E = k_0^2/2\) is therefore the mean kinetic energy of the motion along \(x\); the true mean energy is larger by \(3/(8\sigma_0^2) = 0.042\). (We checked (9) on the page's own grid: the Fourier transform of the starting packet gives \(\langle k^2\rangle/2 = 2.541\,667\) for \(E = 2.5\).) More important than this small shift is the width of the energy distribution along \(x\): roughly \(k_0\sigma_k\), which is 0.37 for the default packet. Part of the packet carries more energy than the average and part less, and near a barrier that matters, as we will see in section 5.
3.3How the packet moves and spreads★
Each plane wave in (7) evolves on its own, because the equation is linear and the plane waves are solutions: the wave with wave number \(k\) simply acquires the factor \(e^{-i\omega t} = e^{-ik^2 t/2}\). So
\[ \psi(x,t) = \frac{1}{\sqrt{2\pi}}\int \phi(k)\,e^{i(kx - k^2 t/2)}\,\mathrm{d}k . \tag{10} \]We write \(k = k_0 + q\) and expand the exponent: \(kx - k^2t/2 = (k_0x - k_0^2t/2) + q(x - k_0 t) - q^2 t/2\). The first bracket does not depend on \(q\) and comes out of the integral as a phase. Taking \(x_0 = 0\) for brevity, \(\phi \propto e^{-\sigma_0^2 q^2}\), and what remains is
\[ \psi(x,t) \propto \int e^{-\alpha q^2 + i\beta q}\,\mathrm{d}q = \sqrt{\frac{\pi}{\alpha}}\;e^{-\beta^2/(4\alpha)}, \qquad \alpha = \sigma_0^2 + \frac{it}{2} = \sigma_0^2(1 + i\tau),\quad \beta = x - k_0 t , \]where \(\tau = t/(2\sigma_0^2)\), and we used the Gaussian integral obtained by completing the square in \(q\). The probability density is the square of the size: \(|e^{-\beta^2/(4\alpha)}|^2 = e^{-\beta^2\,\mathrm{Re}(1/\alpha)/2}\). Multiplying top and bottom of \(1/\alpha\) by the complex conjugate \(\sigma_0^2(1 - i\tau)\) gives \(\mathrm{Re}(1/\alpha) = 1/[\sigma_0^2(1 + \tau^2)]\), so
\[ |\psi(x,t)|^2 \propto \exp\!\left[-\frac{(x - k_0 t)^2}{2\sigma_0^2(1+\tau^2)}\right] . \]This is again a Gaussian. Its centre has moved to \(x = k_0 t\), and its width has grown to \(\sigma_0\sqrt{1+\tau^2}\). (We checked with SymPy that the closed-form \(\psi(x,t)\) satisfies (4) and that its variance is \(\sigma_0^2 + t^2/(4\sigma_0^2)\).) The same calculation in \(y\) and \(z\), with \(k_0 = 0\), gives the same width and no motion.
A free Gaussian packet keeps its Gaussian shape. Its centre moves with the group velocity \(v_g = \mathrm{d}\omega/\mathrm{d}k = k_0\) (with units, \(\hbar k_0/m = p/m\), the classical velocity), and its width grows as
\[ \sigma(t) = \sigma_0\sqrt{1 + \left(\frac{t}{2\sigma_0^2}\right)^{2}} \qquad\text{in every direction.} \tag{11} \]The crests inside the packet move at the phase velocity \(\omega/k_0 = k_0/2\), half as fast: the packet overtakes them, so they appear at its front, drift backwards through it and fade at its back. (Deep-water waves on the sea do the opposite: there the crests move twice as fast as the group.)
The packet spreads because its waves have different wave numbers, and by (6) different wave numbers travel at different speeds: the fast components run ahead and the slow ones fall behind. The spreading is slow at first, because \(\sqrt{1+\tau^2} \approx 1 + \tau^2/2\) for small \(\tau\), and becomes a steady growth at the rate \(\sigma_k = 1/(2\sigma_0)\) once \(t\) exceeds the spreading time \(2\sigma_0^2\). A narrow packet has a wide spread of wave numbers and spreads fast; a wide one spreads slowly. In the limit \(\sigma_0\to\infty\) we recover the plane wave, which never changes shape.
For \(E = 2.5\), \(k_0 = \sqrt5 = 2.236\) per \(a\), the wavelength is \(\lambda = 2\pi/k_0 = 2.81\,a\), and the packet moves at \(2.236\,a\) per unit time. The spreading time is \(2\sigma_0^2 = 18\). The stored run lasts \(t = 13.16\), so the packet travels \(29.4\,a\), from \(x = -14\) to \(x = 15.4\), and by (11) its width grows from 3 to \(3\sqrt{1 + (13.16/18)^2} = 3.716\,a\). In the stored run without the sphere (\(V_0 = 0\)) the measured width across the flight, \(\sigma_y\), is \(3.7163\,a\) at the end, the same to four digits (the file stores 3.716324, the formula gives 3.716277). Over all 45 stored runs with \(V_0 = 0\), \(\sigma_y\) follows (11) to within \(9.4\times10^{-5}\,a\) at every frame. A slow packet takes longer: for \(E = 0.5\) the run lasts \(t = 29.61\) and the width reaches \(5.78\,a\).
04A wall in one dimension
Before the sphere, we solve the problem every quantum mechanics course solves first: a wall of height \(V_0\) and thickness \(d\) across the whole path, so that nothing can go round it. Everything then depends on \(x\) alone. We look for waves of one definite energy \(E\), of the form \(\psi(x,t) = u(x)\,e^{-iEt}\). Putting this into (4), the time derivative brings down \(-iE\) and we are left with the time-independent Schrödinger equation,
\[ -\tfrac12\,u''(x) + V(x)\,u(x) = E\,u(x), \qquad\text{that is,}\qquad u'' = -2\,(E - V)\,u . \tag{12} \]4.1Inside the wall: the evanescent wave
Where \(V\) is constant, (12) is the equation of a simple harmonic oscillator in space when \(E > V\), and its solutions are \(e^{\pm i k' x}\) with \(k' = \sqrt{2(E - V)}\): waves, shorter where the particle is faster. When \(E < V\) the sign flips, \(u'' = +\kappa^2 u\) with
\[ \kappa = \sqrt{2\,(V_0 - E)} , \tag{13} \]and the solutions are the growing and decaying exponentials \(e^{\pm\kappa x}\). A classical particle with \(E < V_0\) can never be inside the wall: its kinetic energy would be negative. The wave, though, does not stop at the face of the wall. It enters as \(e^{-\kappa x}\), shrinking by the factor \(e\) every \(1/\kappa\), and its probability density shrinks twice as fast. Such a wave, which does not oscillate and only fades, is called evanescent. The distance \(1/\kappa\) is the penetration depth.
Two conditions join the pieces of \(u\) at a face of the wall. The function \(u\) is continuous, because a jump would make \(u''\) infinitely large. Its slope \(u'\) is continuous too: integrating (12) across the face over a tiny width, the left side changes by the jump of \(u'\), while the right side, \(-2(E-V)u\), is finite and contributes nothing as the width shrinks to zero. A jump in the potential produces only a jump in the curvature \(u''\).
4.2Through the wall★
Let the wall occupy \(0 < x < d\) and let a wave of wave number \(k = \sqrt{2E}\) arrive from the left. On the left there is the incoming wave and a reflected one, inside the two exponentials, on the right only a transmitted wave:
\[ u(x) = \begin{cases} e^{ikx} + r\,e^{-ikx}, & x < 0, \\ C\,e^{\kappa x} + D\,e^{-\kappa x}, & 0 < x < d, \\ t\,e^{ikx}, & x > d. \end{cases} \]Continuity of \(u\) and \(u'\) at \(x = 0\) and at \(x = d\) gives four equations for the four unknowns \(r, C, D, t\):
\[ 1 + r = C + D, \quad ik(1 - r) = \kappa(C - D), \quad C e^{\kappa d} + D e^{-\kappa d} = t\,e^{ikd}, \quad \kappa\left(C e^{\kappa d} - D e^{-\kappa d}\right) = ik\,t\,e^{ikd} . \]The last two give \(C\) and \(D\) in terms of \(t\): adding and subtracting them, \(C = \tfrac12 t\,e^{ikd}(1 + ik/\kappa)\,e^{-\kappa d}\) and \(D = \tfrac12 t\,e^{ikd}(1 - ik/\kappa)\,e^{\kappa d}\). From the first two we remove \(r\): the first gives \(1 - r = 2 - C - D\), and the second becomes \(2ik = (\kappa + ik)C - (\kappa - ik)D\). Inserting \(C\) and \(D\),
\[ 2ik = \frac{t\,e^{ikd}}{2\kappa}\left[(\kappa + ik)^2 e^{-\kappa d} - (\kappa - ik)^2 e^{\kappa d}\right] = \frac{t\,e^{ikd}}{\kappa}\left[2ik\kappa\cosh\kappa d - (\kappa^2 - k^2)\sinh\kappa d\right] , \]where we expanded \((\kappa \pm ik)^2 = \kappa^2 - k^2 \pm 2ik\kappa\) and collected \(e^{\pm\kappa d}\) into \(\cosh\) and \(\sinh\). The transmission probability is \(T = |t|^2\), because the transmitted wave has the same wave number, and so the same speed, as the incoming one. Taking the square of the size and using \(\cosh^2 = 1 + \sinh^2\),
\[ T = \frac{4k^2\kappa^2}{4k^2\kappa^2 + (\kappa^2 + k^2)^2\sinh^2\kappa d} . \]Finally \(\kappa^2 + k^2 = 2V_0\) and \(4k^2\kappa^2 = 16E(V_0 - E)\). For \(E > V_0\) the same algebra holds with \(\kappa\) replaced by \(ik'\), and \(\sinh(ik'd) = i\sin k'd\). (Both branches were checked against a direct numerical solution of the four matching equations and against the page's own function T1D; they agree to all printed digits.)
A wave of energy \(E\) meeting a wall of height \(V_0\) and thickness \(d\) gets through with probability
\[ T = \left[1 + \frac{V_0^2\,\sinh^2(\kappa d)}{4E\,(V_0 - E)}\right]^{-1}\ (E < V_0), \qquad T = \left[1 + \frac{V_0^2\,\sin^2(k' d)}{4E\,(E - V_0)}\right]^{-1}\ (E > V_0), \tag{14} \]with \(\kappa = \sqrt{2(V_0 - E)}\) and \(k' = \sqrt{2(E - V_0)}\). For a thick wall, \(\kappa d \gg 1\), \(\sinh\kappa d \approx \tfrac12 e^{\kappa d}\) and \(T \approx \dfrac{16E(V_0-E)}{V_0^2}\,e^{-2\kappa d}\): passing through the wall, called tunnelling, falls off exponentially with the wall's thickness measured in penetration depths. Above the barrier, \(T\) is less than 1, except when a whole number of half-wavelengths fits into the wall, \(k'd = n\pi\).
Two limits check (14). When \(V_0 \to 0\), the fraction in the bracket vanishes and \(T \to 1\): no wall, no reflection. When \(E\) approaches \(V_0\) from either side, both branches tend to \(T = 1/(1 + V_0 d^2/2)\), which is what the page's code uses at \(E = V_0\) exactly. Note also that \(T < 1\) for \(E\) above the barrier: a classical ball with enough energy always passes, but a wave is partly reflected at every sudden change of the medium, as light is partly reflected by a window pane.
The readout "Guide: 1D slab of thickness 2R" evaluates (14) with \(d = 2R\), the thickness of the sphere along its centre line. With the defaults, \(E = 2.5\), \(V_0 = 3\): \(\kappa = \sqrt{2\times0.5} = 1\) per \(a\), so the penetration depth is \(1\,a\), two grid points. The slab is \(d = 8\,a\) thick, eight penetration depths, and \(\sinh 8 = 1490\), so \(T = [1 + 9\times1490^2/(4\times2.5\times0.5)]^{-1} = 2.50\times10^{-7}\). The thick-wall formula gives \(2.22\times e^{-16} = 2.50\times10^{-7}\) as well. Searching all the page's combinations with \(E < V_0\), the largest value of (14) is \(1.34\times10^{-3}\), for \(E = 0.5\), \(V_0 = 1\), \(R = 2\). Above the barrier, \(E = 4.5\), \(V_0 = 4\), \(R = 2\) gives \(k' = 1\), \(k'd = 4\), \(\sin^2 4 = 0.573\) and \(T = 0.495\): half the wave reflected although the particle has energy to spare.
05A sphere in three dimensions
If (14) were the whole story, the figure would show the packet bouncing back almost entirely for every \(E < V_0\). It does not. With the defaults, 63 % of the probability ends up ahead of the sphere, against \(2.5\times10^{-7}\) for a plane wave of the packet's mean energy through the slab, and 0.041 for the whole packet through the slab, by (24) of section 9.1 (the 11 % of the packet with more energy than \(V_0\) carries most of that). The difference is not a subtle quantum effect. It is geometry: the packet is about as wide as the sphere, and a sphere, unlike a wall across the whole path, can be passed on the side.
5.1What a classical ball would do
We first ask what a cloud of classical balls with the same spread of positions and velocities as the packet would do. Two numbers come from geometry alone. Across the flight, the packet's probability density is \(\frac{1}{2\pi\sigma_0^2}e^{-\rho^2/(2\sigma_0^2)}\), where \(\rho = \sqrt{y^2+z^2}\) is the distance from the axis. A ball hits the sphere only if its impact parameter, the distance \(b\) of its line of flight from the centre, is less than \(R\). Integrating the density over the disc \(\rho < R\) with the area element \(2\pi\rho\,\mathrm{d}\rho\),
\[ f_\text{aimed} = \int_0^R \frac{e^{-\rho^2/(2\sigma_0^2)}}{2\pi\sigma_0^2}\,2\pi\rho\,\mathrm{d}\rho = 1 - e^{-R^2/(2\sigma_0^2)} . \tag{15} \]For \(R = 4\) this is 0.589: four balls in ten miss the sphere altogether. Those that hit it are reflected like light from a polished ball. A ball arriving with impact parameter \(b\) meets the surface where the normal makes the angle \(\alpha\) with the line of flight, \(\sin\alpha = b/R\). The angle of reflection equals the angle of incidence, so the ball is turned through
\[ \theta = \pi - 2\alpha = \pi - 2\arcsin(b/R) . \tag{16} \]A head-on ball, \(b = 0\), comes straight back, \(\theta = \pi\). A grazing ball, \(b \to R\), is hardly deflected. The ball moves backwards, \(\theta > \pi/2\), only if \(\alpha < \pi/4\), that is, \(b < R/\sqrt2\). By (15) with \(R\) replaced by \(R/\sqrt2\), the fraction sent backwards is \(1 - e^{-R^2/(4\sigma_0^2)} = 0.359\) for \(R = 4\). Most balls that hit the sphere glance off sideways or forwards.
To compare with the computed wave in full we followed 400 000 classical balls. For a Gaussian packet this comparison is fair: positions are drawn with the spread \(\sigma_0\) around \((x_0, 0, 0)\) and wave numbers with the spread \(1/(2\sigma_0)\) around \((k_0, 0, 0)\), which is exactly the distribution of position and momentum that (5) describes. Each ball flies straight; at the sphere's surface it keeps the part of its momentum along the surface and enters if the part along the normal carries more kinetic energy than \(V_0\), slowing and bending like light entering glass, or is reflected otherwise. We counted the balls in the three slabs at the end time of the stored run.
5.2What the wave does
Figure 2 shows the default run in four acts. Until \(t \approx 3\) the packet approaches and the probability behind stays near 1. Between \(t \approx 3\) and \(t \approx 7\) it reaches the sphere: the slab of the sphere holds up to 0.76 of the probability at \(t = 6.16\). The probability behind falls to its lowest value, 0.18, at \(t = 7.0\), and then rises again to 0.24 as the reflected wave travels back across \(x = -R\). Meanwhile the probability ahead overtakes the probability behind at \(t = 7.84\) and settles at 0.63. At the end, 0.126 is still in the slab of the sphere: these are the parts of the wave deflected sideways, which travel in \(y\) and \(z\) and so stay between \(x = -R\) and \(x = R\). Note that the slab "inside" is \(|x| \le R\) across the whole box, not the sphere itself.
| \(E,\ V_0,\ R\) | behind, classical | behind, quantum | ahead, classical | ahead, quantum | 1D slab \(T\) |
|---|---|---|---|---|---|
| 2.5, 3, 4 (default) | 0.312 | 0.239 | 0.577 | 0.631 | \(2.5\times10^{-7}\) |
| 2.5, 8, 4 | 0.316 | 0.277 | 0.577 | 0.597 | \(3\times10^{-23}\) |
| 2.5, 8, 2 | 0.093 | 0.084 | 0.886 | 0.897 | \(1\times10^{-11}\) |
| 2.5, 8, 6 | 0.570 | 0.458 | 0.253 | 0.256 | \(9\times10^{-35}\) |
| 4.5, 4, 2 | 0.075 | 0.049 | 0.899 | 0.930 | 0.495 |
Table 2. End of the stored run: probability behind and ahead of the sphere for 400 000 classical balls drawn from the packet's own spread, for the stored quantum runs (from the whole three-dimensional \(\psi\)), and the one-dimensional slab formula (14) with \(d = 2R\). Classical counts include balls that have flown into the border region; the quantum values exclude what the border has absorbed (0.07 % to 6.9 % here, section 7).
Table 2 and Figure 3 compare the three descriptions. The one-dimensional slab is wrong by orders of magnitude, because it forbids the side roads. The classical cloud is close, which tells us that at these sizes, with the sphere a few wavelengths across, most of the answer is the geometry of section 5.1. The differences between the wave and the balls are the quantum part of the story, and they have a clear pattern: the wave sends less backwards and more ahead than the balls, by 0.07 and 0.05 in the default run. The reason is the harbour pillar of section 1. A wave that passes an obstacle bends into its shadow, by an angle of order \(\lambda/(2R)\), which is \(2.81/8 = 0.35\) rad, about 20°, in the default run. Behind a sphere the balls leave a sharp empty shadow; the wave fills part of it in. The bending is stronger for longer wavelengths and smaller spheres, and it vanishes in the limit \(\lambda \ll R\), where the wave behaves like the balls.
Figure 3 shows a second quantum effect near \(V_0 = E\). For the balls, raising \(V_0\) above \(E\) changes almost nothing, because a ball with \(E < V_0\) is reflected whatever the height. For the wave, the probability behind keeps growing with \(V_0\): with \(R = 4\) it is 0.239 at \(V_0 = 3\) and 0.277 at \(V_0 = 8\). A low barrier is soft for the wave: the penetration depth \(1/\kappa\) is \(1\,a\) at \(V_0 = 3\) but \(0.30\,a\) at \(V_0 = 8\), and the packet's spread of energies (section 3.2) means that 11 % of the default packet has more energy than \(V_0 = 3\). (This fraction is the probability that \(|\mathbf k|^2/2 > V_0\) for the Gaussian distribution of wave numbers, 0.113, computed exactly from the non-central \(\chi^2\) distribution.) Only for very high walls does the wave approach the hard-sphere answer from below.
For a packet about as wide as the sphere, the outcome is decided first by geometry: the fraction aimed at the sphere, \(1 - e^{-R^2/(2\sigma_0^2)}\), and the angle at which it meets the curved surface, (16). Tunnelling through the sphere is negligible for every stored run with \(E < V_0\) (at most \(1.3\times10^{-3}\) even for the flat slab). The wave differs from classical balls by bending into the sphere's shadow, which sends more ahead and less behind, and by the softness of a barrier close to its energy.
With \(R = 4\) and \(\sigma_0 = 3\): by (15), 58.9 % of the packet is aimed at the sphere, and by (16) a hard sphere would send 35.9 % backwards. The classical cloud, counted in slabs at \(t = 13.16\), gives 31.2 % behind, 57.7 % ahead and 11.1 % beside the sphere; the backward fraction is lower than 35.9 % because balls turned through just over 90° move back slowly and have not all crossed \(x = -R\) by the end. The stored quantum run gives 23.9 % behind, 63.1 % ahead, 12.6 % beside and 0.4 % absorbed by the border. The one-dimensional slab gives 0.000 025 %.
06The split-step Fourier method
Equation (4) has no solution in closed form for a sphere and a packet, so it is solved on a computer. The page itself computes nothing: every frame was computed beforehand on Kaggle's graphics cards by tools/kaggle/schrodinger-sphere/solver.py, and the page plays the stored frames back (section 8). This section describes what the solver does.
6.1The grid
Space is a cube of side \(L = 64\,a\), cut into \(N = 128\) points along each axis, \(128^3 = 2\,097\,152\) points in all, spaced \(\Delta x = L/N = 0.5\,a\) apart, at \(x_j = (j - 64)\,\Delta x\) from \(-32\) to \(31.5\). The cube is periodic: a wave leaving through one face comes back through the opposite face, as on the screen of an old arcade game. On such a grid every function is a sum of the plane waves that fit the box a whole number of times, with wave numbers \(k_n = 2\pi n/L\) for \(n = -64, \dots, 63\). The fast Fourier transform (FFT) converts the \(N\) values at the grid points into the \(N\) weights of these plane waves, and back, in about \(N\log_2 N\) operations instead of \(N^2\).
The grid can only represent wave numbers up to
\[ k_\text{max} = \frac{\pi}{\Delta x} = 6.28\ \text{per}\ a . \tag{17} \]The reason is that a wave sampled at grid points cannot be told apart from a wave whose wave number differs by \(2\pi/\Delta x\): at every grid point \(e^{i(k + 2\pi/\Delta x)x_j} = e^{ikx_j}e^{2\pi i(j-64)} = e^{ikx_j}\). A shorter wave would be mistaken for a longer one, an error called aliasing, like the wagon wheels that turn backwards in films. The grid is fine enough if every wave number the packet contains stays below \(k_\text{max}\). By (7), the weights fall to \(e^{-8} = 3\times10^{-4}\) of their peak four spreads from \(k_0\), at \(k_0 + 4\sigma_k = k_0 + 0.67\), which is 3.67 for the fastest packet, \(E = 4.5\): 58 % of \(k_\text{max}\), or 4.2 grid points per wavelength at \(k_0 = 3\).
6.2One step: half a push, a free flight, half a push
Write (4) as \(i\,\partial\psi/\partial t = \hat H\psi\) with the Hamiltonian \(\hat H = \hat T + \hat V\), the sum of the kinetic-energy operator \(\hat T = -\tfrac12\nabla^2\) and the potential-energy operator \(\hat V\), which multiplies by \(V(\mathbf r)\). (A hat marks an operator: a rule that turns one function into another.) Over a short time \(\Delta t\) the exact solution is \(\psi(t + \Delta t) = e^{-i\hat H\Delta t}\psi(t)\). Each half of \(\hat H\) alone is easy. The potential alone, \(i\,\partial\psi/\partial t = V\psi\), only turns the phase at each point: \(\psi \to e^{-iV\Delta t}\psi\). The kinetic energy alone is a free flight, which by section 3 only turns the phase of each plane wave: \(\psi \to \mathrm{FFT}^{-1}\big[e^{-ik^2\Delta t/2}\,\mathrm{FFT}[\psi]\big]\), with \(k^2 = k_x^2 + k_y^2 + k_z^2\). The difficulty is that \(\hat T\) and \(\hat V\) do not commute: doing one after the other is not the same as doing them together, \(e^{-i\hat H\Delta t} \ne e^{-i\hat V\Delta t}e^{-i\hat T\Delta t}\). Strang's symmetric splitting puts half of one on each side of the other:
\[ \psi(t + \Delta t) \approx e^{-i\hat V\Delta t/2}\;\mathrm{FFT}^{-1}\!\left[e^{-ik^2\Delta t/2}\,\mathrm{FFT}\!\left[e^{-i\hat V\Delta t/2}\,\psi(t)\right]\right] . \tag{18} \]Read it as a recipe: give the wave half a kick from the potential, let it fly freely for the whole step, and give it the other half of the kick. This is what the solver's loop body does, line for line: p = halfV * p; p = jnp.fft.ifftn(kin * jnp.fft.fftn(p)); p = halfV * p, followed by the border mask of section 7. The page uses \(\Delta t = 0.01\), about 1300 steps for the default run. In the chemistry literature this scheme is called the split-step Fourier method, after Feit, Fleck and Steiger (1982), and the symmetric splitting first appeared in print in a paper by Strang (1968); both facts are as Blanes, Casas and Murua report them (reference 3).
Each factor in (18) multiplies a complex number by \(e^{-i\theta}\) with a real angle \(\theta\), which turns it without changing its size; the Fourier transform, with its normalisation, only changes the description from points to plane waves and keeps the sum of \(|\psi|^2\) (Parseval's theorem). Every factor is therefore unitary, and so is their product: in exact arithmetic, \(\sum_j |\psi_j|^2\,\Delta x^3\) is the same after any number of steps, whatever \(\Delta t\). The method can never blow up, and any loss of probability must come from elsewhere.
We measured this with the page's own solver on this workspace's processor, with the border switched off. In 64-bit arithmetic the total changed by \(3.6\times10^{-13}\) in 1500 steps, which is rounding error. In 32-bit arithmetic, the precision used on Kaggle, it fell by \(3.3\times10^{-4}\) in 1500 steps, about \(2\times10^{-7}\) per step: rounding in single precision has a small bias. On Kaggle's T4 cards the stored runs lose about \(4.6\times10^{-7}\) per step before any wave reaches the border.
6.3The error of one step★
We now measure how far (18) is from the exact \(e^{-i\hat H\Delta t}\). The Baker–Campbell–Hausdorff formula combines a product of exponentials of operators into a single exponential, with corrections made of commutators \([\hat A, \hat B] = \hat A\hat B - \hat B\hat A\). For the symmetric product the terms of order \(\Delta t^2\) cancel, because the product reads the same backwards, and the first correction is of order \(\Delta t^3\):
\[ e^{-i\hat V\Delta t/2}\,e^{-i\hat T\Delta t}\,e^{-i\hat V\Delta t/2} = \exp\!\Big\{-i\Delta t\Big[\hat H + \frac{\Delta t^2}{24}\Big([\hat V,[\hat V,\hat T]] + 2\,[\hat T,[\hat V,\hat T]]\Big) + O(\Delta t^4)\Big]\Big\} . \tag{19} \](We checked the coefficients with random \(6\times6\) matrices: the remainder after the \(\Delta t^2\) term shrinks as \(\Delta t^2\) relative to it, as it should.) Equation (19) has a pleasant reading. The bracket is a Hermitian operator, so the split step is the exact evolution under a slightly modified Hamiltonian \(\hat H_\text{eff}\). The method solves a neighbouring problem exactly, which is why it stays unitary. Each step differs from the true one by a term of size \(\Delta t^3\); over a fixed time there are \(t/\Delta t\) steps, so the error in \(\psi\) grows like \(\Delta t^2\): the method is of second order.
The commutators tell us where the error lives. For \(\hat T = -\tfrac12\nabla^2\) one finds \([\hat V,[\hat V,\hat T]] = -|\nabla V|^2\), and \([\hat T,[\hat V,\hat T]]\) also contains derivatives of \(V\). Where \(V\) is constant, both vanish. For the sphere, \(V\) jumps at the surface, so the whole splitting error sits on the sphere's surface, the one place where the wave is reflected.
We measured the order with the solver in 64-bit arithmetic, the border switched off, for \(E = 2\), \(V_0 = 3\), \(R = 4\) up to \(t = 7.28\), while the packet is on the sphere. Halving \(\Delta t\) from 0.04 to 0.0025, the change in the whole wave function, \(\big(\sum|\psi_{\Delta t} - \psi_{\Delta t/2}|^2\Delta x^3\big)^{1/2}\), was \(1.21\times10^{-3}\), \(2.99\times10^{-4}\), \(7.45\times10^{-5}\) and \(1.86\times10^{-5}\): each halving divides it by 4.0, the signature of second order. At the page's \(\Delta t = 0.01\) the error of the wave function is therefore about \(\tfrac43\times7.45\times10^{-5} = 1.0\times10^{-4}\), and the probability behind the sphere changes by \(6\times10^{-6}\) when \(\Delta t\) is halved.
In words: the split step is exact for a free particle and exact for a particle that does not move; the error comes only from their interplay, it is concentrated where the potential changes, and it shrinks four times when the step is halved.
In one step the fastest wave the grid can hold, \(k_\text{max} = 2\pi\), turns its phase by \(k_\text{max}^2\Delta t/2 = 0.197\) rad; the packet's own fastest components, \(k = 3.67\), by 0.067 rad, and the highest barrier, \(V_0 = 8\), by \(V_0\Delta t = 0.08\) rad. All are small compared with one radian, so each step changes the wave only a little. Unlike the explicit schemes of many textbooks, the split step stays stable for any \(\Delta t\); a longer step makes it less accurate, never unstable.
Two more comparisons fix the size of the remaining errors. Precision: for \(E = 2\), \(V_0 = 3\), \(R = 4\), the probability ahead at the end is 0.627 80 on Kaggle (32-bit), 0.628 02 with the same solver on this workspace's processor (32-bit) and 0.628 21 in 64-bit. Grid: the same run on \(256^3\) points, \(\Delta x = 0.25\,a\), computed here in 5 minutes, gives 0.624 83 ahead and 0.249 23 behind, against 0.628 02 and 0.248 87 on \(128^3\). Halving the grid spacing changes the probability ahead by \(3\times10^{-3}\), the largest of the numerical errors: the staircase of grid cubes that stands in for the sphere's surface is the coarsest part of the model. The stored default run, recomputed here with the unchanged solver, matches the stored curves to \(3.4\times10^{-4}\) at every frame.
07The border and the checks
7.1An absorbing border
The periodic box of section 6 has a price: whatever leaves at \(x = +32\) would come back at \(x = -32\) and run into the sphere again. The solver prevents this with an absorbing border. After every step it multiplies \(\psi\) by a mask \(M(\mathbf r) = m(x)\,m(y)\,m(z)\), which is 1 in the interior and falls to 0 over the outer \(W = 12\) points of each face, \(6\,a\):
\[ m(x_j) = \left[\sin\frac{\pi j}{2W}\right]^{1/8} \ \ (j = 0, \dots, W-1), \qquad m = 1 \ \text{further in}, \tag{20} \]mirrored at the opposite face. The eighth root makes the mask rise steeply at the very edge and then creep up to 1: \(m = 0,\ 0.775,\ 0.845,\ \dots,\ 0.990,\ 0.996,\ 0.999\) at \(j = 0, 1, 2, \dots, 9, 10, 11\). A wave crossing the frame is thinned a little at every step instead of being cut off at once, because a sudden edge would itself reflect the wave, as any sudden change does (section 4.2). The mask is not part of the physics. It stands for the rest of an infinite space, into which waves leave and never return.
Because the mask is applied once per step, its strength per unit time depends on \(\Delta t\): halve the step and the frame absorbs a little more in the same time. With the border on, halving \(\Delta t\) from 0.01 to 0.005 raised the probability lost by \(t = 14.57\) by \(8\times10^{-4}\) and lowered the probability behind by \(5\times10^{-4}\) (\(E = 2\), \(V_0 = 3\), \(R = 4\), 64-bit). Late in a run, numbers at the \(10^{-3}\) level are therefore set by the border, not by the equation.
7.2What "lost" means
The page reads the probability that has left the box as
\[ P_\text{lost}(t) = 1 - \sum_{j} |\psi_j(t)|^2\,\Delta x^3 , \tag{21} \]the sum running over all \(128^3\) points. It has two sources. The main one is the border: the front of the transmitted packet, and the waves scattered sideways, reach the frame towards the end of a run. The other is the 32-bit rounding of section 6.2. Before any wave reaches the frame, the rounding is all there is: in the default run \(P_\text{lost}\) is \(1.5\times10^{-4}\) after 336 steps, while the same run in 64-bit loses only \(3.5\times10^{-6}\) in 300 steps. At the end of the run \(P_\text{lost} = 0.0039\). For \(E = 2\), \(V_0 = 3\), \(R = 4\) the stored run ends with \(P_\text{lost} = 0.0047\) and the 64-bit run with 0.0040, so about 85 % of the final loss is real absorption at the border.
Over all 405 runs, \(P_\text{lost}\) at the end lies between \(7\times10^{-4}\) and 0.123. The largest loss belongs to the slowest packet at the largest and highest sphere, \(E = 0.5\), \(V_0 = 8\), \(R = 6\): its run lasts \(t = 29.61\), long enough for the reflected and side-scattered waves to reach the frame. In the first quarter of every run (frames 0 to 12), before anything reaches the frame, the total probability stays within \(5.2\times10^{-4}\) of 1.
Three tests tell us that the stored runs solve (4). First, the free packet: with \(V_0 = 0\) the measured width \(\sigma_y\) follows (11) to \(9.4\times10^{-5}\,a\) in all 45 such runs. Second, the books balance: \(P_\text{behind} + P_\text{inside} + P_\text{ahead} + P_\text{lost} = 1\) by construction, and \(P_\text{lost}\) stays below \(5.2\times10^{-4}\) until the waves reach the border. Third, convergence: the time step contributes about \(10^{-4}\) to \(\psi\), single precision a few \(10^{-4}\) to the probabilities, the border up to \(10^{-3}\) late in a run, and the grid up to \(3\times10^{-3}\). The probabilities on the page are good to about two parts in a thousand.
08Computed once, played back
A single run moves two million complex numbers through about 1000 to 3000 steps, each with two three-dimensional FFTs. That is too much to do in a visitor's browser at the speed of an animation, so the whole grid of parameters was computed once on Kaggle, a free service with graphics cards (GPUs), and stored. On one Tesla T4 card one step at \(128^3\) takes 1.61 ms in 32-bit arithmetic, 0.77 ns per grid point, and 2.6 ms with the measurements of each frame. The 405 runs, every combination of the 9 energies, 9 barrier heights and 5 radii in Table 1, took 880.8 s on two cards, between 2.3 s and 6.9 s each.
Each run takes \(n_\text{target} = \mathrm{round}\big(30/(k_0\Delta t)\big)\) steps as its target, the time for the packet's centre to fly \(30\,a\). It stores 48 frames, one every \(s = \lfloor n_\text{target}/47\rfloor\) steps, so it really takes \(47s\) steps: for the default packet \(n_\text{target} = 1342\), \(s = 28\), and the run ends after 1316 steps at \(t = 13.16\), one frame every \(\Delta t_\text{frame} = 0.28\). Each frame stores, from the whole three-dimensional \(\psi\): the total \(\sum|\psi|^2\Delta x^3\), the probability behind (\(x < -R\)) and ahead (\(x > R\)), and the width across the flight, \(\sigma_y = \big[\sum (y - \bar y)^2|\psi|^2 / \sum |\psi|^2\big]^{1/2}\). It also stores \(|\psi|\) in the plane \(z = 0\) at all \(128\times128\) points as whole numbers from 0 to 255 (section 9). On the website the 405 files keep the half-plane \(y \ge 0\) of that plane with \(|\psi|\) and the phase, 62.7 MB in all. A second generation of 81 runs at \(R = 4\) stores \(\mathrm{Re}\,\psi\) on every point of a box around the sphere (section 9); it was computed with the same solver but stores 32 frames, so its default run ends after 1333 steps at \(t = 13.33\), and its numbers differ slightly from those of the 48-frame run quoted in this section. The browser checks every file it downloads against its SHA-256 fingerprint in the index, and the panel reports the result.
8.1The live preview
The controls also offer values outside the stored grid (\(E\) up to 6, \(V_0\) up to 12, \(R\) from 1 to 8). There the page computes a preview in the browser, in a background thread (scripts/schrodinger-live-worker.js), with the same method on a coarser grid of \(64^3\) points and frames at the same times as the stored runs. The box is \(64\,a\) wide, so \(\Delta x = 1\,a\), unless the packet is fast: by (17) the grid must hold \(k_0 + 0.67\), so the box shrinks to \(L = 64\pi/(k_0 + 0.67)\) whenever \(k_0 + 0.67 > \pi\), that is, for \(E > 3.05\). The step is about 0.04, adjusted so that a whole number of steps fills each frame interval.
| \(E,\ V_0,\ R\) | behind, live / stored | ahead, live / stored | largest difference, any frame |
|---|---|---|---|
| 2.5, 3, 4 | 0.272 / 0.239 | 0.622 / 0.631 | 0.035 |
| 2, 3, 4 | 0.269 / 0.249 | 0.628 / 0.628 | 0.023 |
| 0.5, 8, 6 | 0.403 / 0.388 | 0.271 / 0.272 | 0.076 |
| 4.5, 4, 2 | 0.068 / 0.049 | 0.891 / 0.930 | 0.039 |
Table 3. The live preview against the stored runs: end of the run, and the largest difference in the probability behind or ahead over all 48 frames. The page's worker was run unchanged in Node; a whole run took 11.6 s to 35.6 s on one core of this workspace.
The preview is a sketch, not a measurement. With one grid point per \(a\) the sphere's surface is a staircase of coarse cubes and the penetration depth (\(1\,a\) by default) is a single point, so the reflection is less accurate; the preview puts up to 0.03 more probability behind the sphere at the end, and differs by up to 0.08 at some frame. The page marks the preview on the figure and in the source box.
09From the equation to the screen
The square picture, Fig. 14, shows the wave itself in three dimensions, seen from an angle that you change by dragging. Because the packet flies along \(x\) through the centre of the sphere, and both the starting packet (5) and the potential (3) are unchanged by any rotation about the \(x\) axis, the angular momentum about that axis, \(\hat L_x = -i(y\,\partial_z - z\,\partial_y)\), commutes with the Hamiltonian; the packet starts with \(\hat L_x\psi = 0\) and keeps it, so at every time \(\psi(x, y, z, t) = \psi(x, \rho, t)\) with \(\rho = \sqrt{y^2 + z^2}\), the distance from the axis. The whole three-dimensional wave is therefore fixed by its values on one half-plane through the axis. Kaggle computed every run on the full \(128^3\) grid and stored the plane \(z = 0\); the page keeps its half \(y = \rho \ge 0\), \(128 \times 64\) points \(0.5\,a\) apart, as two levels per point: \(q = \mathrm{round}\big(255\,|\psi|/|\psi|_\text{peak}\big)\), with \(|\psi|_\text{peak}\) the largest value in the first frame, and \(p\), the phase \(\arg\psi\) in 256 steps from \(-\pi\) to \(\pi\). To draw a frame the page spins this half-plane about the axis: every point of a box \(48\,a\) long and \(32\,a\) wide takes \(\mathrm{Re}\,\psi = (q/255)\cos(\text{phase})\) of the stored point at its \(x\) and its \(\rho\), linear between the two stored \(\rho\) values around it.
The square figure draws this three-dimensional \(\mathrm{Re}\,\psi\) in one of four ways, chosen under View. Mesh, the view the figure opens with, takes the plane \(z = 0\) through the flight axis and lifts every point by its \(\mathrm{Re}\,\psi\), like the surface of a pond seen from the bank: crests are hills, coloured wine; troughs are valleys, coloured slate; where the wave is zero the sheet lies flat in the colour of the paper. A thin mesh of lines lies on the sheet, 48 squares along each side, so that its shape can be read from any angle, and the barrier is the dark line where it cuts the plane. A second button lifts the sheet by \(|\psi|^2\), the probability density, instead. The stored points are \(0.5\,a\) apart, only four to six for each wavelength, and a sheet stretched over those points alone would be a chain of flat facets. The page therefore resamples the stored plane on a grid three times finer, \(a/6\) apart, which gives at least twelve points for each wavelength. It does so by band-limited interpolation: on the solver's periodic grid the wave is a sum of the plane waves that fit the box (section 6), and that same sum can be evaluated between the grid points. (The flat wall and the spherical waves were computed by another method on a grid ten times finer; their stored samples, \(0.5\,a\) apart, are interpolated in the same way, for the spherical waves along \(r\) on \(u = r\psi\).) The drawn sheet is therefore a resampling of the stored grid: it passes through every stored value and contains no wave that the run did not have. The height is scaled anew in every frame, so that the tallest point is a seventh of the sheet's width, or lower where that would make the sheet steeper than a slope of 1.5 anywhere; the waves are short compared with the sheet, and at a seventh of its width their crests would stand as needles. Sheets shows two surfaces, the places where \(\mathrm{Re}\,\psi = +c\) (wine, the crests) and where \(\mathrm{Re}\,\psi = -c\) (slate, the troughs), with \(c\) three tenths of the largest \(|\mathrm{Re}\,\psi|\) in the drawn box at that moment. Think of the crests of sea waves frozen into glass and lit by the sun: each crest is a curved sheet, and the distance between neighbouring wine sheets is one wavelength \(2\pi/k_0\). The sheets are found by the marching cubes method: every little cube of eight neighbouring grid points whose corners lie on both sides of \(c\) is cut by a few triangles, placed where linear interpolation along its edges reaches \(c\). Before the cubes are cut, the field is resampled more finely, \(a/6\) apart along the flight and \(a/3\) across, with a smooth local kernel that returns the stored values at the stored points; cut on the stored points alone, the rims of the sheets came out as saw teeth. Cutaway is the same with a quarter removed, so we can see how the sheets bend into the barrier. Fog is the earliest view, coloured mist whose opacity grows with \((\mathrm{Re}\,\psi)^2\) along each line of sight. All four views draw the same stored numbers: the mesh on the square \(-24 \le x, y \le 24\) of the plane \(z = 0\), the other three in the box \(-24 \le x < 24\), \(-16 \le y, z < 16\). The sheets, the cutaway and the fog spin the stored half-plane about the axis, as described above. (For the sphere at \(R = 4\) Kaggle also stored \(\mathrm{Re}\,\psi\) on every point of that box from the full three-dimensional run, in 127 levels of the first frame's peak. Once the wave has spread, a crest is only a handful of such levels and the sheets cut from them came out torn, so the page draws from the cut, which holds 255 levels of \(|\psi|\) and its phase; the three-dimensional files remain stored and serve the symmetry check below.) Three things differ from the model. First, the symmetry holds exactly only on paper: on the square grid the sphere is a staircase, so the computed wave is round about the axis only to within a small error. Measured on the stored true three-dimensional run \(E = 2\), \(V_0 = 1.5\), \(R = 4\), \(\mathrm{Re}\,\psi\) off the axis differs from its value at the same \(x\) and \(\rho\) in the plane \(z = 0\) by at most 0.9 of the 127 steps between zero and the first frame's peak in the root mean square (late in the run, \(t \approx 11\)), and by 17 steps at worst at a single point while the packet is on the sphere (\(t = 6.72\)). Second, the stored levels stop at the first frame's peak (255 for the cuts, \(\pm 127\) for the true three-dimensional runs): where the incoming and reflected waves overlap, crests can exceed it and are clipped; this happens in 72 of the 81 true three-dimensional runs. Third, a run is stored as 48 frames. The sheets and the fog show the stored frame at or before the playback time. The mesh moves between two stored frames: it takes both into the frame that turns at the wave's own energy, \(\psi\,e^{iEt}\), where the wave changes only as slowly as its envelope moves, blends them in proportion to the time elapsed, and turns the result back, \(\psi(t_0 + \tau) = e^{-iE\tau}\big[(1 - s)\,\psi_0 + s\,e^{iE\Delta t}\,\psi_1\big]\) with \(s = \tau/\Delta t\). At a stored frame the mesh is that frame exactly; in between it is a blend, not a computed solution. The probabilities in the readouts and in Fig. 14b come from Kaggle's whole \(\psi\), not from the picture.
The graph Fig. 14b draws the curves of Figure 2 for the chosen run: behind in black, inside (the slab \(|x| \le R\)) in rose, dashed, ahead in wine, and lost at the border in grey, dotted. The readouts below the controls give the same four numbers at the frame shown; with the defaults at the last frame (\(t = 13.33\), the true three-dimensional run) they read 0.239, 0.633, 0.123 and 0.0048. The guide line evaluates (14) for a slab of thickness \(2R\) and says when \(E < V_0\); it is a reference for the central ray only, not a prediction for the sphere. The data panel holds every stored number with its source, and checks the inside and lost values, the free-packet width (11) and the guide (14) against their formulas.
9.1Other barriers: a pillar and a flat wall
Under Barrier the sphere can be replaced by a round pillar standing upright, endless along \(z\), or by a flat wall \(|x| < d/2\) of thickness \(d\), endless across the path. Each can be soft (\(V = V_0\) inside, so the wave partly enters), hard (\(\psi = 0\) inside: the wave cannot enter at all, the limit \(V_0 \to \infty\)), or a well (\(V_0 < 0\): the particle speeds up inside, as a ball rolling over a dip in the ground). Wells and hard walls are stored for the pillar and the wall; for the sphere they still need runs on Kaggle's graphics cards. Both shapes are easier to compute than the sphere, because for them a quantity that the potential does not change lets us drop whole dimensions from the computation. (The sphere was computed in full three dimensions; its rotational symmetry was used only to store and draw the wave.)
For the pillar, \(V\) does not depend on \(z\). Then the momentum along \(z\), \(\hat p_z = -i\,\partial_z\), commutes with \(\hat H\), and the kinetic energy splits into a part across the pillar and a part along it, \(\hat H = \big[-\tfrac12(\partial_x^2 + \partial_y^2) + V(x, y)\big] - \tfrac12\partial_z^2\). The starting packet (5) is a product of a function of \((x, y)\) and a Gaussian in \(z\), and a product of solutions of the two parts solves the whole equation:
\[ \psi(x, y, z, t) = \varphi(x, y, t)\,g(z, t), \qquad i\,\partial_t\varphi = -\tfrac12\left(\partial_x^2 + \partial_y^2\right)\varphi + V(x, y)\,\varphi, \qquad i\,\partial_t g = -\tfrac12\,\partial_z^2 g . \tag{22} \]Substituting (22) into (4) and dividing by \(\varphi g\) shows it: the two sides separate term by term. Here \(g\) is the free Gaussian of section 3, spreading by (11), \(g(z, t) = (2\pi\sigma_0^2)^{-1/4}\,(1 + it/2\sigma_0^2)^{-1/2}\exp\!\big[-z^2/\big(4\sigma_0^2(1 + it/2\sigma_0^2)\big)\big]\). (We checked with SymPy that it solves its equation exactly and has norm 1.) So the pillar is a problem in the plane: Kaggle solved \(\varphi\) on \(128^2\) points with the method of section 6, and the page draws \(\varphi\) at every height \(z\), weighted by \(g(z)\).
For the flat wall, \(V\) depends on \(x\) alone, and the same argument splits off both \(y\) and \(z\):
\[ \psi(x, y, z, t) = \chi(x, t)\,g(y, t)\,g(z, t), \qquad i\,\partial_t\chi = -\tfrac12\,\partial_x^2\chi + V(x)\,\chi . \tag{23} \]This is exactly the one-dimensional problem of section 4, so the wall can be checked against the formula (14), averaged over the momenta of the packet (7):
\[ T_\text{packet} = \int_0^\infty |\phi(k)|^2\,T\!\left(\tfrac12 k^2\right)\mathrm{d}k . \tag{24} \]Kaggle solved \(\chi\) for five thicknesses \(d = 0.5\) to \(3\,a\) on a fine line, \(\Delta x = 0.05\,a\), by the Crank–Nicolson method, \(\big(1 + \tfrac{i}{2}\Delta t\,\hat H\big)\chi^{n+1} = \big(1 - \tfrac{i}{2}\Delta t\,\hat H\big)\chi^n\), which keeps the norm exactly: because \(\hat H\) is Hermitian, \(\big(1 + \tfrac{i}{2}\Delta t\hat H\big)^{-1}\big(1 - \tfrac{i}{2}\Delta t\hat H\big)\) is unitary (every one of the 540 finite runs ends with norm 1.000000), and stored the result on the same half-plane as the sphere. The check: in the 510 stored runs that end with less than 0.002 of the probability inside the wall, the probability ahead equals (24) to 0.0045. (The transmission (14) itself agrees with a direct solution of the four matching equations to \(1.6\times10^{-15}\).) A hard wall lets through at most \(10^{-6}\).
A hard barrier needs care in a computation, because \(V_0 = \infty\) cannot be put into \(e^{-iV\Delta t}\). For the wall, the points inside are removed and the condition \(\psi = 0\) at the face is built into the second derivative next to it. For the pillar, \(\psi\) is set to zero inside after every step. That removes the small part of the wave that each free step pushes into the column, about 4 % of the probability over a run at \(R = 4\) (from 0.3 % for a thin pillar and a fast packet to more for a thick pillar and a slow one), which the page shows as "lost". Halving the time step at the end of a run changes the probability ahead of a soft pillar by \(3\times10^{-7}\), and that of a hard pillar by \(9\times10^{-5}\) (behind it by \(8\times10^{-4}\)). In two dimensions part of the scattered wave reaches the side border of the box and is absorbed there, up to a quarter in some runs; the page counts it as lost. The coin (a disc across the path) and the tube (a pipe the packet flies through) need new three-dimensional runs on Kaggle's graphics cards; their buttons are shown but not active yet.
9.2Spherical waves
Drop a stone into a still pond and the ripples are circles growing from the point where it fell. In three dimensions the same picture gives spheres: a sound from a small loudspeaker, or light from a lamp, spreads as shells whose crests are spheres about the source. Under Wave the page offers two such waves for the particle: a shell that leaves the centre and meets a spherical shell wall at \(r = 16\,a\), and a shell that closes in from \(r = 28\,a\) on a ball of radius \(R\) at the centre. Their crests are spheres, so the sheets of the figure are nested spheres; the cutaway opens them like an onion. For these waves the figure draws \(\mathrm{Re}\,(r\psi)\) rather than \(\mathrm{Re}\,\psi\): \(\psi\) itself falls as \(1/r\) (see below), which would make the far shells too faint to see next to the near ones. (The mesh view is the exception: it lifts the plane by \(\mathrm{Re}\,\psi\) itself, so there the rings do get lower as they grow.) The crests sit at the same radii to within a fraction of a wavelength, and because \(\psi\) depends on \(r\) alone, each sheet is drawn as an exact sphere at a radius where the stored profile, interpolated smoothly between its points \(0.5\,a\) apart, crosses \(\pm c\).
A wave that is the same in every direction depends on the distance \(r\) from the centre alone. For such a function the Laplacian is \(\nabla^2\psi = \frac{1}{r^2}\frac{\partial}{\partial r}\!\left(r^2\frac{\partial\psi}{\partial r}\right) = \frac{1}{r}\,\frac{\partial^2(r\psi)}{\partial r^2}\) (we checked this identity with SymPy), so with \(u = r\psi\) the equation (4) for a potential \(V(r)\) becomes
\[ i\,\frac{\partial u}{\partial t} = -\frac12\,\frac{\partial^2 u}{\partial r^2} + V(r)\,u, \qquad u(0, t) = 0, \qquad \int |\psi|^2\,\mathrm d^3 r = 4\pi\int_0^\infty |u|^2\,\mathrm d r . \tag{25} \]This is the one-dimensional equation of section 4 on the half-line \(r \ge 0\), with the condition \(u = 0\) at the centre, which keeps \(\psi = u/r\) finite there. Kaggle solved it on the whole line with \(u\) odd and \(V\) even: an odd start stays odd, so \(u(0) = 0\) holds by itself. The factor \(1/r\) makes the wave weaker as the shell grows, because the same probability is spread over a sphere of area \(4\pi r^2\). The outgoing shell starts as
\[ u(r, 0) \propto e^{-(r - r_0)^2/(4\sigma_0^2) + ikr} - e^{-(r + r_0)^2/(4\sigma_0^2) - ikr}, \qquad r_0 = 6, \quad \sigma_0 = 2, \tag{26} \]and the incoming one with \(k \to -k\) and \(r_0 = 28\). Because (25) is exactly the equation of the flat wall, the outgoing shell crosses the shell wall with the transmission (24), now with \(\sigma_0 = 2\): in the stored runs that end with the wave clear of the wall, the probability beyond it equals (24) to the number shown in the readouts and the data panel. The incoming shell has no such formula: it is focused onto the ball, partly enters it, and comes back out as an outgoing shell. Waves that are not the same in every direction, a spherical wave from a point beside the barrier, or one meeting a pillar or a wall, are true three-dimensional problems that need runs on Kaggle's graphics cards.
One case beyond a single round wave needs no new computation. Drop two stones into the pond and each sends out its own rings; where they cross, the water simply carries both. The same holds here, because equation (4) is linear: if \(\psi_1\) and \(\psi_2\) each solve it, their sum solves it too. In empty space (\(V = 0\)) the outgoing shell about any centre is a solution, so two shells about two centres a distance \(s\) apart on the \(x\) axis add up to a solution:
\[ \psi(\mathbf r, t) = \psi_{\mathrm s}\big(|\mathbf r - \tfrac{s}{2}\,\hat{\mathbf x}|,\, t\big) + \psi_{\mathrm s}\big(|\mathbf r + \tfrac{s}{2}\,\hat{\mathbf x}|,\, t\big), \tag{27} \]where \(\psi_{\mathrm s}(r, t)\) is the stored free shell, the run of (26) with \(V_0 = 0\). Under Wave, Two sources draws this sum on the mesh. Where a crest of one wave meets a crest of the other, the sheet rises to twice the height; where a crest meets a trough, it stays flat. For a wave of a single wavelength \(\lambda\) the flat places are the points whose distances \(r_1\) and \(r_2\) to the two sources differ by an odd number of half wavelengths, \(|r_1 - r_2| = (n + \tfrac12)\lambda\) with \(n = 0, 1, 2, \dots\); these are hyperbolas with the two sources as their foci. Our shells contain a spread of wavelengths around \(2\pi/k\), so the flat lines are clear where the two shells overlap and fade elsewhere. The sum (27) is not normalised: its total probability is \(2 + 2\,\mathrm{Re}\!\int\psi_1^*\psi_2\,\mathrm d^3r\), not 1. The sheet's heights are measured against the largest in each frame, so this factor does not show in the picture; the probabilities in the readouts are those of one source alone.
10What the model leaves out
The model is a single particle without spin, moving slowly enough for (2) to hold, in a potential with a perfectly sharp edge. Real scatterers are softer: the potential of an atom or a nucleus changes smoothly over a distance comparable to its size, and a smooth edge reflects less than a sharp one, as Problem 10.5 lets you explore. Electrons have spin, and at high speed they need the Dirac equation; many electrons repel each other and are identical, which (2) for one particle cannot describe. The model also stops at the wave: it does not describe what happens when a detector finds the particle in one place, which is where the probabilities of (1) are turned into counts.
The computation has its own limits, all measured above: a box of finite size whose border removes waves and so ends each run after a fixed time; a time step and a grid that leave errors of order \(10^{-4}\) and \(10^{-3}\); single precision; and a picture of one plane in 256 levels. At the end of a run the scattering is not finished: in the default run 12.6 % of the probability is still beside the sphere, moving outwards.
The next model is the stationary theory of scattering. Instead of following one packet, one sends in a plane wave of a single energy and asks for the outgoing spherical wave far away, whose strength in each direction is the differential cross-section. For a sphere the wave is expanded in partial waves of definite angular momentum; a wave with angular momentum \(\ell\) passes the centre at a distance of about \(\ell/k\), so for \(k_0R = 8.94\) about nine partial waves meet the sphere, too many for the simple low-energy results and too few for pure ray optics, which is why the computed pictures show both reflection and diffraction. This theory is the subject of the scattering chapters of the textbooks listed below.
10.1 Compute the Fourier transform of the one-dimensional packet \(\psi(x,0) = (2\pi\sigma_0^2)^{-1/4}e^{-x^2/(4\sigma_0^2) + ik_0x}\) by completing the square, and confirm \(|\phi(k)|^2\) in (7) and \(\sigma_x\sigma_k = \tfrac12\).
10.2 Show from (11) that the width has grown by the factor \(\sqrt2\) at \(t = 2\sigma_0^2\). On the page, set \(V_0 = 0\) and compare \(\sigma_y\) with \(\sigma_\text{free}\) in the data panel at the last frame for \(E = 0.5\) and \(E = 4.5\). Explain why the slow packet has spread more by the end although both have the same \(\sigma_0\).
10.3 Derive the \(E > V_0\) branch of (14) from the \(E < V_0\) branch with \(\kappa \to ik'\). For \(E = 2.5\) and \(d = 8\), find the barrier heights \(V_0 < E\) at which the slab is perfectly transparent, and locate them on the dotted curve of Figure 3.
10.4 Using (15) and (16), show that a hard sphere sends the fraction \(1 - e^{-R^2/(4\sigma_0^2)}\) of a Gaussian beam backwards, and evaluate it for \(R = 2, 4, 6\). Compare with the stored probability behind for \(E = 2.5\), \(V_0 = 8\): 0.084, 0.277 and 0.458.
10.5 Suppose the sphere's edge were smooth, \(V\) rising from 0 to \(V_0\) over a distance \(w\). Using the commutator in (19), explain why the split step would become more accurate. Then use the remark of section 4.2, that a wave is partly reflected at every sudden change, to argue why a smooth edge reflects less of a wave with \(E > V_0\) than a sharp one when \(w \gg \lambda\).
10.6 For the live preview, \(\Delta x = 1\,a\) in a box of \(64\,a\). Using (17) and the criterion \(k_0 + 4\sigma_k < \pi/\Delta x\), show that the box must shrink for \(E > 3.05\), and find the box side the worker uses for \(E = 6\).
10.1Further reading
- D. J. Griffiths and D. F. Schroeter, Introduction to Quantum Mechanics, 3rd edition, Cambridge University Press, 2018: chapter 2, “Time-independent Schrödinger Equation” (the free particle and the finite well and barrier), and chapter 10, “Scattering”.
- J. J. Sakurai and J. Napolitano, Modern Quantum Mechanics, 3rd edition, Cambridge University Press, 2020: chapter 2, “Quantum Dynamics” (the time-evolution operator), and chapter 6, “Scattering Theory”.
- S. Blanes, F. Casas and A. Murua, “Splitting methods for differential equations”, Acta Numerica (2024), arXiv:2401.01722: section 1.1 (Lie–Trotter and Strang splitting, the error constant of the symmetric product) and section 1.6 (the time-dependent Schrödinger equation, the split-step Fourier method, unitarity, and \([\hat V,[\hat T,\hat V]] = |\nabla V|^2\)).
- M. D. Feit, J. A. Fleck Jr. and A. Steiger, “Solution of the Schrödinger equation by a spectral method”, Journal of Computational Physics 47, 412–433 (1982), and G. Strang, “On the construction and comparison of difference schemes”, SIAM Journal on Numerical Analysis 5, 506–517 (1968): the original papers of the method and of the symmetric splitting. Only their publisher records could be opened for this note (the full texts are behind paywalls); what this note says about them is taken from reference 3.