quantum gate directory

Gates Groups SDKs GitHub
$\sqrt{\mathrm{SWAP}}$

swap family· 2 qubits

Square Root SWAP

Applies half of a SWAP interaction, creating maximal entanglement from a product state.

Open in Quirk ↗

The $\sqrt{\mathrm{SWAP}}$ gate is the canonical maximally entangling two-qubit gate: a single application takes a product state to a maximally entangled state, and two applications recover the full SWAP.

$$ \sqrt{\mathrm{SWAP}} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & \frac{1+i}{2} & \frac{1-i}{2} & 0 \\ 0 & \frac{1-i}{2} & \frac{1+i}{2} & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} $$

Properties

  • Maximally entangling: maps $|01\rangle \mapsto \tfrac{1+i}{2}|01\rangle + \tfrac{1-i}{2}|10\rangle$, a state with concurrence 1.
  • Symmetric under exchange of qubits.
  • Together with single-qubit rotations, forms a universal gate set.
  • Weyl coordinates $(\pi/8, \pi/8, -\pi/8)$ in the convention of the canonical gate; its inverse, the other square root of SWAP, sits at the mirror point $(\pi/8, \pi/8, \pi/8)$.
  • Native gate on some spin-based and exchange-coupled hardware platforms.

Groups

  • number-preserving

Data

  • This gate as JSON
  • Edit this page on GitHub

The unitary, drawn

Every entry of the matrix as a disc. The area is the transition probability $|U_{jk}|^2$; the colour and the hand are the phase. Rows are outputs $\langle j|$, columns inputs $|k\rangle$, in the computational basis.

Phase

Disc area $= |U_{jk}|^2$. Hover an entry for its value, or take the JSON.

Weyl chamber

Where this gate sits among all two-qubit gates, up to single-qubit rotations before and after.

  • this gate
  • other gates
  • perfect entanglers

Coordinates:

not entangling entangling perfect entangler

$(a, b, c)$ means the gate equals $e^{i(a\,XX + b\,YY + c\,ZZ)}$ up to single-qubit gates, reduced to the chamber $\pi/4 \ge a \ge b \ge |c|$ (the convention of the canonical gate, Qiskit and Cirq). The $a = \pi/4$ face is a mirror: $(\pi/4, b, c)$ and $(\pi/4, b, -c)$ are the same gate. Drag the figure to rotate it, double-click to reset.

SDK support

How to call this gate in each framework. Hover a ⓘ for a note; the support matrix compares every gate at once.

SDKName
Qiskit — ⓘ
PennyLane — ⓘ
Cirq cirq.SwapPowGate ⓘ
Q# —
PyQuil —
Braket —
BQSKit —
Qibo —
pytket — ⓘ
Stim —
OpenQASM — ⓘ

← All gates

gate.directory made by nts $\oplus$ rdls