• 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 CUCU acts on two registers: a single control qubit and a target register of one or more qubits. When the control qubit is 0|0\rangle, the target is left unchanged; when the control is 1|1\rangle, the unitary UU is applied to the target. The general action is CU0ψ=0ψCU|0\rangle|\psi\rangle = |0\rangle|\psi\rangle and CU1ψ=1UψCU|1\rangle|\psi\rangle = |1\rangle U|\psi\rangle. The CNOT gate is the special case where UU is the Pauli-X gate, and the controlled-Z gate is the case where UU is the Pauli-Z gate. Any single-qubit unitary, including rotations of arbitrary angle, can be used as UU, making controlled unitaries a versatile building block for quantum circuits. The gate reduces to the identity on the target whenever the control is 0|0\rangle, which is what gives the gate its conditional character.

The matrix representation of CUCU in the computational basis is block diagonal: the top-left 2×22\times2 block is the 2×22\times2 identity II (acting when the control is 0|0\rangle) and the bottom-right 2×22\times2 block is UU (acting when the control is 1|1\rangle). For a single-qubit UU this yields a 4×44\times4 matrix, and for a kk-qubit UU the full matrix is 2k+1×2k+12^{k+1} \times 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 UU. This representation makes it straightforward to verify that CUCU is unitary whenever UU is unitary, since a block-diagonal matrix of unitaries is itself unitary.

Multi-controlled variants generalize CUCU to use nn control qubits, applying UU only when all controls are 1|1\rangle. The Toffoli gate is the iconic example with two controls and U=XU = 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 UU, then uncomputes the ancilla. Without ancillas, decompositions use O(n2)O(n^2) basic gates for an nn-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 CU2kCU^{2^k} gates are applied with the kk-th qubit of a phase register as the control. Because Uψ=eiϕψU|\psi\rangle = e^{i\phi}|\psi\rangle for an eigenstate ψ|\psi\rangle, each CU2kCU^{2^k} gate kicks back a phase of ei2kϕe^{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.