Site Tools


quantum-gate-two-qubit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
quantum-gate-two-qubit [August 26, 2026 at 17:16] – created - external edit 127.0.0.1quantum-gate-two-qubit [August 26, 2026 at 18:03] (current) – Ivan Janevski
Line 1: Line 1:
 # Two-qubit gates # 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.+**Two-qubit gates** are unitary operations that act on a pair of qubits. They are represented by $4 \times 4$ unitary matrices and form the Lie group $\mathrm{SU}(4)$. Unlike single-qubit gates, which only rotate individual qubits on their own Bloch spheres, two-qubit gates can create entanglement between qubits, which is what makes a quantum computer more than a collection of independent classical bits.
  
-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.+A two-qubit gate is applied to a joint state $|\psi\rangle \in \mathbb{C}^4$ to produce $U|\psi\rangle$. Two-qubit gates compose like any other gate (matrix product), and combined with arbitrary [[quantum-gate-single-qubit|single-qubit gates]] they form a universal gate set: any $n$-qubit unitary can be built from single-qubit rotations plus one entangling two-qubit gate, typically [[quantum-gate-cx|CNOT]] or [[quantum-gate-cz|CZ]].
  
-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.+Not every two-qubit gate entangles. A gate that factors as $A \otimes B$ for single-qubit unitaries $A, B$ acts independently on each qubit and creates no correlation. The gates of interest here, CX, CZ, SWAP, and the parametric $\text{XX}$/$\text{YY}$/$\text{ZZ}$ family, are exactly the ones that don't factor this way.
  
 ## List of gates ## List of gates
  
-Controlled-Pauli family: 
   - [[quantum-gate-cx|CX (Controlled-NOT)]]   - [[quantum-gate-cx|CX (Controlled-NOT)]]
-  - [[quantum-gate-cy|CY gate]] +  - [[quantum-gate-cy|CY (Controlled-Y)]] 
-  - [[quantum-gate-cz|CZ gate]]+  - [[quantum-gate-cz|CZ (Controlled-Z)]] 
 +  - [[quantum-gate-swap|SWAP]] 
 +  - [[quantum-gate-iswap|iSWAP]] 
 +  - [[quantum-gate-cp|Controlled-Phase]] 
 +  - [[quantum-gate-xx|XX (Ising coupling)]] 
 +  - [[quantum-gate-yy|YY (Ising coupling)]] 
 +  - [[quantum-gate-zz|ZZ (Ising coupling)]]
  
-Symmetric interaction family: 
-  - [[quantum-gate-swap|SWAP gate]] 
-  - [[quantum-gate-iswap|iSWAP gate]] 
  
-Parametric Ising family: +## Matrix representations
-  - [[quantum-gate-cphase|Controlled-Phase gate]] +
-  - [[quantum-gate-xx|XX gate]] +
-  - [[quantum-gate-yy|YY gate]] +
-  - [[quantum-gate-zz|ZZ gate]]+
  
-## Entanglement and the two-qubit space+**Controlled gates** (control on qubit 1, target on qubit 2):
  
-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:+$$\mathrm{CX} = \begin{pmatrix} 1&0&0&0 \\ 0&1&0&0 \\ 0&0&0&1 \\ 0&0&1&0 \end{pmatrix} \quad \mathrm{CY} = \begin{pmatrix} 1&0&0&0 \\ 0&1&0&0 \\ 0&0&0&-i \\ 0&0&i&0 \end{pmatrix} \quad \mathrm{CZ} = \begin{pmatrix} 1&0&0&0 \\ 0&1&0&0 \\ 0&0&1&0 \\ 0&0&0&-1 \end{pmatrix}$$
  
-$$|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle), \quad |\Psi^+\rangle = \frac{1}{\sqrt{2}}(|01\rangle + |10\rangle)$$ +**SWAP family:**
-$$|\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.+$$\mathrm{SWAP} = \begin{pmatrix} 1&0&0&0 \\ 0&0&1&0 \\ 0&1&0&0 \\ 0&0&0&1 \end{pmatrix} \quad \mathrm{iSWAP} = \begin{pmatrix} 1&0&0&0 \\ 0&0&i&0 \\ 0&i&0&0 \\ 0&0&0&1 \end{pmatrix}$$
  
-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.+**Parametric Ising-coupling gates (angle $\theta$):**
  
-## Asymmetry and symmetry+$$\text{XX}(\theta) = \exp\left(-i\frac{\theta}{2} X \otimes X\right), \quad \text{YY}(\theta) = \exp\left(-i\frac{\theta}{2} Y \otimes Y\right), \quad \text{ZZ}(\theta) = \exp\left(-i\frac{\theta}{2} Z \otimes Z\right)$$
  
-Two-qubit gates partition by structural symmetry:+Note: $\mathrm{SWAP} = \mathrm{CX}_{12} \, \mathrm{CX}_{21} \, \mathrm{CX}_{12}$, and $\mathrm{iSWAP} = \text{XX}(\pi/2)\,\text{YY}(\pi/2)$ up to single-qubit phases.
  
-**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.+## Group structure
  
-This structural difference affects implementation: asymmetric gates require directional qubit connectivity on some platforms, while symmetric gates work on bidirectional or exchange-coupled architectures.+Two-qubit gates form $\mathrm{SU}(4)$ (dimension 15); the local subgroup $\mathrm{SU}(2) \otimes \mathrm{SU}(2)$ has dimension 6. The entangling content of a gate, the part that can't be absorbed into surrounding single-qubit gates, lives in the remaining 9-dimensional quotient $\mathrm{SU}(4) / (\mathrm{SU}(2) \otimes \mathrm{SU}(2))$.
  
-## Matrix structure patterns+$\mathrm{SU}(4)$ has no Bloch-sphere-like picture. Instead its entangling content is captured by a small set of **local invariants**, unchanged under pre/post-composition with local gates, and reduces to just three numbers.
  
-Two-qubit gates exhibit consistent matrix structure patterns that reveal their action:+## KAK decomposition
  
-**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.+The intuition: any two-qubit gate can be sorted into "local dressing", single-qubit rotations that don't cost an entangling operation on hardware, wrapped around one irreducible entangling core. KAK decomposition makes this split explicit. Any $U \in \mathrm{SU}(4)$ factors as local gates sandwiching one canonical entangling gate $A \in \mathrm{SU}(4)$, where $K_1, K_2, K_3, K_4 \in \mathrm{SU}(2)$ are single-qubit unitaries, local by construction:
  
-**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.+$$U = (K_1 \otimes K_2) \; A \; (K_3 \otimes K_4), \quad A = \exp\left(i \left( a\, X{\otimes}X + b\, Y{\otimes}Y + c\, Z{\otimes}Z \right)\right)$$
  
-**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.+This is the **Cartan KAK decomposition** of $\mathfrak{su}(4)$: all entangling content is isolated in $(a, b, c)$, since the $K_k$ entangle nothing.
  
-**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.+The triples $(a,b,c)$ range over the **Weyl chamber**; gates related by local operations map to the same point. CX, CZ, and iSWAP sit at distinct points; SWAP sits at the corner of maximal entanglement. This also bounds circuit cost: any two-qubit unitary needs at most 3 CNOTs, an entangling one at least 1.
  
-## Clifford structure at two qubits+## Uses
  
-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.+- **Entanglement generation**: Bell pairs, GHZ states, correlated-qubit protocols 
 +- **Variational algorithms**: [[cuda-q-vqe|VQE]] and [[cuda-q-qaoa|QAOA]] alternate single-qubit rotations with entangling layers 
 +- **Error correction**: CX/CZ entangle data qubits with ancillas to measure stabilizers 
 +- **Circuit synthesis**: KAK decomposition is how compilers target native gates 
 +- **State transfer**: SWAP moves information between non-adjacent qubits
  
-**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.+## Implementation
  
-**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. +- **Superconducting**: CZ is usually native (~20–60 ns, tunable coupler); CX is synthesized from CZ + Hadamards; fidelity 99–99.9% 
- +- **Trapped ions**: native Mølmer-Sørensen gate is effectively $\text{XX}(\theta)$ (~10–200 μs); CX/CZ synthesized from it; fidelity 99.9%+ 
-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. +- **Photonic**: deterministic gates need weak optical nonlinearity, so CZ is often probabilistic/measurement-induced; fidelity limited by photon loss
- +
-## 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. +CX is rarely the physically native gate; it's a compiler target synthesized from whatever the hardware actually implements (usually CZ or an $\text{XX}$-type coupling).
-- **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 ## Relations
  
-- [[quantum-gate-single-qubit|Single-qubit gates]]: plus any two-qubit gate form a universal gate set +- [[quantum-gate-cx|CX]], [[quantum-gate-cy|CY]], [[quantum-gate-cz|CZ]]: the controlled-Pauli family, interconvertible via single-qubit basis changes 
-- [[quantum-gate-three-qubit|Three-qubit gates]]: controlled versions of two-qubit gates (CCX, CCY, CCZ, CCP, etc.) +- [[quantum-gate-swap|SWAP]], [[quantum-gate-iswap|iSWAP]]: exchange-type gates, at extremal points of the Weyl chamber 
-- [[quantum-gate-controlled-unitary|Controlled-unitary]]: general framework; two-qubit controlled gates are special case +- [[quantum-gate-xx|XX]], [[quantum-gate-yy|YY]], [[quantum-gate-zz|ZZ]]: parametric Ising-coupling gates, the native form on many platforms 
-- [[quantum-gate-clifford|Clifford gates]]: two-qubit Cliffords enable efficient stabilizer simulation and error correction +- [[quantum-gate-single-qubit|Single-qubit gates]]: plus one entangling two-qubit gate, form a universal gate set 
-- [[quantum-gate-non-clifford|Non-Clifford gates]]: parametric two-qubit gates at generic angles break Pauli closure +- [[quantum-gate-clifford|Clifford gates]]: CX, CY, CZ, SWAP, iSWAP are two-qubit Cliffords 
-- $\mathrm{SU}(4)$ group: 15-dimensional Lie group structure of two-qubit unitaries +- [[quantum-gate-three-qubit|Three-qubit gates]]: built from two-qubit gates plus control logic 
-- Bell states: maximally entangled two-qubit states; eigenstates of two-qubit gate families +- $\mathrm{SU}(4)$: group structure of two-qubit unitaries 
-- Entanglement entropy: quantifies two-qubit correlations; measure of gate action+- Weyl chamber: geometric classification of two-qubit gates up to local equivalence
  
quantum-gate-two-qubit.1787764591.md.gz · Last modified: by 127.0.0.1