The Path Integral

A quantum particle takes every path at once. Add up the arrows, rotate time to turn oscillation into decay, and recover energy levels and tunnelling from random paths

The Path Integral

A quantum particle does not take one path from here to there. It takes all of them, and each contributes an arrow of the same length whose direction is set by the path’s action. Almost everything cancels. What is left is quantum mechanics, and, once time is rotated to imaginary values, a problem in statistics that a computer can sample. Quantum mechanics is the smallest field theory, a field x(t) over a spacetime with no space in it, and the same ideas reappear in every later lesson.

Every Path at Once

Drag the amber nodes to bend your path and watch its arrow turn, then lower ħ and see the spiral of arrows wind tighter around the classical path. Further down, add random paths and watch their sum fail to settle, then raise the number of time slices until the lime points land on the exact curve.

1One path, one arrow; a family of paths, a spiral

Every path from A to B contributes an arrow of the same length. Its direction is the path’s action S divided by ħ. Drag the amber nodes and watch your arrow spin.

2.731
action S of your path
0.637
action of the classical path
0.67
turns of your arrow away from the classical one
1.472
length of the sum of the family’s arrows
1.475
stationary-phase value √(2πħ/S″), also the bend that turns an arrow half a turn
The family’s action is Scl + ½S″s2 with S″ = 1.45: it does not change to first order at s = 0, so arrows near the classical path point the same way and add up, while further out each arrow is turned against its neighbour and the spiral winds up on itself. At ħ = 0.50 the members with |s| below 1.48 supply 118% of the sum, and the sum is as long as that bundle is wide. Lower ħ and the bundle tightens onto the classical path; raise it and paths far from classical count.

2Why not just sample paths at random?

Throw random paths around the classical one and average their arrows. The arrows point every way, the running sum wanders like a drunkard’s walk, and the small true average stays buried under the noise.

0
random paths (cap 400,000)
— ± —
size of the average arrow, sampled
6.15 × 10⁻⁵
its exact value, from a Gaussian integral
2.6 × 10⁸
paths needed before the signal equals the noise
With σ = 0.80 and ħ = 0.50 the true average arrow has length 6.2 × 10⁻⁵, but an average of n arrows pointing every way carries noise of about 1/√n. The noise would not drop to the signal until about 2.6 × 10⁸ paths, and the full path integral is the limit of ever wider σ. Sampling an oscillating sum by brute force fails: this is the sign problem.

3The sum, done properly

Cut the time into slices and integrate over the position at every slice, one slice after another, on a fine grid. The lime points are that computation; the emerald curve is the textbook formula.

Time slices
Convergence factor
0%
K(B, A) from the sliced sum: modulus ∠ phase in radians
0.3593 ∠ −0.197
K(B, A) from the closed form
—
worst disagreement over the plot: relative modulus, phase in radians
963 × 7
grid points × integrals over an intermediate position
The error of the short-time kernel falls as the square of the slice length: each doubling of the slices cuts the disagreement by four. At 8 slices it is … radians at worst. Each slice lasts ε(1 − iη) rather than ε. Without that small imaginary part the integrals over intermediate positions oscillate for ever and have no value on a finite grid; with it, long jumps are damped. The solid emerald curve is the closed form at the same complex time, and the dashed one is real time, η = 0, where a particle that started at a point is equally likely to be found anywhere. Smaller η costs a wider, finer grid.

Natural units ħ = 1 and unit mass, except where the ħ slider changes it; the particle goes from A = (x = −1, t = 0) to B = (x = 1, t = 2). Paths are polygons through 9 movable nodes, with action S = Σ [½(Δx)2/Δt − Δt V]. Amber is your path, emerald the classical path and every closed-form result, lime everything sampled or summed numerically; the hue of a path or arrow is the direction of its arrow. The family shown is one direction in the space of paths (the classical path plus s times an arch); the full path integral sums over all of them, which is what panel 3 does.

Go deeper:Summing eiS/ħ over Paths, and Why Classical Mechanics Survives

The amplitude to go from A to B is the propagator, K(B, A) = ∫ Dx eiS[x]/ħ, with S = ∫ (½ẋ2 − V) dt the action of classical mechanics. The symbol ∫ Dx is defined by slicing: cut the time into N steps of length ε, integrate over the position at each intermediate time, and give every step the factor √(1/(2πiħε)). That factor is the normalisation of the measure. It is fixed by requiring that two short steps compose into one longer step, and without it the limit N → ∞ does not exist. For one short step the amplitude is √(1/(2πiħε)) exp(i[(Δx)2/(2ε) − εV]/ħ), and panel 3 of the demo multiplies these together on a grid, with no sampling.

Each of those integrals oscillates without decaying, so it needs a rule to give it a value. The standard rule is to let time have a small negative imaginary part, ε → ε(1 − iη), which damps long jumps, and take η → 0 at the end. The demo keeps η visible because the computation cannot be done without it; the closed forms it is compared with are evaluated at the same complex time. For a free particle the result is K = √(1/(2πiT)) exp(i(Δx)2/(2T)), and for the oscillator it is Mehler’s formula.

Where the action is stationary, neighbouring paths have nearly the same phase and their arrows add; away from there the phase changes quickly from one path to the next and the arrows cancel. The paths that count lie within about √ħ of a path of stationary action, in the sense that their action differs from it by less than about πħ. As ħ → 0 only the stationary path is left, and the condition δS = 0 is the principle of least action, which gives Newton’s equations. Classical mechanics is the stationary-phase approximation to the sum.

Paul Dirac remarked in 1933 that the amplitude for a short time interval “corresponds to” eiS/ħ. Richard Feynman turned the remark into a formulation of quantum mechanics, in his thesis of 1942 and a paper of 1948. In a field theory the sum runs over field configurations φ(x, t) throughout spacetime instead of paths x(t), and the same two difficulties appear: the measure has to be defined by a lattice or another cutoff, and an oscillating sum cannot be sampled. The second is the sign problem of panel 2, and the next demo shows the usual way round it.

Imaginary Time

Watch the lime points close in on the emerald curves as sweeps accumulate, then raise the quartic coupling and see the measured energy gap follow the exact one. Switch the number of time slices at fixed total time to see the answer shift with the lattice spacing.

Time slices N (at fixed total time, more slices is a finer spacing)
—
⟨x²⟩ sampled
—
⟨x²⟩ exact for this lattice (sample is — away); continuum —
—
gap E₁ − E₀ fitted to the sampled correlator (jackknife error)
—
gap exact for this lattice (fit is — away); continuum —
—
proposals accepted
—
autocorrelation time of ⟨x²⟩
0
measurements, one every 4 sweeps
0
sweeps after thermalisation (cap 5,000,000)
Solving the lattice and the Hamiltonian exactly for these settings…

Natural units ħ = 1 and unit mass; V = ½ω2x2 + g x4. The path is periodic in imaginary time, with Euclidean action SE = Σ [(Δx)2/(2a) + a V]. Amber is the sampled path; lime is measured, with one-standard-error bars from blocked data; emerald is exact: solid from diagonalising the Hamiltonian on a grid (the continuum), dashed and dots from the transfer matrix of this very lattice. Violet marks the fit window and the current spacing. The path shown is one draw from the weight e−S, not a trajectory: τ is not time and nothing here moves. Thermalisation sweeps are discarded before measuring.

Go deeper:From Quantum Amplitudes to Statistical Weights

Put t = −iτ. The phase eiS becomes e−SE, with the Euclidean action SE = ∫ (½ẋ2 + V) dτ: the sign of the potential flips, and the weight is real and positive. A sum over paths with a positive weight is a probability distribution, the Boltzmann distribution of an elastic string lying in the potential V, and probability distributions can be sampled. The Feynman–Kac formula (Mark Kac, 1949) states the connection: Z = Tr e−HT = ∫ Dx e−SE, summed over paths periodic in τ with period T.

Expanding the trace in energy eigenstates gives Σ e−EnT, so a long lattice is dominated by the ground state: the positions visited are distributed as |ψ0|2, and ⟨x(0) x(τ)⟩ = Σ |⟨0|x|n⟩|2 e−(En − E0)τ, whose slowest term decays at the gap E1 − E0. On a periodic lattice the decay from both directions adds to a cosh, which is what the fit uses. This is how masses are measured in lattice field theory (See also: The Vacuum Is Not Empty).

The lattice is its own quantum system, with a transfer matrix in place of e−aH, and the demo solves it exactly to show what the simulation should converge to at each spacing. For the harmonic oscillator the result is closed: ⟨x2⟩ = 1/(2ω√(1 + a2ω2/4)), which tends to the continuum 1/(2ω) with an error of order a2. Statistical errors shrink with more sweeps; this one shrinks only with a finer lattice, and a finer lattice takes longer to decorrelate. Balancing the two is the daily work of a lattice calculation.

The rotation to imaginary time is named after Gian Carlo Wick (1954). Michael Creutz and Barry Freedman published this simulation in 1981 as a warm-up for lattice gauge theory. In field theory the same rotation turns a quantum field in d − 1 dimensions of space into a statistical system in d dimensions, and almost everything known numerically about the strong interaction comes from it. What it does not give directly is evolution in real time, where the weights oscillate and sampling fails as in the first demo.

Tunnelling

Watch the path jump between the two wells and count its kinks, then press Scan the barrier and see the kink rate and the level splitting fall together. Push the wells far apart and watch the simulation freeze.

0
kinks in the path shown
—
kinks per unit time, sampled; half the exact splitting is —
—
splitting E₁ − E₀ from the sampled correlator
—
exact for this lattice (sample is — away); continuum —
0.328
dilute-gas estimate 2ω√(6S₀/π) e−S₀
3.68
frequency ω at the bottom of a well
—
autocorrelation time in sweeps
0
sweeps after thermalisation, measured every 5
Collecting the first measurements…

Natural units ħ = 1 and unit mass; V = λ(x2 − v2)2 with λ = 1, on a periodic lattice of 128 slices of spacing a = 0.2 (total time 25.6). Amber is the sampled path and white the same path after 4 rounds of local averaging, which removes the jitter and leaves the kinks (violet); rose is the potential. Lime is measured with one-standard-error bars; emerald is exact, solid from diagonalising the Hamiltonian and dotted from the transfer matrix of this lattice; pink dashes are the dilute-instanton-gas formula. A grey ring marks a frozen run whose numbers should not be believed. The autocorrelation time is an estimate from blocked data, without an error bar. The path is one draw from the weight e−S, not a trajectory: a kink is not an event that happens at a time. Scan runs 200,000 sweeps at each of 9 barriers.

Go deeper:Instantons: Classical Paths in Imaginary Time

In the double well V = λ(x2 − v2)2 a classical particle at rest in one well stays there. In imaginary time the potential is turned upside down, the two wells become two hilltops, and there is a classical path that rolls off one hilltop and arrives at the other: x(τ) = v tanh(ω(τ − τ0)/2), with ω = √(8λ) v the frequency at the bottom of a well. This is the kink, or instanton. Its action is S0 = ∫ √(2V) dx = (4/3)√(2λ) v3, and it is localised in τ, which is why it is called an instanton.

A path with several well-separated kinks and anti-kinks is nearly a solution too. Summing over their number and positions, the dilute-instanton-gas approximation, gives the splitting of the two lowest levels: E1 − E0 ≈ 2ω √(6S0/π) e−S0/ħ, and a mean number of kinks per unit time equal to half of that. It is a semi-classical result, valid when S0 is large compared with ħ, with corrections of relative order ħ/S0; the demo shows it overshooting at low barriers and closing on the exact curve as the barrier grows.

The factor e−S0/ħ has a Taylor series in ħ that vanishes at every order. Tunnelling is therefore invisible to perturbation theory, however many terms are computed (See also: A Field Theory in One Integral). The same idea in more dimensions gives the instantons of gauge theory, found by Belavin, Polyakov, Schwartz and Tyupkin in 1975 and put to physical use by Gerard ’t Hooft in 1976, and Sidney Coleman’s 1977 calculation of the decay of a false vacuum.

The freezing is real too. A simulation that changes the path a little at a time can only make a kink by pushing part of the path over the barrier, which costs a factor e−S0, so the time between tunnelling events grows exponentially while the error bars, which know only about the fluctuations actually seen, stay small. Lattice QCD has the same disease: near the continuum limit its simulations get stuck in one sector of topological charge. It is called topological freezing, and it is an active area of algorithm research.

Key Takeaways

  • The amplitude to go from A to B is the sum of eiS/ħ over every path; paths near stationary action add up and the rest cancel, which is why classical mechanics works.
  • The sum is defined by slicing time and normalising each slice, and it cannot be sampled at random in real time because the arrows cancel: the sign problem.
  • In imaginary time the weight e−S is a probability, and sampled paths give the ground state and the energy gaps, with a statistical error and a separate lattice-spacing error.
  • Tunnelling comes from kinks of action S0; its rate goes as e−S0/ħ, which no order of perturbation theory can produce.

Spot a mistake or have an idea?

Search