**This is an old revision of the document!**
Table of Contents
Two-qubit gates
Two-qubit gates are unitary operations acting on pairs of qubits, represented by $4 \times 4$ unitary matrices. They form the $\mathrm{SU}(4)$ group, a 15-dimensional Lie group vastly larger than the two-qubit Clifford subgroup. The defining feature of two-qubit gates is entanglement: they can create quantum correlations between qubits that have no classical analog.
A two-qubit gate applies to a state $|\psi\rangle$ on two qubits to produce $U|\psi\rangle$. Unlike single-qubit gates (which are local), two-qubit gates can generate entanglement that cannot be decomposed into independent single-qubit operations. The fundamental result in quantum circuit complexity states: any quantum computation can be decomposed into single-qubit rotations plus two-qubit entangling gates. This means a single fixed two-qubit gate (like CX) plus single-qubit gates form a universal gate set sufficient for any quantum algorithm.
Two-qubit gates vary structurally: some distinguish control and target qubits (asymmetric, like CX), while others treat both qubits symmetrically (like SWAP or ZZ). Some are parametrized by an angle $\theta$ (variational), while others are fixed unitaries. Parametrized two-qubit gates—particularly ZZ, XX, YY—form the ansatz layers in variational quantum algorithms (QAOA, VQE) and directly simulate many-body quantum systems.
List of gates
Controlled-Pauli family:
Symmetric interaction family:
Parametric Ising family:
Entanglement and the two-qubit space
Entanglement is the central concept distinguishing two-qubit from single-qubit physics. A two-qubit state is separable if it factors: $|\psi\rangle = |\psi_1\rangle |\psi_2\rangle$; otherwise it is entangled. The Bell basis—four maximally entangled two-qubit states—is the natural basis for understanding two-qubit gates:
$$|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle), \quad |\Psi^+\rangle = \frac{1}{\sqrt{2}}(|01\rangle + |10\rangle)$$ $$|\Phi^-\rangle = \frac{1}{\sqrt{2}}(|00\rangle - |11\rangle), \quad |\Psi^-\rangle = \frac{1}{\sqrt{2}}(|01\rangle - |10\rangle)$$
These states are eigenstates of various two-qubit gate families. The entanglement of a state can be quantified by the Schmidt rank (how many terms in the Schmidt decomposition) or the entanglement entropy (information-theoretic measure). Two-qubit gates can generate, preserve, or destroy entanglement depending on their structure.
The computational subspace is 4-dimensional, but two-qubit unitaries form a 15-parameter family (the $\mathrm{SU}(4)$ group). Restricting to Clifford gates (those preserving Pauli algebra) reduces this to 11,520 distinct Cliffords—still far larger than single-qubit Cliffords (24 total). The growth in gate space complexity is one reason two-qubit operations dominate circuit depth and fidelity.
Asymmetry and symmetry
Two-qubit gates partition by structural symmetry:
Asymmetric (control/target): Controlled-Pauli gates (CX, CY, CZ) have a distinguished control qubit whose state determines the operation on the target. Swapping control and target produces a different gate (or requires extra single-qubit corrections). Asymmetric gates naturally implement conditional logic and are the core of most quantum algorithms. They are all self-inverse ($U^2 = I$) and Clifford.
Symmetric: Gates like SWAP, iSWAP, CPHASE, XX, YY, ZZ treat both qubits identically. Swapping their labels produces the same gate. Symmetric gates often correspond to physical interactions (exchange coupling, Ising interactions) and are frequently native on quantum hardware. Parametric symmetric gates are the workhorses of variational algorithms.
This structural difference affects implementation: asymmetric gates require directional qubit connectivity on some platforms, while symmetric gates work on bidirectional or exchange-coupled architectures.
Matrix structure patterns
Two-qubit gates exhibit consistent matrix structure patterns that reveal their action:
Diagonal gates (CPHASE, ZZ) only apply phases; they commute with the computational basis and preserve basis state identity. They are easy to implement (reference frame adjustment or detuning) and fast on most platforms.
Block-diagonal gates (CX, CY, CZ, SWAP, iSWAP) permute basis states or apply phases within blocks; the sparsity means fewer nonzero entries. Non-Clifford parametric gates (XX, YY at generic angles) have dense matrices with oscillating trigonometric entries.
Off-diagonal phases: Many two-qubit gates apply phase $\pm i$ or $\pm 1$ during state transitions. These phase corrections are often byproducts of physical implementation (e.g., iSWAP's $i$ phase is intrinsic to the exchange interaction). Understanding phase structure is crucial for circuit optimization and error mitigation.
Symmetries: Diagonal gates preserve the parity of $|1\rangle$ occupation (number of excited qubits); others don't. Controlled-Paulis act independently on subspaces determined by control state. These invariances simplify decomposition and compilation.
Clifford structure at two qubits
A two-qubit gate is Clifford if conjugating any two-qubit Pauli by it yields another Pauli (up to global phase). This closure under conjugation is extraordinarily restrictive and powerful.
Two-qubit Clifford gates: CX, CY, CZ, SWAP, iSWAP, and products thereof form a finite group of 11,520 elements. Any Clifford circuit (using only these gates) can be simulated classically in $O(n^3)$ time via the stabilizer tableau method. Clifford circuits cannot provide quantum advantage but form the foundation of quantum error correction codes.
Non-Clifford at general angles: Parametric gates XX, YY, ZZ at arbitrary $\theta$ break Pauli closure. For instance, conjugating $X \otimes I$ by $\text{ZZ}(\theta)$ yields a superposition of Paulis, not a Pauli itself. This breakdown enables universality and exponential speedup. However, at special angles (e.g., $\theta = \pi$ makes ZZ equal to CZ, which is Clifford), parametric gates reduce to Cliffords.
The Clifford/non-Clifford partition explains why stabilizer codes work (Clifford operations can verify encoded information) and why non-Clifford gates require magic state distillation in fault-tolerant systems.
Universality and decomposition
The Karatsuba-Agafonov-Kuznetsov (KAK) decomposition is the foundational universality result for two-qubit gates: any two-qubit unitary can be written as
$$U = (A_1 \otimes A_2) \exp\left(-i\frac{\theta}{2}(c_1 X \otimes X + c_2 Y \otimes Y + c_3 Z \otimes Z)\right) (B_1 \otimes B_2)$$
where $A_i, B_i$ are single-qubit unitaries and $c_i$ are fixed coupling strengths determined by $U$. This decomposes any two-qubit unitary into at most three CX gates plus single-qubit rotations. The KAK form proves universality: CX plus single-qubit gates suffice for any two-qubit operation, and hence for any quantum computation.
Practically, non-native gates decompose into CX chains:
- Any controlled unitary (CY, CZ-like gates) decomposes into one CX plus single-qubit gates on target
- SWAP decomposes into three CX gates
- Parametric XX, YY, ZZ decompose into CX ladders with single-qubit rotation interleavings
The decomposition depth is the primary cost metric on platforms where CX is expensive (superconducting qubits: ~20–100 ns per CX). Platforms with native two-qubit interactions (trapped ions: Mølmer-Sørensen; transmons: tunable iSWAP) prefer gates matching their native Hamiltonian.
Native implementations by platform
Two-qubit gate performance varies dramatically by platform due to different physical mechanisms:
Superconducting qubits:
- CX: decomposed via microwave pulses; ~20–100 ns; fidelity 99–99.5%. The workhorse gate.
- CZ: sometimes native via frequency-selective interactions (~50 ns); often decomposed from CX.
- iSWAP: native on transmon qubits with tunable coupling; ~20–50 ns. Often faster than CX on these systems.
- ZZ: native via detuned two-photon interactions; very fast and high fidelity. Default entangling gate for variational algorithms.
Trapped ions:
- CX/CZ: native via Mølmer-Sørensen interactions (engineered laser pulses); ~1–5 μs (slower than superconducting but higher fidelity).
- SWAP: often native or very low cost.
- iSWAP: less common; usually decomposed.
- Fidelity: 99.9%+ achievable; best in class for two-qubit gates.
Photonic:
- Most two-qubit gates are resource-intensive, requiring ancilla qubits and postselection (Knill-Laflamme-Milburn, KLM circuits).
- Success probability: ~12.5% per gate; overhead compounded in deep circuits.
- Fidelity: ~95–99% limited by component precision and photon loss.
- Photonic platforms excel at linear optics (single-qubit operations) but struggle with two-qubit entanglement.
Neutral atoms:
- CZ: native via Rydberg blockade; tunable range.
- SWAP, iSWAP: native via exchange interactions.
- Fidelity: rapidly improving; competitive with trapped ions.
Uses
- Quantum algorithms: Shor's factoring, Grover's search, and phase estimation all require two-qubit entanglement for speedup.
- Variational algorithms: QAOA and VQE use parametric two-qubit gates (XX, YY, ZZ) as ansatz layers to encode problem structure.
- Quantum simulation: Parametric gates directly simulate many-body Hamiltonians (Ising, Heisenberg, XYZ spin models) at the gate level.
- State preparation: Two-qubit gates generate entangled states (Bell states, GHZ, cluster states) used for teleportation, distributed computation, and measurement.
- Quantum error correction: Stabilizer measurement requires two-qubit Clifford gates to detect errors without measuring logical information.
- Basis rotation: Two-qubit gates enable measurement in rotated bases (Bell basis) to extract different quantum correlations.
Relations
- Single-qubit gates: plus any two-qubit gate form a universal gate set
- Three-qubit gates: controlled versions of two-qubit gates (CCX, CCY, CCZ, CCP, etc.)
- Controlled-unitary: general framework; two-qubit controlled gates are special case
- Clifford gates: two-qubit Cliffords enable efficient stabilizer simulation and error correction
- Non-Clifford gates: parametric two-qubit gates at generic angles break Pauli closure
- $\mathrm{SU}(4)$ group: 15-dimensional Lie group structure of two-qubit unitaries
- Bell states: maximally entangled two-qubit states; eigenstates of two-qubit gate families
- Entanglement entropy: quantifies two-qubit correlations; measure of gate action
