Two-Level Systems & Spin-1/2
Quantum Physics
What you need to know first 3 concepts, 2 layers
The requisite-knowledge inventory for this page, bottom-up: the primitives at the base, combined upward until you reach what this page assumes. Skim the layers you already own; start wherever the ground gets unfamiliar.
- base
- Linear algebraconcept
- L1
- ↳you are here
1 of these are concepts without a dedicated page yet — the grey chips. Following the linked ones first makes the rest land.
The hydrogen atom gets the press, but the workhorse model of quantum mechanics is smaller: two levels and a 2×2 Hamiltonian. Any time two states of a system sit close together in energy and far from everything else — two sides of a molecule, two spin orientations, two neutrino flavors, the two states of a qubit — the rest of the spectrum is spectators and the physics is this page. Everything is exactly solvable, every formula fits on one line, and the three phenomena that fall out (level repulsion, precession, Rabi flopping) reappear across the whole of physics wearing different costumes.
The general 2×2 problem
Write the Hamiltonian in the basis of two "obvious" states (left/right, up/down, flavor states — whatever the problem hands you):
with the diagonal separation and the coupling (taken real). The eigenvalues are
and the eigenvectors mix the basis states through one angle, : the ground state is -shaped, fully mixed () when the diagonal is degenerate, barely mixed when . Sweep through zero and the two eigenvalues do NOT cross: they approach to a minimum gap of and repel. That avoided crossing is the single most recycled picture in quantum physics — it is the same -flavored structure you meet scaled up in the RPA eigenproblem, and the Zeeman mixing engine the positronium page runs.
Worked numbers: the ammonia doublet
The nitrogen in NH₃ can sit above or below the H₃ plane — states , degenerate by symmetry (), coupled by tunneling (). The eigenstates are the symmetric and antisymmetric combinations, split by : measured at 23.87 GHz — — the line the first maser ran on. Now switch on an electric field along the symmetry axis. The dipole moment tilts the diagonal by , and the splitting becomes . The crossover field where the two terms tie is : . At 50 kV/cm the doublet has opened from 23.87 to 77.8 GHz and the mixing angle has fallen from 45° to 8.9° — the eigenstates have re-localized to "nitrogen up" and "nitrogen down." One 2×2 diagonalization, and you have explained the quadratic-then-linear Stark effect and the operating principle of the ammonia maser's state selector.
Spin-1/2 in a field: precession
The canonical two-level system is a spin in a magnetic field, . For the eigenstates are split by with — and a state pointing any other direction precesses about at exactly , the expectation values chasing each other like a gyroscope. For a proton at 1 T, — the dial number of every MRI magnet, and the reason "1.5 T scanner" and "64 MHz scanner" are the same sentence.
Drive it: Rabi oscillations
Now shake the system near resonance — an oscillating field coupling the two levels. In the rotating frame (dropping the counter-rotating term — the rotating-wave approximation), the population of the upper state oscillates as
with the detuning from resonance. On resonance the transfer is complete no matter how weak the drive — weakness only slows the flopping. Detune by one drive-strength and the peak transfer drops to exactly half. Both claims are checkable against the full time-dependent Schrödinger equation, counter-rotating term included — the code below integrates it with RK4 at :
# Full lab-frame drive vs the rotating-wave (RWA) Rabi formula.
# H(t) = [[-w0/2, w1 cos(wt)], [w1 cos(wt), w0/2]], RK4, weak drive w1 = w0/20.
import numpy as np
om0, om1 = 2*np.pi*1.0, 2*np.pi*0.05
for delta in (0.0, om1): # on resonance; detuned by om1
w = om0 - delta
def rhs(t, c):
H = np.array([[-om0/2, om1*np.cos(w*t)],
[om1*np.cos(w*t), om0/2]], dtype=complex)
return -1j * H @ c
c = np.array([1, 0], dtype=complex); T = 1.5*2*np.pi/om1; n = 40000; dt = T/n
P2 = 0.0
for i in range(n):
t = i*dt
k1 = rhs(t, c); k2 = rhs(t+dt/2, c+dt/2*k1)
k3 = rhs(t+dt/2, c+dt/2*k2); k4 = rhs(t+dt, c+dt*k3)
c += dt/6*(k1+2*k2+2*k3+k4); P2 = max(P2, abs(c[1])**2)
Om = np.hypot(delta, om1)
print(f"numeric max P2 = {P2:.4f} RWA: (w1/Om)^2 = {om1**2/Om**2:.4f}")
# output:
# numeric max P2 = 0.9998 RWA: (w1/Om)^2 = 1.0000
# numeric max P2 = 0.5192 RWA: (w1/Om)^2 = 0.5000 On resonance: numeric 0.9998 vs RWA 1.0000. Detuned: 0.5192 vs 0.5000 — the extra 0.019 is the counter-rotating term the approximation dropped, the seed of the Bloch–Siegert shift, visible already at 5% drive strength if you look closely. A π-pulse — drive on resonance for , flipping the state completely — is the basic move of NMR and of every gate-based quantum computer: for a proton with a 10 μT rotating field, that pulse lasts 1.17 ms.
Exercises for everything above — ammonia, Larmor, neutrinos, the positronium m = 0 pair, qubit sweet spots, π-pulse timing — are in Two-Level Systems by Hand.
Try First
Each prompt asks a checkable question about the working code or math above — predict an output, derive a sign, state an invariant, find a bug. Commit to an answer before clicking "reveal." That commitment is the whole point: if your answer matched, you understand the piece you were looking at; if it didn't, that's the part worth re-reading.