Single-qubit gates can only twirl each qubit on its own — they can never make two qubits talk. For that you need a gate that touches two wires at once, where one qubit’s value conditions what happens to another. These controlled gates are where entanglement, and all the power, comes from.
↩ before you start · keep these handy
·From QI Ch. 6: two qubits live in a 4-dim space; basis states |00〉, |01〉, |10〉, |11〉.
·From QI 8a: CNOT flips the target whenever the control is 1; H then CNOT makes a Bell pair.
·From QC 01: single-qubit gates + CNOT is already a universal set.
🔑 symbol decoder · every new mark, in plain words
● controlthe deciding qubit (drawn as a filled dot). It is not measured — the gate just acts conditionally on it.⊕ targetthe qubit acted on when the control is 1 (drawn as the ⊕ circle).⊕ (XOR)add-mod-2: 0⊕0 = 0, 1⊕0 = 1, 1⊕1 = 0. CNOT writes t → t⊕c.CZcontrolled-Z: leaves the bits alone but stamps a −1 phase on |11〉. Symmetric — no fixed target.Toffoli (CCNOT)two controls, one target: flips the target only when both controls are 1. A reversible AND.controlled-Uany gate U applied to the target, but only on the branch where the control is 1.
feel
An “if” statement, for qubits
A controlled gate is the quantum version of if (control) then act on target. The twist: the control can be in superposition, so the gate runs the “if” on both branches at once. Feed it a control that is half-0, half-1, and you get a state where “target flipped” and “target not flipped” coexist — the two qubits become entangled, their fates linked.
💡 everyday picture
Picture two light switches wired together: flipping the first does nothing on its own, but it decides whether the second switch responds when you toggle it. The first switch (control) never moves — it just gates the second. Now imagine the first switch is somehow both on and off: the second is now both flipped and unflipped, perfectly correlated with a switch that hasn’t made up its mind. That correlation, with no local answer, is entanglement.
recapA controlled gate is a quantum “if”; run it on a superposed control and the qubits entangle.
play
The controlled-gate bench
Pick a gate, toggle the input bits, and read off exactly what comes out. Watch how CNOT rewrites a bit, how CZ leaves the bits alone but stamps a phase, how SWAP trades them, and how Toffoli needs both controls.
▸ gate benchbasis-state in → basis-state out
{{ blurb }}
input — tap a bit to toggle
{{ b.role }}
|{{ inKet }}〉
output
{{ outSign }}|{{ outKet }}〉
{{ changeNote }}
in
out
|{{ row.in }}〉
{{ row.outSign }}|{{ row.out }}〉
recapEach controlled gate is just a rule on basis states: CNOT rewrites a bit, CZ adds a phase, SWAP trades, Toffoli needs both controls.
math
Gates as block matrices
On two qubits a gate is a 4×4 matrix acting on [00, 01, 10, 11]. CNOT just permutes the last two basis states (swaps the |10〉 and |11〉 rows):
CNOT =1000010000010010
CZ =100001000010000−1
In general a controlled-U is block-diagonal: identity on the control-0 block, U on the control-1 block. That −1 in CZ’s corner is the entire seed of phase kickback (next chapter) and of the QFT.
✎ worked example · CNOT entangles a superposed control
2.CNOT acts on each piece: |00〉 stays (control 0); |10〉 → |11〉 (control 1, flip target)
3.result (|00〉 + |11〉)/√2 — a Bell pair
4.it can’t be written as (something)⊗(something): the qubits are now entangled. ✓
recapControlled gates are block-diagonal 4×4 matrices: identity on control-0, U on control-1.
⚠ common misconceptions
“The control gets measured to decide.” No measurement happens — the gate is one smooth unitary. On a superposed control it acts on every branch simultaneously; nothing collapses.
“CZ does nothing because the bits don’t change.” It stamps a hidden −1 phase on |11〉. Invisible to a single measurement, but it steers interference — the whole point of the next chapter.
“You can entangle two qubits with single-qubit gates if you’re clever.” Impossible. Single-qubit gates always factor as A⊗B and keep a product state a product. Entanglement requires a genuine two-qubit gate.
✓ you can now
✓read and apply CNOT, CZ, SWAP and Toffoli on any basis state
✓write a controlled gate as a block-diagonal matrix (identity / U blocks)
✓explain why entanglement needs a two-qubit gate, and what CZ’s phase is for
✓recognize Toffoli as a reversible AND — the bridge to classical logic