# Multiqubit gates **Multiqubit gates** are quantum gates that act on two or more qubits simultaneously. Unlike single-qubit gates, multiqubit gates can create entanglement between qubits, which is an essential resource for quantum computation. A single-qubit gate is a $2\times 2$ unitary matrix. A two-qubit gate is a $4\times 4$ unitary matrix, a three-qubit gate is $8\times 8$, and more generally an $n$-qubit gate is a $2^n \times 2^n$ unitary matrix. The most important multiqubit gate is the [[cnot-gate|CNOT gate]], which is a universal two-qubit gate. ## Controlled gates A large class of multiqubit gates are **controlled gates**. A controlled-$U$ gate applies a single-qubit unitary $U$ to a target qubit only if a set of control qubits are all in state $\lvert 1\rangle$. The CNOT gate is the controlled-$X$ gate. The Toffoli gate is the doubly-controlled-$X$ gate (controlled on two qubits). Controlled gates are the primary mechanism by which entanglement is generated in quantum circuits. ## Universality Any quantum computation can be decomposed into single-qubit gates and CNOT gates. Together they form a universal gate set, meaning any $n$-qubit unitary can be approximated to arbitrary precision using only these gates. In practice, fault-tolerant quantum computing uses a discrete universal gate set such as $\{H, T, \text{CNOT}\}$, where the Solovay-Kitaev theorem guarantees efficient compilation. ## List of multiqubit gates - [[cnot-gate]] - [[toffoli-gate]] - [[swap-gate]] - [[iswap-gate]]