Computing Library › Quantum Foundations
Quantum Foundations

Controlled Gates

A controlled gate applies a target operation only when control qubits are set, generalising CNOT and enabling conditional quantum logic.

Conditional operations

A controlled gate applies some unitary U to a target qubit only when one or more control qubits are in the |1> state. The simplest is CNOT, a controlled-X. The construction generalises to controlled versions of any gate, giving quantum circuits their conditional logic.

How it acts

Kronos motion — control room

A controlled-U leaves the target alone when the control is |0>, and applies U when the control is |1>. As a block matrix it is the identity on the control-0 subspace and U on the control-1 subspace. Crucially, when the control is in superposition, the gate applies U and not-U coherently across the branches, generally creating entanglement.

Symmetry of controlled-Z

CZ is symmetric between control and target — it multiplies |11> by -1 regardless of which qubit is called the control. This symmetry, and the fact that CZ is often the native two-qubit gate on hardware, means CNOT is frequently implemented as CZ sandwiched between Hadamards on the target.

Phase kickback

Controlled gates are the setting for phase kickback: when the target is an eigenstate of U, the eigenphase appears on the control qubit rather than the target. This turns a controlled operation into a phase-writing tool, which is the mechanism behind quantum phase estimation and much of Shor's algorithm.

Cost

Controlled gates with many controls, or controlled versions of complex unitaries, must be decomposed into one- and two-qubit primitives, often at significant gate cost. Multi-controlled gates typically need ancilla qubits and a chain of Toffolis. Minimising this overhead is a standard concern in compiling algorithms to real hardware.