A two-qubit gate is a quantum logic operation that acts jointly on two qubits, described mathematically by a 4 x 4 unitary matrix that cannot, in general, be written as two separate single-qubit operations. In quantum computing, two-qubit gates are the only elementary operations that create entanglement, and together with arbitrary single-qubit gates they form a universal gate set capable of approximating any quantum circuit.
Two-qubit gates are also the most error-prone and slowest operations on almost every hardware platform. Their fidelity and count therefore dominate the practical cost of a circuit, which is why compilers, hardware designers and algorithm developers treat the number of two-qubit gates as a primary performance metric.
What makes an operation a two-qubit gate
A two-qubit gate maps the four computational basis states 00, 01, 10 and 11 into new superpositions of those states. If the matrix factors into a tensor product of two 2 x 2 matrices, the operation is merely two parallel single-qubit gates; a genuine two-qubit gate is non-separable and can turn a product state into an entangled one.
Applying a CNOT gate after a Hadamard gate on the control qubit is the standard example. The input 00 becomes an equal superposition of 00 and 11, which is a Bell state whose two qubits share correlations that no local operation can reproduce.
Every two-qubit unitary can be broken down by the KAK or Cartan decomposition into single-qubit gates plus an interaction core defined by three parameters. This result proves that at most three CNOT gates suffice for any two-qubit unitary when combined with single-qubit rotations.
Common two-qubit gates and their properties
Several standard two-qubit gates appear in textbooks and hardware specifications. Most of them are locally equivalent, meaning they can be converted into one another by adding single-qubit gates, yet each is native to different hardware.
The table below compares the gates encountered most often.
| Gate | Action on basis states | Entangling power |
|---|---|---|
| CNOT | Flips target when control is 1 | Maximal |
| Controlled-Z | Adds a minus sign to 11 | Maximal |
| SWAP | Exchanges the two qubit states | None on its own |
| iSWAP | Swaps 01 and 10 with phase i | Maximal |
| sqrt-iSWAP | Half of an iSWAP interaction | Partial |
| Molmer-Sorensen (XX) | Rotation about XX axis | Maximal at pi/2 |
The SWAP gate is a useful counterexample: it is a genuine two-qubit operation, but it does not create entanglement from product states. Compilers nevertheless rely on it heavily to route qubits across hardware with limited connectivity, where each SWAP typically costs three CNOT gates.
How hardware implements two-qubit gates
Physically, a two-qubit gate requires a controllable interaction between two quantum systems that can be switched on for a precise duration and then switched off. The native gate that a processor executes directly depends on which interaction is easiest to engineer.
The table summarizes native gates and typical durations across leading qubit modalities; exact numbers vary by device generation.
| Platform | Native interaction | Typical gate duration |
|---|---|---|
| Superconducting transmons | Tunable coupler, CZ or iSWAP family | 20 to 300 nanoseconds |
| Trapped ions | Shared motion, Molmer-Sorensen | 50 to 500 microseconds |
| Neutral atoms | Rydberg blockade, CZ | 0.2 to 1 microsecond |
| Spin qubits | Exchange coupling, CZ or sqrt-SWAP | 10 to 200 nanoseconds |
| Photonic qubits | Measurement-induced fusion | Probabilistic, heralded |
Because programs are written in abstract gates such as CNOT, a transpiler converts each gate into the device’s native set. A CNOT on a device whose native gate is CZ, for instance, becomes a CZ sandwiched between two Hadamard gates on the target qubit.
Fidelity, error sources and benchmarking
Two-qubit gate fidelity measures how closely the implemented operation matches the ideal unitary. Leading devices now report median fidelities of 99.5 to 99.9 percent, while single-qubit gates on the same hardware commonly exceed 99.9 percent, so two-qubit errors dominate total circuit error.
The most frequent error mechanisms are listed below with their usual remedies.
| Error source | Symptom | Typical mitigation |
|---|---|---|
| Decoherence during gate | Fidelity falls with gate length | Faster gates, better coherence |
| Leakage | Population exits the qubit subspace | Pulse shaping, leakage reduction units |
| Residual ZZ coupling | Phase errors on idle neighbors | Tunable couplers, echo sequences |
| Calibration drift | Fidelity declines over hours | Automated recalibration |
| Spectator crosstalk | Errors on uninvolved qubits | Frequency planning, scheduling |
Fidelity is commonly measured with interleaved randomized benchmarking, cross-entropy benchmarking or gate set tomography. Each method answers a slightly different question, and quoted figures are not directly comparable unless the method and error model are stated.
Why two-qubit gate count drives circuit cost
Because each two-qubit gate adds roughly 0.1 to 1 percent error, a circuit with a thousand such gates on current hardware has a low chance of running without fault. Circuit optimization therefore aims first at reducing two-qubit gate count and two-qubit depth, often before reducing total depth.
- Gate cancellation: adjacent inverse pairs, such as two consecutive CNOTs on the same qubits, are removed.
- Resynthesis: blocks of gates on two qubits are merged and rebuilt with the minimum of three entangling gates.
- Connectivity-aware layout: logical qubits are mapped to physical neighbors to avoid routing SWAP overhead.
- Native gate exploitation: continuous gate families such as fractional iSWAP reduce the count for specific rotations.
Put simply
A qubit on its own can be rotated and adjusted, but it cannot share information with another qubit unless the two are made to interact. A two-qubit gate is that interaction. It is the moment when two qubits become linked, so that what happens to one is tied to the other.
Think of single-qubit gates as tuning individual instruments and two-qubit gates as making the musicians play together. Without that step, a quantum computer could never perform anything beyond what ordinary computers already do. The key point is that this linking step is also the hardest one to perform cleanly, so engineers work constantly to make it faster and more accurate.
In practice
A chemistry research group wants to estimate the ground-state energy of a small molecule on a 27-qubit superconducting processor with a heavy-hexagon layout. The initial circuit, written for idealized all-to-all connectivity, contains 412 CNOT gates. After transpilation to the device’s native gate set and connectivity, the count rises to 640 because many qubit pairs that interact are not physical neighbors.
With a median two-qubit fidelity of 99.3 percent, the expected circuit fidelity is only about one percent, too low for useful results. The team reorders the molecular orbitals so that strongly interacting orbitals sit on neighboring qubits, merges gate blocks through resynthesis and trims inactive excitations. The final circuit uses 210 two-qubit gates, raising the estimated fidelity to roughly 23 percent. Combined with error mitigation, this brings the computed energy within chemical accuracy of the reference value.