Table of Contents
Two-qubit gates
Two-qubit gates are $4 \times 4$ unitary matrices acting on a pair of qubits. Unlike single-qubit gates, they can create entanglement between qubits that were previously in a product state. Any two-qubit unitary can be decomposed into at most three CX gates plus single-qubit gates.
The CX gate is the standard entangling gate. Together with arbitrary single-qubit gates it forms a universal gate set: any $n$-qubit unitary can be approximated to arbitrary precision using only these. The SWAP and iSWAP gates appear in hardware architectures where qubits are not all-to-all connected and logical operations must be routed through physical neighbors.
Entanglement
A two-qubit gate is entangling if it can produce a state with non-zero entanglement from a product state input. CX and iSWAP are maximally entangling — a single application maps $\lvert +\rangle\lvert 0\rangle$ to a Bell state. SWAP, by contrast, just permutes qubits and creates no entanglement from product inputs.
The local equivalence class of a two-qubit gate is captured by the Weyl chamber parameterization: two gates are equivalent up to local single-qubit operations if and only if they share the same three Weyl coordinates $(c_x, c_y, c_z)$. CX, iSWAP, and SWAP all sit at different points in the chamber.
Gate list
- CX (CNOT) gate — flips target if control is $\lvert 1\rangle$; standard entangling gate
- SWAP gate — exchanges two qubits
- iSWAP gate — SWAP with a $\pi/2$ phase on the exchanged amplitude
