|q⟩ Bad Qubits

intermediate · Physics · The Variational Method & WKB

Trial Wavefunctions

A trial wavefunction is a guessed state with one or more adjustable parameters. Choosing a good family is the art of the variational method; optimizing the parameters is the mechanics. This lesson walks through both for the cleanest possible example, the one-dimensional harmonic oscillator.

Choosing a family

A useful trial family should satisfy three things: it must be normalizable, it should respect the symmetries and boundary behaviour of the problem, and it should contain at least one knob to turn. For a smooth, symmetric, confining potential like the harmonic oscillator

H^=p^22m+12mω2x^2,\hat{H} = \frac{\hat{p}^2}{2m} + \frac{1}{2} m \omega^2 \hat{x}^2,

a natural guess is a single Gaussian centred at the origin,

ψα(x)=eαx2,α>0.\psi_\alpha(x) = e^{-\alpha x^2}, \qquad \alpha > 0.

It is square-integrable, even in xx (matching the symmetric potential), and decays at infinity. Its one parameter α\alpha controls the width: large α\alpha is a narrow spike, small α\alpha is a broad spread.

Computing the energy

With Gaussian integrals the kinetic and potential expectation values work out (in natural units =m=ω=1\hbar = m = \omega = 1, after normalizing) to

T^=α2,V^=18α,\langle \hat{T} \rangle = \frac{\alpha}{2}, \qquad \langle \hat{V} \rangle = \frac{1}{8\alpha},

so the variational energy is

E(α)=α2+18α.E(\alpha) = \frac{\alpha}{2} + \frac{1}{8\alpha}.

This captures the universal tension behind every confined ground state: shrinking the wavefunction (large α\alpha) lowers the potential energy but, by the uncertainty principle, raises the kinetic energy, and vice versa. The optimum balances the two.

Optimizing

Minimize over α\alpha by setting the derivative to zero:

dEdα=1218α2=0        α=12.\frac{dE}{d\alpha} = \frac{1}{2} - \frac{1}{8\alpha^2} = 0 \;\;\Longrightarrow\;\; \alpha^* = \frac{1}{2}.

Evaluating there,

E(α)=1212+1812=14+14=12.E(\alpha^*) = \frac{1}{2}\cdot\frac{1}{2} + \frac{1}{8 \cdot \tfrac{1}{2}} = \frac{1}{4} + \frac{1}{4} = \frac{1}{2}.

In these units the exact ground-state energy is 12ω=12\tfrac{1}{2}\hbar\omega = \tfrac{1}{2}. The Gaussian trial state nails it exactly — because the true oscillator ground state is a Gaussian, so the family contains the right answer. This is the best case: when the trial family includes the exact solution, the variational minimum is the exact energy.

Try it

Minimize E(α)=α/2+1/(8α)E(\alpha) = \alpha/2 + 1/(8\alpha) over α>0\alpha > 0 and return the minimum energy. Your code should return a single number.

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.