CHAPTER 04
Gates, observables, and the Bloch sphere
Learning goals. Multiply gate matrices, distinguish active transformations from coordinates, derive Bloch coordinates, and understand rotations and noncommuting operations.
4.1 Matrices act on vectors
A matrix is determined by what it does to basis vectors. Its first column is the output for ; its second is the output for . Linearity then fixes the output for every superposition:
For the result is . Every row forms one output amplitude. A valid closed-system gate preserves all inner products, so it satisfies . Such a matrix is unitary, with inverse .
The Pauli gates and Hadamard are
X swaps the amplitudes, Z changes their relative sign, and Y combines a swap with phases. H maps to and to . These matrices are Hermitian as well as unitary; not every gate is Hermitian.
The phase gates are
S has inverse , not S itself.
4.2 Gate order is matrix order in reverse time
If U acts first and V second, the output is . The rightmost matrix acts first. A circuit is conventionally read left to right, which is why translating circuits into matrix products requires care.
Worked example. Apply H to :
Applying H again gives
The cancellations show . They also explain interference: the first H creates alternatives, and the second recombines them.
By contrast, . For instance, but . The minus sign is a global phase when these are complete single-qubit operations. In controlled versions, a phase confined to one control branch becomes relative and can matter. Never discard a phase before checking its role in a larger circuit.
4.3 Implementing a measurement basis
To measure X with a Z detector, apply H first, because and . To measure Y, apply and then H, so the total matrix is :
Using SH instead produces a different operation. Writing the bra of the actual measurement is an effective way to verify a basis-rotation circuit.
4.4 Bloch coordinates from amplitudes
Remove a global phase so the first nonzero coefficient is real. Every pure qubit can then be written
Define , , and . Matrix multiplication gives
Substituting the angular form yields
Its length is one. The north and south poles are ; the positive x and y directions are . The sphere represents pure qubit states modulo global phase, not the physical path or shape of a particle.
For ,
Thus equal X probabilities do not place the state at the sphere’s center. They only imply its x coordinate is zero.
4.5 Rotations and generators
For a unit vector , let . Since , the exponential series separates into even and odd powers:
This is , rotating the Bloch vector by angle about . For example,
The half-angle is necessary: a rotation gives , physically the same pure state but a different vector representative. H corresponds to a half-turn about , up to global phase; it is not simply a quarter-turn about y.
4.6 Observables and uncertainty
An observable is Hermitian: . Its eigenvalues are real, and its orthonormal eigenvectors specify a projective measurement. A gate is unitary. Some matrices, including the Paulis, serve both roles, but “apply Z” and “measure Z” are different physical instructions.
The commutator is . Since , the uncertainty relation gives . In , both X and Y outcomes are random, so , saturating the bound. This is a statement about measurement distributions across identically prepared copies.
Laboratory L05 — Bloch sphere and gates. Adjust , rotate the view, and apply H, X, Y, Z, S, or a rotation. Read all three expectations and basis probabilities. Check the recurring example’s coordinates.
4.7 Exercises
4.1. Verify using the matrix columns or its action on both basis states.
Show solution / guidance
, , . The other input maps to . These outputs are exactly X’s columns.
4.2. Calculate Z probabilities after .
Show solution / guidance
The intermediate state is . The final amplitudes are . Each has squared modulus .
4.3. Find the Bloch coordinates of .
Show solution / guidance
, so .
4.4. Derive Z probabilities after and verify normalization.
Show solution / guidance
The state is . The probabilities are and sum to one.
4.5. Why can a unitary not reset both and to ?
Show solution / guidance
The input overlap is zero; the proposed output overlap is one. Reset is possible as an open-system process that exports information, not as a unitary on the qubit alone.