Controlled gates and CNOT
Conditional quantum operations work coherently, without first measuring the control.
- Trace CNOT on basis states and superpositions.
- State the control, target and bit-order convention.
A reversible truth table
Section titled “A reversible truth table”Controlled-X, often called CNOT or CX, maps
| Input | Output |
|---|---|
| 00 | 00 |
| 01 | 01 |
| 10 | 11 |
| 11 | 10 |
In this book’s playground, q0 is the control and q1 the target. CX preserves q0 and flips q1 only on the branch where q0 is 1.
No intermediate measurement
Section titled “No intermediate measurement”For a superposed control, linearity applies the operation to both components coherently:
This creates entanglement for that input. CX does not entangle every input: remains a product state, and a target in is unchanged by X.
Reverse it
Section titled “Reverse it”Applying the same CX twice restores the input because XOR with the same control twice cancels. The gate is unitary and self-inverse.
Practice: prepare H on q1 only, then CX. Predict the four amplitudes. Compare it with H on q0 followed by CX. The difference is a useful way to catch swapped control and target conventions.
Reference: IBM Quantum — Multiple systems.
Ready for the next step?
Your progress stays in this browser.