Two-Level Dynamics & Rabi Oscillations
Two-Level Dynamics & Rabi Oscillations
This is the last lesson of Term 1, and it is where the physics becomes the machine. We take the propagator from the previous lesson and apply it to the one Hamiltonian every qubit platform implements: a driven two-level system. Out falls the Rabi oscillation — population sloshing coherently between and — and, with it, the punchline of the entire term: a quantum gate is just time evolution run for a chosen duration. Driving for the right time turns into ; that pulse is the gate. Everything in Term 2 (gates and circuits) and Term 4.4 (how superconducting qubits actually do this) rests here.
Learning Objectives
After this lesson you will be able to:
- Write the two-level drive Hamiltonian and identify the on-resonance limit .
- Derive the Rabi formula for a qubit starting in , two independent ways (closed-form exponential and energy eigenbasis).
- Generalize to nonzero detuning: with .
- Interpret Rabi dynamics as Bloch-vector precession about the drive axis.
- Show that evolving under for time realizes , so a -pulse is an gate — connecting analog dynamics to the digital gate model.
Intuition
Picture a qubit as a tiny magnet (a Bloch vector) sitting in a static field along that splits the energies of and by . Left alone, the vector just precesses about and the populations never change — and are energy eigenstates (this was Example 1 of the previous lesson). To move population between the levels you have to push the qubit off the -axis: you apply an oscillating drive (a microwave or laser tone) that, viewed in the right rotating frame, becomes a constant field along an axis in the equatorial plane. The Bloch vector then precesses about that tilted axis — and as it swings, its -projection runs from down to and back. That coherent round-trip of population is a Rabi oscillation.
The drive strength (the Rabi frequency) sets how fast the vector swings. If the drive is perfectly on resonance with the qubit's energy gap, the rotation axis lies flat on the equator and the population swings all the way to . If the drive is detuned, the axis tilts up out of the plane, the precession cone is narrower, and the qubit never fully reaches . So the two knobs are: how hard you drive (amplitude ) and how far off you are in frequency (detuning ). Stop the drive after exactly half a swing and you have flipped the qubit — that is an gate, built out of physics.
Theory
Symbol note. is the Hamiltonian here, never the Hadamard. , rotation gates use the half-angle convention (Appendix C, E).
The driven two-level Hamiltonian
A qubit with bare energy splitting has free Hamiltonian (energies for ). Couple it to a classical field oscillating at drive frequency with amplitude (Rabi frequency) ; the coupling is a transverse term:
This is time-dependent, so the clean machinery does not apply directly. The standard move is to pass to the frame rotating at the drive frequency — i.e. substitute — and drop the fast-oscillating counter-rotating term (the rotating-wave approximation, RWA). The transformed Hamiltonian becomes time-independent (derivation deferred to Term 4.4, where it is the working model of a real device):
with detuning (how far the drive is off resonance) and Rabi frequency (how hard we drive). This single, constant, Hermitian operator generates all the dynamics below. The whole point of the rotating frame is that it converts an oscillating drive into the kind of constant- problem we solved in 1.6.1.
On resonance: deriving
Set the drive exactly on resonance, . Then
Start in and apply the propagator. Because , the exponential closes into trig (Appendix E, §3):
Apply it to :
The Born rule (Appendix C) gives the excited-state population:
and , so at all times (unitarity). The population oscillates fully between and at angular frequency — these are Rabi oscillations. The period is ; the qubit is fully inverted () at .
Second derivation (energy eigenbasis), as a cross-check. The eigenstates of are with energies . Expand and evolve each by its phase (the recipe from 1.6.1):
Now , so
giving — identical. ∎ The oscillation frequency is exactly the Bohr frequency (energy difference) of the drive Hamiltonian, as the general theory predicted.
Off resonance: detuning and the effective Rabi frequency
Restore the detuning, with . Write and the unit axis . Then , and since the half-angle exponential applies again (Appendix E, §3):
The amplitude to land in from comes from the off-diagonal piece of , which carries the factor . Squaring gives the generalized Rabi formula:
Read off the physics: detuning makes the oscillation faster (frequency ) but shallower — the maximum reachable population is . You can no longer fully flip the qubit off resonance. Resonance () is special precisely because it is the only setting that achieves complete population transfer. (Sweeping and watching this contrast collapse is how experimentalists find a qubit's frequency — a Rabi/chevron measurement, Term 4.4.)
Bloch-sphere picture: precession about the drive axis
The Liouville/Ehrenfest machinery from 1.6.1 makes the geometry exact. For a single qubit, and (Appendix E, §1). Feeding through the Pauli commutators yields the Bloch equation:
This is exactly the equation of a vector precessing about the axis at angular speed — the classical-magnet picture is literally correct. On resonance lies on the equator along : starting from the north pole (), the vector precesses in the – plane down through the south pole () and back. Its height is , reproducing . With detuning the axis tilts up to ; the precession cone no longer reaches the south pole, so never hits — the geometric reason the population transfer is incomplete.
The key computing connection: a gate is timed evolution
Compare the on-resonance propagator with the rotation gate from Appendix E:
So letting the qubit evolve under the drive for a duration implements the gate with rotation angle . The "gate angle" is the Rabi frequency times the pulse length — you dial it with time. Special pulses:
| Pulse | Duration | Angle | Gate | Effect on | |---|---|---|---|---| | -pulse | | | | (equator) | | -pulse | | | | | | -pulse | | | | |
A -pulse is an gate (NOT gate): , which equals up to the global phase — and global phase is physically invisible (Appendix C). It sends , the very first peak of the Rabi curve . This is not an analogy — it is how is physically realized on real hardware, by sending a calibrated -pulse. The "digital" gate model of Term 2.1 is an abstraction layered on top of exactly this analog control; how the pulse is engineered on a superconducting qubit (and what limits its fidelity) is the subject of Term 4.4. Choosing a different drive axis (a -quadrature drive gives ; the term gives ) lets a single physical mechanism realize any single-qubit rotation — which, by the Euler/ZYZ decomposition (Appendix E, §3), is all of .
Worked Examples
Example 1 — A -pulse is an gate
Drive on resonance, , for the time (so ):
Acting on : . Up to the irrelevant global phase , this is — a complete bit flip, with . Acting on : . So the -pulse swaps exactly as the (NOT) gate does. Since , the standard gate and the physical -pulse differ only by global phase — operationally the same gate.
Example 2 — Detuned drive: incomplete transfer
Drive with and detuning (so the drive is off resonance by exactly the Rabi frequency). Then and the maximum reachable excited population is
The full curve is . Compared to the resonant case it oscillates faster (frequency instead of ) but only ever reaches halfway up — a -pulse duration no longer produces a clean bit flip. This is why qubit drives must be carefully calibrated to resonance: a control error in both speeds up and caps the rotation, corrupting the intended gate. (Detuning errors are a standard coherent-error model analyzed in Term 4.)
Hands-on (Python)
We simulate the dynamics with scipy.linalg.expm, plot the Rabi oscillation, verify the -pulse
realizes , and overlay a detuned curve to see incomplete transfer.
import numpy as np
from scipy.linalg import expm
import matplotlib.pyplot as plt
# Pauli matrices (Appendix E)
I = np.eye(2, dtype=complex)
X = np.array([[0, 1], [1, 0]], dtype=complex)
Z = np.array([[1, 0], [0, -1]], dtype=complex)
ket0 = np.array([1, 0], dtype=complex)
ket1 = np.array([0, 1], dtype=complex)
def H_drive(Omega, Delta):
"""Rotating-frame two-level Hamiltonian H = (Δ/2)Z + (Ω/2)X."""
return 0.5 * Delta * Z + 0.5 * Omega * X
def P1(t, Omega, Delta):
"""Excited-state population starting from |0>, via U(t)=exp(-iHt)."""
U = expm(-1j * H_drive(Omega, Delta) * t)
psi = U @ ket0
return np.abs(ket1 @ psi) ** 2 # Born rule |<1|ψ(t)>|²
# --- Resonant Rabi oscillations: P1(t) = sin²(Ωt/2) ---
Omega = 2.0
ts = np.linspace(0, 3 * np.pi / Omega, 500)
P1_num = np.array([P1(t, Omega, Delta=0.0) for t in ts])
P1_exact = np.sin(Omega * ts / 2) ** 2
print("resonant: max |numeric - sin²(Ωt/2)| =", np.max(np.abs(P1_num - P1_exact))) # ~1e-15# --- The π-pulse maps |0> -> |1> and equals X up to global phase ---
t_pi = np.pi / Omega # θ = Ω t_pi = π
U_pi = expm(-1j * H_drive(Omega, 0.0) * t_pi)
psi_pi = U_pi @ ket0
print("ψ(t_π) =", np.round(psi_pi, 3)) # [0.-0.j 0.-1.j] = -i|1>
print("P1(t_π) =", round(P1(t_pi, Omega, 0.0), 12)) # 1.0 (full inversion)
# U_pi equals X up to a global phase: U_pi = -i X ⇒ i*U_pi == X
print("U_π == X up to global phase? ", np.allclose(1j * U_pi, X)) # True# --- Detuning: faster but shallower oscillations (incomplete transfer) ---
fig, ax = plt.subplots(figsize=(7.5, 3.4))
for Delta, style in [(0.0, "-"), (Omega, "--"), (2 * Omega, ":")]:
Oeff = np.sqrt(Omega**2 + Delta**2)
cap = Omega**2 / (Omega**2 + Delta**2) # P1_max = Ω²/Ω_eff²
curve = np.array([P1(t, Omega, Delta) for t in ts])
ax.plot(ts, curve, style, lw=2,
label=fr"$\Delta={Delta/Omega:.0f}\,\Omega$ ($P_1^{{\max}}={cap:.2f}$)")
ax.axhline(1.0, color="gray", ls=":", lw=0.8)
ax.set_xlabel("time t"); ax.set_ylabel(r"$P_1(t)$")
ax.set_title(r"Rabi oscillations: resonant vs. detuned ($\Omega=2$)")
ax.legend(loc="upper right"); fig.tight_layout()
plt.show()
# On resonance the population reaches 1 (a clean X gate at t=π/Ω);
# detuned drives oscillate faster (Ω_eff) but cap below 1.# --- The gate view: evolving (Ω/2)X for time t IS the gate R_x(Ωt) ---
def Rx(theta): # Appendix E half-angle convention
return np.cos(theta/2) * I - 1j * np.sin(theta/2) * X
t = 0.37
U_t = expm(-1j * H_drive(Omega, 0.0) * t)
print("U(t) == R_x(Ω t)? ", np.allclose(U_t, Rx(Omega * t))) # TrueBraket note (optional). Because , the identical dynamics is a single gate in the SDK —
from braket.circuits import Circuit; Circuit().rx(0, Omega * t)on aLocalSimulator— and the -pulse is justCircuit().x(0). That is the whole bridge from this analog picture to the digital circuit model. We build Braket circuits properly in Term 2.1; the pulse-level control beneath the gate is Term 4.4.
Exercises
E1 (easy). A qubit has Rabi frequency MHz on resonance. How long is a -pulse (an gate)? A -pulse?
Solution
. The -pulse is half that, . (These ns-scale gate times are realistic for superconducting qubits, Term 4.4.)
E2 (easy). On resonance, at what times is the qubit in an equal superposition, ?
Solution
$P_1 = \sin^2(\Omega t/2) = \tfrac12 \Rightarrow \sin(\Omega t/2) = \tfrac1{\sqrt2} \Rightarrow \Omega t/2 = \pi/4 + k\pi/2t = \frac{\pi}{2\Omega}(2k+1)k\ge0$. The first is the -pulse , which puts the Bloch vector on the equator.
E3 (medium). Derive the generalized Rabi formula's maximum, , and explain geometrically why detuning prevents full inversion.
Solution
is maximized when , giving . Geometrically the Bloch vector precesses about , which makes angle with where . Starting at the north pole, the vector sweeps a cone of half-angle about ; its lowest point reaches , and recovers the formula. Only (, axis on the equator) lets the cone reach the south pole. ∎
E4 (medium). Show and explain in one sentence why the -pulse counts as the gate despite the prefactor.
Solution
. The is a global phase, which has no observable consequence (Appendix C) — and produce identical measurement statistics on every state — so the -pulse is the gate physically. ∎
E5 (hard). From and , derive the Bloch equation and solve it for .
Solution
. Using , , : . So forces , i.e. . With : , , — precession about , and as required. ∎
E6 (hard). A -pulse on resonance returns every population to its start (), yet . Construct a setting in which this is physically observable, and explain why it does not contradict "global phase is unobservable."
Solution
. On a single, isolated qubit the is a global phase and unobservable. But make it relative: take two qubits in and apply the drive to qubit conditioned on (a controlled rotation). Then the branch picks up while the branch does not, yielding — a measurable phase flip on , detectable by measuring in the -basis. The rule "global phase is unobservable" concerns an overall phase on the whole state; once the multiplies only part of a superposition it becomes a relative phase, which is physical. (This -periodicity is the spin- signature of , and the mechanism behind controlled-phase gates, Term 2.1.) ∎
Checkpoint
- Write the rotating-frame two-level Hamiltonian and name each parameter.
- Derive for starting from . What is the period?
- Give the detuned Rabi formula and the effective frequency; what is the maximum ?
- Geometrically, what is a Rabi oscillation on the Bloch sphere?
- Which pulse realizes an gate, and why is that the central message of this term?
Answers
- : is the detuning, is the Rabi frequency (drive amplitude).
- , so and ; period .
- with ; maximum , equal to only on resonance.
- Precession of the Bloch vector about the drive axis at rate (Bloch equation ); on resonance the axis is and the vector swings from the north pole to the south pole and back.
- The on-resonance -pulse (): , an gate up to global phase. This shows a quantum gate is just time evolution run for a chosen duration — the physics (Term 1) is the gate model (Term 2).
Further Reading
- [Sak] Sakurai & Napolitano, §5.5 — time-dependent two-level problems, the rotating-wave approximation, and the Rabi formula derived in full (with explicit).
- [NC] Nielsen & Chuang, §4.2 and §7.7 — single-qubit rotations , and how physical Hamiltonians realize gates on real hardware.
- [Gri] Griffiths & Schroeter, §11.1–11.2 — two-level systems driven by a time-dependent perturbation; Rabi flopping.
- [Pre] Preskill, Ph219, Ch. 3 — qubit dynamics, the Bloch equation, and control.
← Prev: Time Evolution · Up: Term 1 · Next: Single-Qubit Gates (Term 2) →