RYY gate

The RYY gate, a two-qubit rotation about Y⊗Y: matrix, effect on the basis states, the ryy() call in Python and JS, and its IonQ native-gate form.

The RYY gate rotates a pair of qubits together about the YYY \otimes Y axis by an angle θ\theta. It acts on two qubits and takes one parameter, θ\theta in radians. The two qubits are interchangeable. The Circuit panel draws a Yy(θ) box on each wire, with the angle shown as a multiple of π. At θ=π/2\theta = \pi/2 on two fresh qubits, the pair reads 00 or 11 with equal probability and never 01 or 10.

Kets such as 0\vert 0 \rangle name the basis states and rotations are described on the Bloch sphere; the qubits lesson introduces both.

Call

WhereCall
Pythonqc.ryy(θ, qubit1, qubit2)
JScircuit.ryy(θ, qubit1, qubit2)
Qiskit classRYYGate

Matrix

The matrix uses the basis order 00,01,10,11\vert 00 \rangle, \vert 01 \rangle, \vert 10 \rangle, \vert 11 \rangle, with c=cosθ2c = \cos\frac{\theta}{2} and s=sinθ2s = \sin\frac{\theta}{2}.

RYY(θ)=(c00is0cis00isc0is00c)RYY(\theta) = \begin{pmatrix} c & 0 & 0 & is \\ 0 & c & -is & 0 \\ 0 & -is & c & 0 \\ is & 0 & 0 & c \end{pmatrix}

That is eiθ2YYe^{-i\frac{\theta}{2} Y \otimes Y}. It differs from RXX only in the sign of the outer entries.

Effect on basis states

InputOutput
00\vert 00 \ranglec00+is11c\vert 00 \rangle + is\vert 11 \rangle
01\vert 01 \ranglec01is10c\vert 01 \rangle - is\vert 10 \rangle
10\vert 10 \ranglec10is01c\vert 10 \rangle - is\vert 01 \rangle
11\vert 11 \ranglec11+is00c\vert 11 \rangle + is\vert 00 \rangle

At θ=π/2\theta = \pi/2 the gate is fully entangling: from 00\vert 00 \rangle it produces an equal superposition of 00\vert 00 \rangle and 11\vert 11 \rangle, a Bell state up to a phase.

Inverse

The inverse of ryy(θ) is ryy(-θ).

Usage

from math import pi
from qiskit import QuantumCircuit

qc = QuantumCircuit(2, 2)
qc.ryy(pi / 2, 0, 1)
qc.measure([0, 1], [0, 1])
import { QuantumCircuit } from 'qiskit';

const circuit = QuantumCircuit(2, 2);
circuit.ryy(Math.PI / 2, 0, 1);
circuit.measure([0, 1], [0, 1]);

On a noiseless simulator every shot reads 00 or 11, in close to equal numbers.

On IonQ hardware

RYY is the abstract form of Aria's native entangler with both phases a quarter turn round: for θ from 0 to π/2, ryy(θ) is exactly MS(0.25, 0.25, θ/2π), one native gate with no single-qubit pulses, partially entangling between 0 and π/2. IonQ's MS angle runs from 0 to a quarter turn; above π/2 the compiler rewrites the gate and does not publish the result. On Forte it is one ZZ gate with single-qubit pulses around it. See How your circuit is compiled.

Stay in the loop.

Get the latest tutorials, demos, and project showcases straight to your inbox. No noise, just the good stuff.