|q⟩ Bad Qubits

beginner · Physics · Particle in a Box

Expectation Values in the Box

Every measurable quantity in quantum mechanics is associated with an operator. The expectation value of an observable A^\hat{A} in state ψ|\psi\rangle is the average outcome over many identical measurements:

A=ψA^ψ=ψ(x)A^ψ(x)dx.\langle A \rangle = \langle \psi | \hat{A} | \psi \rangle = \int_{-\infty}^{\infty} \psi^*(x)\,\hat{A}\,\psi(x)\,dx.

Position expectation value: x\langle x \rangle

For the nn-th eigenstate of the infinite square well (ψn(x)=2/Lsin(nπx/L)\psi_n(x) = \sqrt{2/L}\,\sin(n\pi x/L), 0xL0 \le x \le L), the position expectation value is

xn=0Lxψn(x)2dx=2L0Lxsin2 ⁣(nπxL)dx.\langle x \rangle_n = \int_0^L x\,|\psi_n(x)|^2\,dx = \frac{2}{L}\int_0^L x\,\sin^2\!\left(\frac{n\pi x}{L}\right)dx.

Replacing sin2θ=12(1cos2θ)\sin^2\theta = \tfrac{1}{2}(1 - \cos 2\theta) splits the integral into two parts:

xn=1L0Lxdx1L0Lxcos ⁣(2nπxL)dx.\langle x \rangle_n = \frac{1}{L}\int_0^L x\,dx - \frac{1}{L}\int_0^L x\cos\!\left(\frac{2n\pi x}{L}\right)dx.

The first integral gives L/2L/2. The second integral, evaluated by parts with u=xu = x and dv=cos(2nπx/L)dxdv = \cos(2n\pi x/L)\,dx, produces a boundary term proportional to sin(2nπ)=0\sin(2n\pi) = 0 plus an antiderivative term proportional to cos(2nπ)cos(0)=11=0\cos(2n\pi) - \cos(0) = 1 - 1 = 0, so it vanishes exactly. Therefore

xn=L2for all n.\langle x \rangle_n = \frac{L}{2} \quad \text{for all } n.

This result is not a coincidence: every eigenstate has the same left-right symmetry about the midpoint of the well, so the mean position is always the center regardless of the quantum number.

Energy expectation value

The energy eigenvalues are En=n2π22/(2mL2)E_n = n^2\pi^2\hbar^2/(2mL^2). Because ψn\psi_n is an eigenstate of the Hamiltonian, a measurement of energy on ψn\psi_n always returns EnE_n with certainty:

En=En.\langle E \rangle_n = E_n.

The interesting case arises when the particle is in a superposition of eigenstates. Suppose

ψ=ncnψn,ncn2=1.\psi = \sum_n c_n \psi_n, \qquad \sum_n |c_n|^2 = 1.

Because the ψn\psi_n are orthonormal, the cross terms ψmH^ψn\langle \psi_m | \hat{H} | \psi_n \rangle vanish for mnm \ne n, and

E=ncn2En.\langle E \rangle = \sum_n |c_n|^2 E_n.

This is a weighted average of eigenvalues, with the probability cn2|c_n|^2 serving as each weight. A measurement collapses the state to a single eigenstate ψn\psi_n, yielding energy EnE_n with probability cn2|c_n|^2; the expectation value is the long-run mean of those outcomes.

Equal superposition of n=1n = 1 and n=2n = 2

Take ψ=(ψ1+ψ2)/2\psi = (\psi_1 + \psi_2)/\sqrt{2}, so c12=c22=1/2|c_1|^2 = |c_2|^2 = 1/2. Then

E=12E1+12E2=E1+E22.\langle E \rangle = \tfrac{1}{2}E_1 + \tfrac{1}{2}E_2 = \tfrac{E_1 + E_2}{2}.

With L=1nmL = 1\,\text{nm} and an electron, E10.376eVE_1 \approx 0.376\,\text{eV} and E2=4E11.504eVE_2 = 4E_1 \approx 1.504\,\text{eV}, giving

E=0.376+1.5042eV0.940eV.\langle E \rangle = \frac{0.376 + 1.504}{2}\,\text{eV} \approx 0.940\,\text{eV}.

Try it

This is a numerical exercise — return a number. An electron is in the state (ψ1+ψ2)/2(\psi_1 + \psi_2)/\sqrt{2} inside an infinite square well of width L=1nmL = 1\,\text{nm}. Compute the expectation value of energy E\langle E \rangle in electron-volts.

Run your code to see the quantum state.

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