Site Tools


quantum-gate-two-qubit

**This is an old revision of the document!**

Two-qubit gates

Two-qubit gates are unitary operations that act on pairs of qubits. They are represented by $4 \times 4$ unitary matrices and form the Lie group $\mathrm{SU}(4)$. While single-qubit gates alone can only create superposition, two-qubit gates enable entanglement — the core resource that makes quantum computing powerful. Any quantum computation can be decomposed into single-qubit rotations and two-qubit gates, making two-qubit gates the critical entangling layer in quantum circuits.

A two-qubit gate acts on a state $|\psi\rangle$ of two qubits to produce $U|\psi\rangle$. Unlike single-qubit gates, which correspond to rotations on the Bloch sphere, two-qubit gates operate in a much higher-dimensional space. Some two-qubit gates are native to specific physical platforms (e.g., CX on superconducting qubits, iSWAP on trapped ions), while others require decomposition into native gates plus single-qubit rotations. The cost of two-qubit gates — both in time and error rate — dominates quantum circuit cost.

List of gates

Entanglement and entangling power

Two-qubit gates enable entanglement by creating correlations between qubits that cannot be expressed as a product of independent single-qubit states. A state $|\psi\rangle$ is separable if it can be written as $|\psi\rangle = |\phi_0\rangle \otimes |\phi_1\rangle$; otherwise it is entangled. The four Bell states form a maximally entangled basis:

$$|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle), \quad |\Phi^-\rangle = \frac{1}{\sqrt{2}}(|00\rangle - |11\rangle)$$ $$|\Psi^+\rangle = \frac{1}{\sqrt{2}}(|01\rangle + |10\rangle), \quad |\Psi^-\rangle = \frac{1}{\sqrt{2}}(|01\rangle - |10\rangle)$$

A gate's entangling power measures how much it can increase entanglement when applied to a separable state. A gate with zero entangling power (like single-qubit gates acting independently) cannot create entanglement from separable input. Most two-qubit gates have nonzero entangling power and can transform any separable two-qubit state to an entangled one (given the right single-qubit pre-rotations). Measuring entanglement uses metrics like concurrence (ranges 0 for separable to 1 for maximally entangled) and entanglement entropy of one qubit after tracing out the other.

The entanglement landscape geometrically describes how two-qubit gates move around the space of possible two-qubit states. Unlike the Bloch sphere for single qubits (a 2D surface), the two-qubit state space is $2^4 - 1 = 15$ real dimensions. Two-qubit gates that leave separable states invariant (like tensor products of single-qubit gates) do not change entanglement; controlled gates and interaction-based gates actively create or manipulate entanglement.

Matrix representations

Controlled-NOT (CX):

$$\text{CX} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}$$

Applies X to target qubit if control qubit is $|1\rangle$. Also called CNOT.

SWAP:

$$\text{SWAP} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}$$

Exchanges the state of two qubits. Its own inverse: $\text{SWAP}^2 = I$. Useful for moving qubit states across a chip when qubits can only interact with neighbors.

iSWAP:

$$\text{iSWAP} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & i & 0 \\ 0 & i & 0 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}$$

Swaps qubits and applies an imaginary unit phase to the swapped components. Native to trapped-ion and superconducting platforms with parametric coupling. The iSWAP is self-inverse when applied twice: $(iSWAP)^4 = I$ (accounting for global phase).

Controlled-Z (CZ):

$$\text{CZ} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & -1 \end{pmatrix}$$

Applies Z to both qubits if both are $|1\rangle$. Symmetric: CZ has no control/target distinction.

Ising interactions (XX, YY, ZZ):

$$R_{XX}(\theta) = \begin{pmatrix} \cos(\theta/2) & 0 & 0 & -i\sin(\theta/2) \\ 0 & \cos(\theta/2) & -i\sin(\theta/2) & 0 \\ 0 & -i\sin(\theta/2) & \cos(\theta/2) & 0 \\ -i\sin(\theta/2) & 0 & 0 & \cos(\theta/2) \end{pmatrix}$$

Similarly for $R_{YY}(\theta)$ and $R_{ZZ}(\theta)$. These parameterized gates implement Ising-type interactions common in natural Hamiltonians.

Clifford vs non-Clifford

Two-qubit gates partition into Clifford and non-Clifford classes, extending the single-qubit definitions.

Clifford gates (like CX, CZ, SWAP) preserve the property that conjugating a Pauli tensor product by the gate yields another Pauli tensor product (up to phase). The two-qubit Clifford group has $5 \times 2^7 = 11{,}520$ elements. Examples:

  • CX conjugates $X_1 \rightarrow X_1$ and $X_2 \rightarrow X_1 X_2$ (where subscripts denote qubit indices)
  • CZ is symmetric and conjugates $Z_1 Z_2 \rightarrow Z_1 Z_2$
  • SWAP conjugates Paulis on qubit 1 to the same Paulis on qubit 2 and vice versa

Clifford circuits remain efficiently simulatable classically via stabilizer tableaux; two-qubit Cliffords alone cannot provide quantum advantage.

Non-Clifford gates (like parameterized Ising gates with irrational angles, or some phase-controlled gates) break Pauli closure when acting on stabilizers. The resulting operators are superpositions of Paulis. In fault-tolerant quantum computing, non-Clifford two-qubit gates require additional resources (magic state distillation) to implement reliably, making their count a cost metric similar to T gates in single-qubit circuits.

KAK decomposition

The Cartan decomposition (or Khanna-Abernathy-Klappenecker decomposition) is the two-qubit analog of Euler angle decomposition for single-qubit gates. Any two-qubit unitary $U \in \mathrm{SU}(4)$ can be written as:

$$U = (A_1 \otimes A_2) \, \text{CX}_{12} \, (B_1 \otimes B_2) \, \text{CX}_{12} \, (C_1 \otimes C_2)$$

where $A_i, B_i, C_i$ are arbitrary single-qubit unitaries and $\text{CX}_{12}$ denotes a CX gate from qubit 0 to qubit 1. In the worst case, this requires three CX gates (the maximum two-qubit gate depth for universal gates). Some gates can be implemented with fewer CNOTs: for example, a single-qubit gate requires zero CNOTs, CZ requires one CX, and iSWAP requires one CX (up to phase).

The canonical form emphasizes the role of the entangling coefficients (or Cartan parameters) $c_1, c_2, c_3 \in [0, \pi/4]$, which characterize the entangling power. The generalized decomposition is:

$$U = (A_1 \otimes A_2) \, \text{CX}_{12} \, R_Z(c_1) \, \text{CX}_{12} \, R_Z(c_2) \, \text{CX}_{12} \, R_Z(c_3) \, (C_1 \otimes C_2)$$

where the Cartan parameters encode how much entanglement the gate creates. When all three are zero, $U$ is separable. When they are nonzero and distinct, $U$ is fully entangling. This decomposition is the workhorse for compiling arbitrary two-qubit gates on real hardware.

Isospectral equivalence

Two-qubit gates related by single-qubit rotations have the same eigenvalues (spectrum) but different eigenvectors. For instance, CX, CY, and CZ are isospectral: they differ only by single-qubit basis rotations applied before and after. Similarly, iSWAP is isospectral to other parametric interactions (e.g., $\exp(-i \theta X_1 X_2)$ for appropriate $\theta$).

This equivalence is important for hardware mapping: if a physical platform natively implements iSWAP but a circuit calls for CX, the compiler uses single-qubit rotations to convert between them. Formally, $U$ and $V$ are isospectral if $U = (A_1 \otimes A_2) V (B_1 \otimes B_2)$ for single-qubit gates $A_i, B_i$. The conversion is efficient (one extra layer of single-qubit gates), so platform-specific native gates can interchangeably be used in circuit compilation.

Uses

  • Entanglement generation: Create Bell states and multi-qubit entangled states for algorithms and error correction
  • Controlled operations: CX and CZ implement the control flow and conditional logic of quantum algorithms
  • Basis-dependent measurements: Apply two-qubit gates (e.g., CX before measurement) to measure joint operators
  • Quantum error correction: Two-qubit Clifford gates (CX, CZ) are essential for measuring stabilizers in fault-tolerant codes
  • Variational algorithms: VQE and QAOA use two-qubit entangling layers as parameterized ansatz blocks
  • Qubit routing and relabeling: SWAP gates move qubit states across linear or 2D qubit arrays when distant qubits must interact
  • Quantum simulation: Ising interactions ($R_{XX}, R_{YY}, R_{ZZ}$) directly implement nearest-neighbor Hamiltonian terms
  • State swapping and permutations: SWAP and iSWAP efficiently permute qubit indices without additional measurement or readout

Implementation

Two-qubit gate performance is platform-dependent and often dominates circuit cost.

Superconducting qubits:

  • CX via AC-Stark shift or parametric drive: ~20–100 ns
  • iSWAP via parametric coupling: ~50–200 ns
  • fidelity: typically 98–99.5% (lower than single-qubit)
  • CZ decomposed from CX + single-qubit gates when not natively available
  • Gate depth and error are the main performance bottlenecks in longer circuits

Trapped ions:

  • iSWAP via Rabi oscillations on a simulated coupling: ~1–10 μs
  • Native interactions often include Heisenberg XX and parametric Ising-type gates
  • fidelity: 99%+ achievable; slower than superconducting but higher fidelity
  • CX decomposed from iSWAP and single-qubit gates if not native

Photonic:

  • Beam splitters implement parameterized XX and YY interactions
  • No direct CX available; must decompose via multiple beam splitters and phase shifters
  • fidelity: ~95–99% (limited by optical component precision)

Spin qubits (solid-state):

  • Heisenberg XX coupling via exchange interaction or dipole coupling
  • iSWAP and CX decomposed from native parametric interactions
  • fidelity: varies; rapidly improving

The Cartan/KAK decomposition is the standard compilation strategy: given a target gate and the native gate set, the compiler expresses the gate as a product of native operations (typically one or two-qubit rotations). On platforms where CX is expensive, a compiler might prefer iSWAP-native decompositions or other isospectral forms to minimize depth and error accumulation.

Relations

  • Quantum gates: two-qubit gates are part of the broader gate taxonomy
  • Single-qubit gates: the building blocks of two-qubit decompositions
  • Three-qubit gates: multi-qubit generalizations; many are built from two-qubit gates
  • Quantum entanglement: the resource created and manipulated by two-qubit gates
  • Parametric gates: framework for angle-parameterized two-qubit gates
  • Clifford gates: two-qubit Clifford gates form a large but classically simulatable subgroup
  • Non-Clifford gates: non-Clifford two-qubit gates enable universality
  • Universal gate sets: single-qubit rotations + two-qubit Clifford (e.g., CX) are universal
  • $\mathrm{SU}(4)$: group structure of two-qubit unitaries
  • Cartan decomposition: parametrization of two-qubit gates via KAK
quantum-gate-two-qubit.1787764923.md.gz · Last modified: by Ivan Janevski