- Fundamentals
- Also: CU gate
Controlled Unitary Gate
A controlled unitary is a quantum gate that applies a unitary operation U to a target qubit only when a control qubit is in state |1>, generalizing the CNOT gate to arbitrary unitaries and enabling phase kickback, quantum phase estimation, and Grover oracles.
A controlled unitary gate CU acts on two registers: a single control qubit and a target register of one or more qubits. When the control qubit is |0>, the target is left unchanged; when the control is |1>, the unitary U is applied to the target. The general action is CU|0>|psi> = |0>|psi> and CU|1>|psi> = |1> U|psi>. The CNOT gate is the special case where U is the Pauli-X gate, and the controlled-Z gate is the case where U is the Pauli-Z gate. Any single-qubit unitary, including rotations of arbitrary angle, can be used as U, making controlled unitaries a versatile building block for quantum circuits. The gate reduces to the identity on the target whenever the control is |0>, which is what gives the gate its conditional character.
The matrix representation of CU in the computational basis is block diagonal: the top-left 2x2 block is the 2x2 identity I (acting when the control is |0>) and the bottom-right 2x2 block is U (acting when the control is |1>). For a single-qubit U this yields a 4x4 matrix, and for a k-qubit U the full matrix is 2^(k+1) x 2^(k+1). The block-diagonal structure directly reflects the conditional action. For multi-qubit targets, the same principle applies: the upper block is an identity of the target dimension and the lower block is U. This representation makes it straightforward to verify that CU is unitary whenever U is unitary, since a block-diagonal matrix of unitaries is itself unitary.
Multi-controlled variants generalize CU to use n control qubits, applying U only when all controls are |1>. The Toffoli gate is the iconic example with two controls and U = X. Multi-controlled unitaries can be decomposed into sequences of single-qubit and CNOT gates, though the number of primitive gates grows with the number of controls. A common decomposition strategy uses ancilla qubits to compute the AND of all control qubits into a single ancilla, then applies a singly-controlled U, then uncomputes the ancilla. Without ancillas, decompositions use O(n^2) basic gates for an n-qubit control register. Efficient decompositions of multi-controlled gates are an active area of circuit optimization research because they directly determine the depth of algorithms like quantum phase estimation and Grover’s algorithm.
Controlled unitaries play a central role in quantum phase estimation (QPE), where a series of CU^(2^k) gates are applied with the k-th qubit of a phase register as the control. Because U|psi> = exp(i*phi)|psi> for an eigenstate |psi>, each CU^(2^k) gate kicks back a phase of exp(i * 2^k * phi) onto the control qubit, encoding the eigenphase in the Fourier basis of the control register. This phase kickback mechanism relies entirely on the eigenvalue relation and the conditional application structure of the controlled unitary. In Grover oracles the controlled structure enables the selective phase flip of marked states, and in variational algorithms parameterized controlled rotations form the trainable layers of quantum neural network ansatze.