Fundamentals / Physics / Quantum mechanics

Operators and the quantum harmonic oscillator

Use commutators and ladder operators to derive an energy spectrum and connect its ground state with the position–momentum uncertainty bound.

From first principles

Build the oscillator ladder from the canonical commutator

Near a stable minimum use the one-dimensional harmonic Hamiltonian \(H=p^2/(2m)+m\omega^2x^2/2\) and the canonical commutator \([x,p]=i\hbar\). Combine displacement and momentum into dimensionless operators so the two quadratic energy terms acquire the same coefficient:

\[a=\sqrt{\frac{m\omega}{2\hbar}}\,x+\frac{ip}{\sqrt{2m\hbar\omega}},\]
\[[a,a^\dagger]=1.\]

Multiplying \(a^\dagger a\) produces the two energy terms and a cross term proportional to the commutator. Retaining that cross term fixes the offset. Commuting the Hamiltonian with \(a\) then shows how it acts on an energy eigenstate:

\[H=\hbar\omega(a^\dagger a+\tfrac12),\]
\[H(a|E\rangle)=(E-\hbar\omega)a|E\rangle .\]

The squared norm \(\|a|E\rangle\|^2=E/(\hbar\omega)-1/2\) cannot be negative. Repeated lowering must end at a state annihilated by \(a\), with energy \(\hbar\omega/2\). Raising creates successive normalized states and gives

\[E_n=(n+1/2)\hbar\omega.\]

The spacing follows from the algebra; the added half quantum reflects the impossibility of independently setting both noncommuting fluctuations to zero.

Background · Commutator
\[[A,B]=AB-BA\]

Order matters. The expectation of the commutator controls a lower bound on the product of uncertainties when the state lies in the relevant operator domains.

Derivation and applications

Build position and momentum fluctuations from adjacent levels

A number-state oscillator has a definite energy and an uncertain position. How large are its fluctuations, and what survives when the mean position vanishes? Assume a one-dimensional harmonic trap with mass \(m\) and angular frequency \(\omega\). The ladder algebra gives

\[a|n\rangle=\sqrt n\,|n-1\rangle,\]
\[a^\dagger|n\rangle=\sqrt{n+1}\,|n+1\rangle.\]

Define the ground-state length \(x_0=\sqrt{\hbar/(2m\omega)}\) and momentum scale \(p_0=\sqrt{m\hbar\omega/2}\).

\[x=x_0(a+a^\dagger),\]
\[p=ip_0(a^\dagger-a).\]

Both operators take \(|n\rangle\) into orthogonal neighbouring states. Their diagonal means vanish. To get a variance, compute the squared norm of the state after application. This avoids dropping the commutator when expanding the square:

\[\|x|n\rangle\|^2=x_0^2\big(\|\sqrt n\,|n-1\rangle\|^2+\|\sqrt{n+1}\,|n+1\rangle\|^2\big)=(2n+1)x_0^2 .\]

The relative minus sign in \(p|n\rangle\) disappears on taking the norm because the neighbours are orthogonal. It follows that

\[\Delta x=\sqrt{2n+1}\,x_0,\]
\[\Delta p=\sqrt{2n+1}\,p_0,\]
\[\Delta x\,\Delta p=(n+\tfrac12)\hbar .\]

The ground state attains the minimum uncertainty. Excited number states exceed that lower bound despite having no energy uncertainty. The same calculation gives equal kinetic and potential energy means, each \((n+1/2)\hbar\omega/2\). Each adjacent-level matrix element also specifies which spectral lines a weak displacement-dependent perturbation can drive.

Worked example

Estimate a trapped ion’s spatial spread

For \(m=6.64\times10^{-26}\) kg and \(\omega=2\pi(1.00\,\mathrm{MHz})\), the natural width is \(x_0=11.2\) nm. The \(n=2\) preparation has \(\Delta x=\sqrt5\,x_0=25.1\) nm and \(\Delta x\Delta p=2.50\hbar\). Dividing the latter by the position spread gives \(\Delta p=1.05\times10^{-26}\) kg m/s. The width would remain the same at later times in this stationary energy state.

Second application

Distinguish two preparations with the same energy mean

Compare the pure state \(|1\rangle\) with an equal incoherent mixture of \(|0\rangle\) and \(|2\rangle\). Both have mean energy \(1.50\hbar\omega\) and \(\langle x^2\rangle=3x_0^2\), because these quantities are linear in \(n\). In the mixture, the two energy outcomes differ from the mean by \(\pm\hbar\omega\), so \(\Delta E=\hbar\omega\); the pure number state has \(\Delta E=0\). An energy-resolved measurement distinguishes the preparations even when a width measurement cannot.

Try it · Oscillator uncertainty

Vary the physical parameters in the derived relation. Use the units and assumptions in the readout to connect the curves to the two worked examples. A parameter study can test the forward prediction; the same relation can then be inverted to infer a parameter from a measurement.

Quantise near a stable minimum

A molecular bond stretched slightly from equilibrium has a potential \(V(x)\simeq V(0)+kx^2/2\) if the equilibrium derivative vanishes and the curvature \(k\) is positive. For relative motion the relevant mass is the reduced mass of the two nuclei. Discard the additive constant and write \(k=m\omega^2\). Quantum mechanics assigns the Hamiltonian \(\hat H=\hat p^2/(2m)+m\omega^2\hat x^2/2\). Its two terms do not commute because position and momentum obey \([\hat x,\hat p]=i\hbar\).

For a normalised state, the expectation of an operator is \(\langle A\rangle=\langle\psi|\hat A|\psi\rangle\). Applying the Cauchy–Schwarz inequality to \((\hat x-\langle x\rangle)|\psi\rangle\) and \((\hat p-\langle p\rangle)|\psi\rangle\) shows that the product of their norms is at least the magnitude of their inner product. The imaginary part of that inner product is controlled by the commutator. One obtains

\[\Delta x\,\Delta p\ge\hbar/2,\]

where the spreads are standard deviations of repeated measurements on equally prepared systems.

Factor a positive Hamiltonian

Define dimensionless operators \(a=\sqrt{m\omega/(2\hbar)}\,\hat x+i\hat p/\sqrt{2m\hbar\omega}\) and \(a^\dagger\) as its adjoint. Multiplying them in the indicated order and using the commutator yields \([a,a^\dagger]=1\) and

\[\hat H=\hbar\omega(a^\dagger a+\tfrac12).\]

For any state the expectation of \(a^\dagger a\) is \(\|a\psi\|^2\), which cannot be negative. The Hamiltonian therefore has a lower bound \(\hbar\omega/2\). Interchanging operator order while treating \(x\) and \(p\) as ordinary numbers would miss this term. It accounts for the fact that a state cannot simultaneously place the particle at the bottom of the well and give it precisely zero momentum.

Now compute the commutator of \(\hat H\) with \(a\). The identity \([AB,C]=A[B,C]+[A,C]B\) gives

\[[\hat H,a]=-\hbar\omega a.\]

Operating with \(a\) on an energy eigenstate either gives zero or produces a new eigenstate lower by \(\hbar\omega\). Successive lowering must terminate since the energy cannot become negative. The final state obeys \(a|0\rangle=0\). Raising from it gives \(E_n=(n+1/2)\hbar\omega\) and the normalisation factors \(a|n\rangle=\sqrt n\,|n-1\rangle\) and \(a^\dagger|n\rangle=\sqrt{n+1}\,|n+1\rangle\).

Find the shape behind the lowest level

Use \(\hat p=-i\hbar\,d/dx\) in the ground-state condition. It reduces to \(d\psi_0/dx=-(m\omega/\hbar)x\psi_0\), whose square-integrable solution is proportional to \(\exp[-m\omega x^2/(2\hbar)]\). Normalising the squared Gaussian gives position variance \(\hbar/(2m\omega)\). Its momentum variance is \(m\hbar\omega/2\). The product of standard deviations is exactly \(\hbar/2\), so the ground state saturates the general uncertainty bound.

The mean potential and kinetic energies in this state are both \(\hbar\omega/4\). Increasing the stiffness narrows the position distribution and raises the momentum spread. This provides a physical interpretation of the increasing ground energy which is independent of the ladder notation. In an excited energy eigenstate the mean position still vanishes by parity, yet its variance is larger.

Read a vibrational line and a selection rule

Take effective mass \(1.0\times10^{-26}\) kg and harmonic frequency \(f=5.0\) THz. Then \(\omega=2\pi f\), adjacent levels differ by \(hf=20.7\) meV, and the zero-point energy is 10.3 meV. The ground-state position standard deviation is \(1.30\times10^{-11}\) m. A spectral measurement of adjacent level spacings determines the curvature-to-mass ratio but cannot separate mass and stiffness without another measurement.

A weak oscillatory perturbation proportional to displacement has matrix elements of \(\hat x\propto a+a^\dagger\). It therefore connects adjacent number states, giving the dipole selection rule \(\Delta n=\pm1\) within the harmonic model and a linear coupling. If a real molecular spectrum contains overtones or nonuniform spacings, anharmonicity or a nonlinear dependence of dipole moment on displacement can supply the missing physics.

It is possible to recover the zero-point energy without solving a differential equation. A centred packet of spatial variance \(\sigma_x^2\) has potential energy \(m\omega^2\sigma_x^2/2\). The uncertainty relation bounds its kinetic energy below by \(\hbar^2/(8m\sigma_x^2)\) when mean momentum vanishes. Minimizing their sum over width gives \(\sigma_x^2=\hbar/(2m\omega)\) and an energy bound \(\hbar\omega/2\). A Gaussian saturates the uncertainty inequality and reaches the bound. Making a classical oscillator sit identically at rest would require both energy contributions to vanish simultaneously, which the commutator forbids.

Displace an oscillator ground state

A harmonic oscillator can move almost like a classical oscillator while retaining its smallest quantum position uncertainty. Prepare the ground state and suddenly shift the centre of its trapping potential by distance \(d\), without changing frequency. In the coordinates of the new well the old Gaussian starts displaced by \(-d\) with mean momentum zero. Define a coherent state as an eigenstate of the lowering operator,

\[\hat a|\alpha\rangle=\alpha|\alpha\rangle.\]

Its displacement and momentum are encoded by \(\alpha=\sqrt{m\omega/(2\hbar)}\langle x\rangle+i\langle p\rangle/\sqrt{2m\hbar\omega}\).

To find its energy distribution expand \(|\alpha\rangle=\sum_n c_n|n\rangle\). Applying the lowering operator and equating the coefficient of \(|n\rangle\) gives

\[\sqrt{n+1}c_{n+1}=\alpha c_n.\]

Recursion and normalization give \(c_n=e^{-|\alpha|^2/2}\alpha^n/\sqrt{n!}\) up to a common phase. The energy index follows a Poisson distribution,

\[P_n=e^{-\bar n}\frac{\bar n^n}{n!},\]
\[\bar n=|\alpha|^2,\]
\[\langle E\rangle=\hbar\omega(\bar n+\tfrac12).\]

Free evolution multiplies each coefficient by \(e^{-in\omega t}\) apart from a common factor, turning \(\alpha\) into \(\alpha e^{-i\omega t}\). Position and momentum expectations execute the corresponding classical orbit, and the packet stays a fixed-width Gaussian because adjacent energy levels have exactly uniform spacing. A potential with appreciably unequal spacings instead allows these components to lose their phase alignment over time.

Estimate the number of excited quanta

Let an effective mass \(m=1.00\times10^{-26}\) kg oscillate at \(\omega=1.00\times10^{13}\) rad/s. Its ground-state position standard deviation is

\[x_{\rm zpf}=\sqrt{\hbar/(2m\omega)}=2.30\times10^{-11}\,\mathrm{m}.\]

Shift the well by \(d=2x_{\rm zpf}=46.0\) pm. In the new coordinate \(\alpha=-d/(2x_{\rm zpf})=-1\), giving \(\bar n=1\). Hence ground and first excited energies each occur with probability \(e^{-1}=0.368\), and the second excited energy occurs with probability \(e^{-1}/2=0.184\).

The energy added above the ground state is \(\hbar\omega=6.58\) meV, identical to the classical change \(m\omega^2d^2/2\) immediately following the shift. Equality of mean energies does not make a single measurement deterministic: the energy standard deviation is also \(\hbar\omega\) in this preparation. Moving the minimum quasistatically instead of suddenly can leave the system close to its instantaneous ground state and add essentially no excitation, provided the motion of the trap is slow on the oscillation timescale.

Number statistics provide a stringent check on the sudden-shift model. A coherent state with mean occupation one has probability \(1-2.5/e=0.0803\) of occupying level three or higher. Failure to observe those outcomes in a small sample would be unsurprising, but persistent absence in a well-resolved large sample would contradict the ideal state. Two displaced packets with opposite signs of \(\alpha\) have the same number distribution and different later position records. Thus energy spectroscopy checks the magnitude of a displacement while a timed position measurement also checks its phase around the oscillator orbit.

A time sequence with the same mean added energy can still have different number statistics if the trap frequency changes along with its centre. A frequency jump changes the natural Gaussian width and can prepare a squeezed state. Observing a breathing position variance in addition to centre motion would reveal this extra change in the restoring curvature.

Recover oscillator nodes and parity from a position distribution

Apply the creation operator to a normalised Gaussian. The first two excited wavefunctions acquire the polynomial factors \(\sqrt2 x\) and \((2x^2-1)/\sqrt2\), where \(x\) is in oscillator lengths. Compute densities only after the amplitude has been formed.

Recover oscillator nodes and parity from a position distribution. Horizontal axis: Position / oscillator length. Vertical axis: Probability density × oscillator length. Data follow the figure.
The odd first-excited state has a node at the origin, and the second-excited state has nodes at ±1/√2. Density reveals the nodes but loses the sign between them, which matters when building a coherent superposition.
Try it · Oscillator density

Change the inputs and compare the recalculated curves with the preceding derivation and baseline figure. The axes give the units; the numerical readout states the model assumptions and any limiting cases. Reset the inputs to return to the reference setting.

Read values from the plot
Probability density × oscillator length at selected values of Position / oscillator length.
Position / oscillator lengthn = 0n = 1n = 2
−3.61.3273e−63.4404e−50.00041213
−1.80.0220960.143180.33177
4.4409e−160.564192.2253e−310.28209
1.80.0220960.143180.33177
3.61.3273e−63.4404e−50.00041213

Download all 401 plotted samples (CSV)

Study the full derivation

Why an oscillator can move without its packet spreading · Quantum states, dynamics and measurement

Start with the measured mass and curvature of a potential. Factor its Hamiltonian, prove the energy ladder, construct a freely moving Gaussian from number states and find when squeezing or anharmonicity changes that prediction.