← Back to section · Quantum Computing
Controlled Gates: Writing Conditionals into Circuits and Building Entanglement by Hand
Starting from the block-matrix structure of controlled-U, this article explains the equivalence of CNOT and CZ, the ABC-decomposition construction of an arbitrary controlled single-qubit unitary, and the preparation circuits for Bell and GHZ states and how their entanglement differs.
Classical programs organize logic with “if … then …”. The corresponding structure in a quantum circuit is the controlled gate: designate a control qubit, and apply a unitary to a target qubit only when the control is in the state . In matrix form, controlled- is block-diagonal, , in the basis — the subspace with control 0 is left untouched, the subspace with control 1 is acted on by . This seemingly simple structure is the hub of multi-qubit quantum computing: it is the standard tool for preparing entanglement and the universal means of making single-qubit operations conditional.
CNOT and CZ: two faces of the same entangling gate
The most common controlled gate is controlled-, the CNOT. Its twin is controlled- (CZ), with matrix : only when both qubits are 1 does the state acquire a minus sign. CZ has a property CNOT lacks — control and target are perfectly symmetric, because the condition “both qubits are 1” does not distinguish who controls whom. The two differ only by a pair of Hadamards on the target: , since . This equivalence carries practical weight: the native two-qubit interaction of many superconducting chips naturally yields a CZ-type phase (the coupling between qubits accumulates a state-dependent phase), while circuit designers prefer to think in terms of CNOT — the compiler’s daily work is translating between these two faces. Incidentally, the very distinction between control and target is basis-dependent: viewed in the basis, a CNOT becomes a CNOT with control and target exchanged, which is another way of stating the phase-kickback phenomenon. Controlled-phase gates generalize CZ and are the main components of the quantum Fourier transform circuit, which has its own article on this site.
Constructing an arbitrary controlled-U: the ABC decomposition
If the target operation is not or but an arbitrary single-qubit unitary , can controlled- still be assembled from elementary gates? Yes, and at a fixed cost. The key is an algebraic fact: for any one can find single-qubit gates such that
The circuit follows immediately: on the target qubit apply, in sequence, , then (CNOT), , then (CNOT), , and finally a phase gate on the control qubit correcting . When the control is 0, neither CNOT fires and the target experiences — nothing happens; when the control is 1, the two CNOTs each insert an , and the target experiences exactly (up to the corrected phase). Hence any controlled single-qubit unitary = 2 CNOTs + some single-qubit gates, the classic construction of Barenco and co-workers from 1995. It shows that controlled structure requires no new physical interaction: as long as the hardware can do CNOT (or CZ) and arbitrary single-qubit gates, every controlled single-qubit operation is within reach. Multi-controlled gates such as the Toffoli exact a separate price, covered in their own article on this site.
Where controlled gates come from in hardware
An abstract circuit draws CNOT as a symbol, but hardware has no native “conditional flip” action — controlled gates must be assembled from interactions between qubits. Superconducting platforms take two main routes: cross-resonance drives the target qubit at the control qubit’s frequency to produce an effective interaction, which single-qubit rotations then shape into a CNOT; tunable couplers instead bring two qubits briefly into resonance so that a phase accumulates only for joint states, naturally yielding CZ. In trapped ions, the laser-driven Mølmer–Sørensen interaction produces an -type coupling, which likewise combines with local rotations to give CNOT. The common theme: two-qubit gate error rates are typically an order of magnitude worse than single-qubit ones, and calibration is more delicate — coupling crosstalks onto spectator qubits, and conditional phases wander with frequency drift. This explains two rules of thumb at the compilation level: cost estimates are denominated in two-qubit gate counts, and “only 2 CNOTs” in the ABC decomposition deserves its emphasis — saving one CNOT in a controlled gate saves the most expensive class of operation in the circuit.
Preparing entanglement from circuits: Bell and GHZ states
The best-known use of controlled gates is making entanglement. The recipe is minimal: apply to the first qubit to obtain , then a CNOT with it as control and the second qubit as target, and the product state becomes the Bell state — the two qubits’ measurement outcomes are perfectly correlated, yet neither has a definite value of its own; the other three Bell states follow by adding local or flips. Generalize the recipe — one followed by a cascade of CNOTs, each new qubit controlled by the previous one — and you obtain the -qubit GHZ state . But entanglement is not one single thing. The W state spreads a single excitation evenly over three qubits; preparing it requires controlled rotations with specific angles (of order ), not a simple CNOT cascade; and GHZ and W cannot be interconverted under stochastic local operations — they are mathematically distinct entanglement classes, such that losing one qubit destroys GHZ entanglement entirely while W retains entanglement between the remaining two qubits. Having prepared entanglement, one must also verify it is there. A common experimental approach measures the preparation fidelity: the overlap with the target Bell state decomposes into the combination of three correlation measurements, , , and , so a few measurement settings estimate how close the state is to the target; in more stringent settings, a violation of a Bell inequality serves as a witness that the entanglement cannot be explained by classical correlations. Verifying GHZ states grows more expensive with qubit number, and their coherence is exquisitely sensitive to phase noise on any single qubit — a phase drift on any one of the qubits pollutes the overall relative phase, which is why fidelity records for large GHZ states are treated as benchmarks of a hardware platform’s overall quality. Finally, a splash of cold water: entanglement is a necessary ingredient, not advantage itself — stabilizer circuits built only from , , and CNOT can prepare highly entangled states yet are efficiently simulable on a classical computer (the Gottesman–Knill theorem); the stage that controlled gates provide still needs non-Clifford resources to perform a genuine quantum speedup.
Summary
Controlled gates write conditional logic into unitary evolution: the block-diagonal structure defines the semantics, the CNOT–CZ equivalence provides the translation layer between hardware and algorithms, and the ABC decomposition guarantees that any controlled single-qubit operation can be synthesized at the fixed cost of two CNOTs. The Bell and GHZ preparation circuits are the most direct products of this toolbox — entanglement becomes a resource that can be manufactured to recipe inside a circuit, and its different classes and limitations are written into the structure of those preparation circuits as well.
References
- Barenco, A. et al., Elementary Gates for Quantum Computation, Phys. Rev. A 52, 3457 (1995). https://arxiv.org/abs/quant-ph/9503016
- Nielsen, M. A. & Chuang, I. L., Quantum Computation and Quantum Information, Cambridge University Press, 2010. https://www.cambridge.org/9780521635035
- Dür, W., Vidal, G. & Cirac, J. I., Three qubits can be entangled in two inequivalent ways, Phys. Rev. A 62, 062314 (2000). https://arxiv.org/abs/quant-ph/0005115
Tags: Controlled GatesCNOTEntanglement PreparationGHZ State