Site Tools


quantum-gate-cswap

Table of Contents

CSWAP gate (Fredkin)

CSWAP (also Fredkin or Controlled-SWAP) swaps two qubits if a third control qubit is . The quantum analog of a multiplexer and is universal for reversible classical computation.

Action: where and (conditional swap). If control is 0, qubits unchanged; if control is 1, qubits swap.

Basis action: swaps qubits 2 and 3 when qubit 1 is . Mapping: and .

Properties

  • Self-inverse:
  • Universal: CSWAP alone is universal for reversible classical computation
  • Symmetric: the two swapped qubits are treated identically
  • Conservative: preserves Hamming weight (number of 1s in bitstring)

Relation to CCX

Both CCX (Toffoli) and CSWAP (Fredkin) are universal for classical reversible computation. They are dual in a sense: CCX flips, CSWAP swaps.

Uses

  • Multiplexing: classical multiplexer logic implemented reversibly
  • Quantum FFT: appears in some Fourier transform implementations
  • Reversible circuits: designing reversible algorithms
  • Conservation laws: CSWAP preserves Hamming weight (useful for systems with conservation laws)

Decomposition

  • Gate cost: ~6+ CX gates + single-qubit gates (expensive like CCX)
  • Structure: multiple CX layers and single-qubit rotations

Implementation

  • Superconducting qubits: CX and single-qubit gate decomposition; gate time similar to CCX (expensive)
  • Trapped ions: multi-step laser pulse sequence
  • Photonic: post-selection or nonlinear schemes
  • Availability: native CSWAP rare; decomposition typical

Comparison to SWAP

  • Conditional vs unconditional: CSWAP conditional on control qubit (unlike SWAP)
  • Cost trade-off: CSWAP more expensive than SWAP but enables reversible classical logic

Relations

  • CCX: doubly-controlled X (Toffoli); dual to CSWAP
  • SWAP: unconditional swap (two-qubit); CSWAP adds control
  • Three-qubit gates: general category
quantum-gate-cswap.md · Last modified: