Chapter 05

Rotations and physical control of a qubit

A qubit starts in $|0\rangle$. For how long, and about which axis, must it be driven so that a measurement afterwards reads 1 with certainty, or with probability one half? And why can a constant drive slightly off frequency, starting from $|0\rangle$, never reach certainty, however long it lasts?

Before you start: The Bloch sphere and Pauli matrices (Chapter 1); gates as matrices (Chapter 4). The Schrödinger equation, which the companion guide introduces in its wavefunction essay; its spin essay covers spin ½ and the Pauli matrices. That guide writes $H$ for the Hamiltonian; here $H$ is the Hadamard gate and the Hamiltonian is $\mathcal H$. Notation guide.

From a pulse to a probability

A physical qubit is not handed matrices. It has a Hamiltonian, its energy operator, and an experimenter can add to it for a while: a microwave pulse for a superconducting qubit, a laser pulse for a trapped ion, an oscillating magnetic field for a nuclear spin. The chain this chapter follows has three links. The Hamiltonian during the pulse fixes a rotation axis and a rate. The pulse duration fixes the rotation angle. The final position of the Bloch vector fixes the measurement probabilities, since $p(1)=(1-r_z)/2$.

A word on angles, because the Bloch sphere uses them in its own way. For a spin-½ particle the Bloch vector points along the spin's direction in space, so a rotation by $\theta$ on the sphere is a rotation of the spin by $\theta$. Photon polarisation corresponds differently. The linear polarisation states lie on one great circle of the sphere, and along that circle the Bloch angle is twice the polariser angle: horizontal and vertical, $90^\circ$ apart, are opposite points, and turning a linear polariser by $\varphi$ moves the corresponding point by $2\varphi$ along the circle. This is not a general conversion for arbitrary polarisation states, such as elliptical ones. It is why the $45^\circ$ analyser of Chapter 1 corresponds to the sphere's $x$ axis. The rotations below are rotations of the Bloch vector.

A pulse that flips the populations

Begin with a constant drive whose effective Hamiltonian is $\mathcal H=\hbar\Omega X/2$. Here $X$ exchanges $|0\rangle$ and $|1\rangle$, and $\Omega$ sets the angular rate, in radians per second. We describe the drive in a rotating frame, with the frequency matched to the qubit; the last section explains what changes when that match fails.

For a constant Hamiltonian, the Schrödinger equation gives $U(t)=\exp(-i\mathcal Ht/\hbar)$. The combination $\theta=\Omega t$ is dimensionless: it is the angle through which the Bloch vector turns. Because $X^2=I$, the even powers of $X$ in the exponential supply a cosine times $I$, and the odd powers supply a sine times $X$:

$$U(t)=\cos\frac\theta2 I-i\sin\frac\theta2 X=R_x(\theta).$$

The full power-series calculation follows below. Writing the entries explicitly,

$$R_x(\theta)=\begin{pmatrix}\cos(\theta/2)&-i\sin(\theta/2)\\-i\sin(\theta/2)&\cos(\theta/2)\end{pmatrix}.$$

Choose $|0\rangle$ as the lower-energy state of the undriven qubit. Its populations are the probabilities $p(0)$ and $p(1)$ in the computational basis. To find them after the pulse, multiply the matrix by $|0\rangle=(1,0)^T$, which selects its first column:

$$R_x(\theta)|0\rangle=\cos\frac\theta2|0\rangle-i\sin\frac\theta2|1\rangle.$$

The coefficient of $|1\rangle$ is $-i\sin(\Omega t/2)$. Squaring its magnitude gives $p(1)=\sin^2(\Omega t/2)$; the factor $-i$ has unit magnitude and disappears from this probability. At $t=0$, the sine is zero, as it must be for our initial state.

For certainty, the sine must reach one. Its first maximum is at $\Omega t/2=\pi/2$, giving $t=\pi/\Omega$. This is a $\pi$ pulse: the Bloch vector has made a half-turn from $|0\rangle$ to $|1\rangle$. If $\Omega/2\pi=10$ MHz, then $t=1/(2\times10\ \text{MHz})=50$ ns. The division by $2\pi$ converts the angular rate into cycles per second.

Stop halfway through that pulse and the two amplitudes have equal magnitude. The state is $(|0\rangle-i|1\rangle)/\sqrt2$, so the next 0/1 measurement has even odds. Its relative phase matters: this state points along $-y$, whereas $|+\rangle$ points along $+x$. Equal populations do not make them the same state.

The full $\pi$ pulse gives $R_x(\pi)=-iX$. For this isolated qubit, the common factor $-i$ has no measurable effect, so the pulse implements the bit flip of Chapter 4. The half-duration pulse implements a different gate, not a random choice between doing nothing and applying the full flip.

A pulse moves the Bloch vector and sets the outcome probability Top: a sphere with z up. Starting at zero on top, the resonant path runs down the side of the sphere through the minus y point, marked pi over 2 pulse, to one at the bottom, marked pi pulse. The detuned path is a smaller circle that leaves the top and reaches only the equator, at the plus x point. Bottom: probability of reading one against pulse area from zero to two pi. The resonant curve rises from zero to one at pi and falls back to zero at two pi. The detuned curve peaks at one half, near pulse area 2.2, and oscillates faster. The Bloch vector during the pulse x y z start |0⟩ π/2 pulse π pulse: |1⟩ detuned: stops here Probability of reading 1 after the pulse 0 ½ 1 0 π/2 π 3π/2 2π pulse area Ωt resonant, Δ = 0 detuned, Δ = Ω
Top: on resonance, the Bloch vector of $|0\rangle$ rotates about the $x$ axis, down through $-y$ at the $\pi/2$ pulse to $|1\rangle$ at the $\pi$ pulse. The dashed path is a drive detuned by $\Delta=\Omega$ (last section): it rotates about a tilted axis and reaches only the equator. Bottom: the probability of reading 1 is $(1-r_z)/2$, the height of the vector read downwards. On resonance it follows $\sin^2(\Omega t/2)$, reaching $\tfrac12$ at $\Omega t=\pi/2$ and $1$ at $\pi$. The detuned drive oscillates faster but never exceeds $\tfrac12$.

At $\theta=2\pi$ the matrix is $-I$, and at $4\pi$ it is $I$. The Bloch vector has already returned after $2\pi$ because it is insensitive to a common minus sign. A controlled rotation can make that sign relative between branches, as Chapter 4 illustrated.

From one axis to any axis

The pulse above rotates about $x$. To prepare other states, or to understand a drive with the wrong frequency, we need rotations about other axes. The calculation has the same form; we replace $X$ by the Pauli matrix combination that points along the chosen axis.

Let the Hamiltonian be $\mathcal H=(\hbar\Omega/2)\,\mathbf n\cdot\boldsymbol\sigma$, where $\mathbf n$ is a real unit vector, $\boldsymbol\sigma=(X,Y,Z)$, and $\Omega$ has units of inverse time. The Schrödinger equation $i\hbar\,\partial_t|\psi(t)\rangle=\mathcal H|\psi(t)\rangle$ says that the Hamiltonian $\mathcal H$ generates time evolution. For a constant Hamiltonian its solution is $|\psi(t)\rangle=U(t)|\psi(0)\rangle$ with $U(t)=\exp(-i\mathcal Ht/\hbar)$; differentiating the exponential term by term confirms it. We use $\mathcal H$ to avoid confusing the Hamiltonian with the Hadamard gate $H$.

The exponential of a matrix is defined by its power series. For this Hamiltonian the series can be summed in closed form, because the matrix $A=\mathbf n\cdot\boldsymbol\sigma$ squares to the identity. The result is

$$e^{-i\theta A/2}=\cos\frac\theta2\,I-i\sin\frac\theta2\,A.$$

Why $A^2=I$, and how the series becomes a cosine and a sine

Write $A=\mathbf n\cdot\boldsymbol\sigma=n_xX+n_yY+n_zZ$; the dot means this explicit sum, and $n_x^2+n_y^2+n_z^2=1$. The Pauli matrices satisfy $X^2=Y^2=Z^2=I$. Distinct Pauli matrices anticommute: for example, $XY=-YX$, so their anticommutator $\{X,Y\}=XY+YX$ is zero. Expanding the square now gives

$$\begin{aligned}A^2={}&(n_x^2+n_y^2+n_z^2)I\\ &+n_xn_y(XY+YX)+n_xn_z(XZ+ZX)+n_yn_z(YZ+ZY)=I. \end{aligned}$$

This identity makes the exponential manageable. Since $A^2=I$, we have $A^{2m}=I$ and $A^{2m+1}=A$ for every nonnegative integer $m$. Split the exponential's power series into its even and odd terms:

$$\begin{aligned}e^{-i\theta A/2} &=I\sum_{m=0}^\infty\frac{(-1)^m(\theta/2)^{2m}}{(2m)!} -iA\sum_{m=0}^\infty\frac{(-1)^m(\theta/2)^{2m+1}}{(2m+1)!}\\ &=I\cos(\theta/2)-iA\sin(\theta/2). \end{aligned}$$

The two scalar sums are the cosine and sine series.

The half-angle comes from the factor $1/2$ in the spin Hamiltonian; it is not an extra convention inserted at the end. Substituting $\theta=\Omega t$ gives the rotation matrix:

$$R_{\mathbf n}(\theta)=e^{-i\theta\mathbf n\cdot\boldsymbol\sigma/2}=\cos\frac\theta2 I-i\sin\frac\theta2\,\mathbf n\cdot\boldsymbol\sigma,\qquad\theta=\Omega t.$$

A term $aI$ in the Hamiltonian contributes only the common phase $e^{-iat/\hbar}$ for this isolated qubit. It does not change its Bloch vector.

Phase rotations and pulse axes

A $z$ rotation is diagonal:

$$R_z(\theta)=\begin{pmatrix}e^{-i\theta/2}&0\\0&e^{i\theta/2}\end{pmatrix}.$$

Acting on $|+\rangle$, it gives $e^{-i\theta/2}(|0\rangle+e^{i\theta}|1\rangle)/\sqrt2$. The relative phase increases by $\theta$. Thus $S=e^{i\pi/4}R_z(\pi/2)$ and $T=e^{i\pi/8}R_z(\pi/4)$. A gate that changes no computational-basis probabilities can still move the state around the equator and change later interference.

For rotations about $y$, the matrix is real: $R_y(\theta)=\left(\begin{smallmatrix}\cos(\theta/2)&-\sin(\theta/2)\\\sin(\theta/2)&\cos(\theta/2)\end{smallmatrix}\right)$. In particular $R_y(\pi/2)|0\rangle=|+\rangle$. This prepares the same state as $H$ on input $|0\rangle$, but the two gates are not identical: their action on $|1\rangle$ differs.

Construct an arbitrary pure state

We now have two separate controls. A $y$ rotation starting at $|0\rangle$ sets the magnitudes of the two amplitudes. A subsequent $z$ rotation sets their relative phase without changing those magnitudes. These are precisely the two choices needed for the pure state described in Chapter 1.

Starting from $|0\rangle$, apply $R_y(\theta)$ followed by $R_z(\varphi)$:

$$R_z(\varphi)R_y(\theta)|0\rangle=e^{-i\varphi/2}\left(\cos\frac\theta2|0\rangle+e^{i\varphi}\sin\frac\theta2|1\rangle\right).$$

After discarding the overall phase this is the general state from Chapter 1. State preparation requires only that the circuit act correctly on the known initial state. Specifying an entire gate requires its action on a basis. Up to overall phase, any one-qubit unitary admits an Euler form $R_z(\alpha)R_y(\beta)R_z(\gamma)$. That decomposition uses continuously variable angles; compiling them into a fixed alphabet is the separate approximation problem of Chapter 4.

Detuning changes both the speed and the reachable population

So far the drive frequency has matched the qubit's transition frequency. Suppose it does not. In the effective Hamiltonian an extra $Z$ term appears. The qubit then rotates around a tilted axis, so waiting longer changes where it sits on that new circle without restoring the old path.

To specify the model, take the bare Hamiltonian to be $\mathcal H_0=-\hbar\omega_0 Z/2$, with energy separation $\hbar\omega_0$. We describe the driven motion in coordinates rotating at the drive frequency, so the rapid bare precession is replaced by a residual term set by the frequency mismatch.

An idealised driven qubit in a rotating frame (coordinates rotating about $z$ at the drive frequency $\omega_d$) can have the effective Hamiltonian $\mathcal H_{\rm eff}=\hbar(\Omega X+\Delta Z)/2$. Here $\Omega$ is the transverse drive rate and $\Delta$ the detuning $\Delta=\omega_d-\omega_0$, the difference between the drive frequency and the qubit's level splitting. This form assumes the rotating-wave approximation; we analyse the effective model rather than deriving it from a specific device.

Set $\omega=\sqrt{\Omega^2+\Delta^2}$. The axis is $(\Omega,0,\Delta)/\omega$. Substituting it into the exponential formula gives, on input $|0\rangle$,

$$p(1;t)=\frac{\Omega^2}{\Omega^2+\Delta^2}\sin^2\left(\frac{\sqrt{\Omega^2+\Delta^2}\,t}{2}\right).$$

At resonance $\Delta=0$ we recover full inversion. If $\Delta=\Omega$, the peak population is only $1/2$, however we choose the duration of this constant pulse. Changing the duration cannot correct an axis error. This is why a gate specification must include both the intended rotation and the physical control assumptions.

The figure shows why. The tilted axis $(1,0,1)/\sqrt2$ makes an angle of $45^\circ$ with $z$, so the vector starting at $+z$ sweeps a cone around it and gets no further from $+z$ than twice that angle, $90^\circ$: the equator, where $p(1)=\tfrac12$. The rotation rate is $\omega=\sqrt2\,\Omega$, so the first maximum comes at $\Omega t=\pi/\sqrt2$, earlier than the resonant $\pi$.

Where this leaves us

To make a measurement read 1 with certainty, drive on resonance about an axis in the equatorial plane for a $\pi$ pulse, $t=\pi/\Omega$; for probability one half, a $\pi/2$ pulse. The Hamiltonian sets the axis and the rate, the duration sets the angle, and the final height of the Bloch vector sets the probability. A constant drive at fixed detuning, starting from $|0\rangle$, rotates about a tilted axis and never reaches $|1\rangle$: for any $\Delta\ne0$ its peak is $\Omega^2/(\Omega^2+\Delta^2)$, below one. That limit belongs to this model. It is not a limit on every control sequence; pulses whose phase, amplitude or detuning change during the drive are not bound by it.

Every evolution in this chapter and the last was a unitary, and every unitary is linear: it acts on a superposition term by term. That single property decides a question that sounds like engineering: can a device copy an unknown qubit? The next chapter shows that it cannot.

Problems

1. A resonant $\pi$ pulse is over-rotated by $\epsilon$. Find the probability that input $|0\rangle$ remains $0$.

Worked answer

Use the actual rotation angle $\theta=\pi+\epsilon$ in the expression for $R_x(\theta)|0\rangle$. The amplitude of $|0\rangle$ is $\cos((\pi+\epsilon)/2)=-\sin(\epsilon/2)$. Thus

$$p(0)=|-\sin(\epsilon/2)|^2=\sin^2(\epsilon/2)=\epsilon^2/4+O(\epsilon^4).$$

The final notation means the omitted terms are bounded by a constant times $\epsilon^4$ for small $\epsilon$. Equivalently, using $\sin u\approx u$ gives the leading approximation directly. At zero angle error the probability vanishes. This measures population error for input $|0\rangle$; it does not by itself describe the gate on every possible input.

2. Give angles preparing $(\sqrt3|0\rangle+i|1\rangle)/2$.

Worked answer

Match the desired amplitudes to $\cos(\theta/2)$ and $e^{i\varphi}\sin(\theta/2)$. Their magnitudes require $\cos(\theta/2)=\sqrt3/2$ and $\sin(\theta/2)=1/2$, giving $\theta=\pi/3$. Their relative phase is $i$, giving $\varphi=\pi/2$.

$$\begin{aligned}R_y(\pi/3)|0\rangle&=\tfrac{\sqrt3}{2}|0\rangle+\tfrac12|1\rangle,\\R_z(\pi/2)R_y(\pi/3)|0\rangle&=e^{-i\pi/4}\left(\tfrac{\sqrt3}{2}|0\rangle+\tfrac i2|1\rangle\right).\end{aligned}$$

The common factor has unit magnitude and is an unobservable global phase. The order is $R_y$ first, then $R_z$; this second operation sets the relative phase after the populations are prepared.

The tempting wrong turn is to apply them the other way round. On $|0\rangle$, $R_z(\pi/2)$ only multiplies by a global phase, and $R_y(\pi/3)$ afterwards gives real amplitudes: the relative phase $i$ never appears.

References and further reading

Nielsen & Chuang, §2.2.2 (evolution) and §4.2 (single-qubit operations). Sakurai & Napolitano, Modern Quantum Mechanics, spin precession and magnetic resonance (topic reference).