Skip to content
Quantum Computing
Text size 2 of 4

Reference shelf

Gate reference

Every single- and two-qubit gate the course builds, one row each: matrix, Bloch action, what it does, and the lesson that derives it.

Every gate the course actually builds, on one page. Come back to these cold and try to say, for each, what the matrix does to and before you read the last two columns. Every gate here is derived or defined in the lesson it links to.

The one rule behind every single-qubit gate

A one-qubit gate is a unitary matrix (). Unitarity makes it both reversible and length-preserving, so a state that summed to one still sums to one after the gate. A length-preserving map of the Bloch sphere is exactly a rotation, which is why every single-qubit gate below is a turn of the arrow.

Single-qubit gates

Each acts on the column by ordinary matrix multiplication. Chaining gate then is the single matrix , with the later gate on the left.

GateMatrixBloch actionWhat it doesFrom
No rotation: the arrow stays put.The do-nothing gate, the reference every other one is judged against. Two Hadamards compose to it ().Single-qubit gates
Half-turn about the x-axis: swaps the two poles.The bit flip, the quantum NOT. Swaps the amplitudes, so and .Single-qubit gates
Half-turn about the z-axis: fixes the poles, spins the equator by half a turn.The phase flip. Leaves alone and multiplies by , touching no measurement probability at all.Single-qubit gates
Sends the north pole to the +x point of the equator, and back.The Hadamard: makes and unmakes an equal superposition, . It is its own inverse, which is what lets you spread a state out and fold it back.Single-qubit gates
Quarter-turn about the z-axis.A gentler cousin of : rotates the phase of by a quarter turn instead of a half.Single-qubit gates
Eighth-turn about the z-axis.The gentlest phase cousin of : rotates the phase of by an eighth of a turn.Single-qubit gates

Two identities worth keeping in hand

(a Hadamard undoes itself) and (a phase flip between two Hadamards is a bit flip). Both fall straight out of multiplying the matrices, and both are the machinery interference runs on: spread a state out, let phases act, fold it back.

Two-qubit gates and read-out

Two qubits have four basis states, so a two-qubit gate is a matrix. CNOT is the one the course leans on; Toffoli is its three-bit classical ancestor, and measurement is the only step here that is not a gate at all.

GateMatrixBloch actionWhat it doesFrom
CNOTTwo qubits: no single-arrow picture. It entangles, so the pair has no separate states.Controlled-NOT: flips the target exactly when the control is . On a superposed control it builds a Bell state, not two copies.Two-qubit gates and CNOT
ToffoliThree classical bits: a reversible truth table, not a Bloch rotation.Flips the third bit only when the first two are both . It is universal for reversible computing: any classical circuit can be rebuilt from Toffoli gates alone.Classical bits and reversible gates
MeasureCollapses the arrow onto a pole; irreversible, unlike every gate above.The read-out. Samples one basis state by the Born rule, , and returns one classical bit per run.Measurement and the Born rule

Notice how little is memorized. Four of the six single-qubit gates are pure phase turns about the same z-axis, differing only in how far they rotate : half a turn for , a quarter for , an eighth for . The whole zoo is a handful of rotations plus one gate, CNOT, that couples two wires.