quantum gate directory

Gates Groups SDKs GitHub
$\mathrm{XY}$

hardware natives· 2 qubits ·1 parameter

XY Interaction

Partial iSWAP generated by the $XX + YY$ exchange interaction, rotating within the single-excitation subspace.

Open in Quirk ↗ with $\theta = 4\pi t$

The XY gate is the one-parameter family generated by the exchange (hopping) interaction $XX + YY$. It is a partial iSWAP: it rotates within the $\{|01\rangle, |10\rangle\}$ subspace and leaves $|00\rangle$ and $|11\rangle$ untouched.

$$ \mathrm{XY}(\theta) = \exp\left(i \frac{\theta}{4} (X \otimes X + Y \otimes Y)\right) $$

In the computational basis:

$$ \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & \cos\tfrac{\theta}{2} & i\sin\tfrac{\theta}{2} & 0 \\ 0 & i\sin\tfrac{\theta}{2} & \cos\tfrac{\theta}{2} & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} $$

Special values

$\theta$ Gate
$\pi$ iSWAP
$\pi/2$ $\sqrt{i\mathrm{SWAP}}$
$2\pi$ $Z \otimes Z$

Properties

  • Number-preserving: it commutes with the total excitation number, like Givens rotations and FSim. In fact $\mathrm{FSim}(\theta, 0) = \mathrm{XY}(-2\theta)$.
  • Forms a one-parameter group: $\mathrm{XY}(\alpha) \, \mathrm{XY}(\beta) = \mathrm{XY}(\alpha + \beta)$.
  • The complementary rotation on the even-parity subspace is the $XX - YY$ gate; the two commute, and together they compose $R_{xx}$ and $R_{yy}$.
  • Beware conventions: Rigetti, Braket, and PennyLane use the matrix above, while Qiskit's XXPlusYYGate rotates with the opposite sign and adds a phase parameter $\beta$.

Usage

  • Native entangling gate on Rigetti hardware (as a calibrated pulse family), and a natural primitive for fermionic and hard-core boson simulation, where hopping terms are exactly of this form.

Also written

  • $\mathrm{XY}(\theta)$
  • $R_{xx+yy}(\theta)$
  • $\mathrm{PISWAP}(\theta)$

Groups

  • matchgate
  • 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. Each parameter has a slider; play runs through the family along the path of the Quirk link ($\theta = 4\pi t$).

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 qiskit.circuit.library.XXPlusYYGate ⓘ
PennyLane pennylane.IsingXY
Cirq cirq.ISwapPowGate ⓘ
Q# —
PyQuil pyquil.gates.XY
Braket braket.circuits.gates.XY
BQSKit — ⓘ
Qibo qibo.gates.RXXYY ⓘ
pytket pytket.circuit.OpType.ISWAP ⓘ
Stim —
OpenQASM —

← All gates

gate.directory made by nts $\oplus$ rdls