RZZ gate
The RZZ gate, a two-qubit rotation about Z⊗Z: matrix, effect on the basis states, the rzz() call in Python and JS, and its IonQ native-gate form.
The RZZ gate rotates a pair of qubits together about the axis by an angle : it adds a phase that depends on whether the two qubits agree. It acts on two qubits and takes one parameter, in radians. The two qubits are interchangeable. The Circuit panel draws a Zz(θ) box on each wire, with the angle shown as a multiple of π. On its own it changes nothing a measurement can see, whatever the angle; the phases show once the qubits are in superposition.
Kets such as name the basis states and rotations are described on the Bloch sphere; the qubits lesson introduces both.
Call
| Where | Call |
|---|---|
| Python | qc.rzz(θ, qubit1, qubit2) |
| JS | circuit.rzz(θ, qubit1, qubit2) |
| Qiskit class | RZZGate |
Matrix
The matrix uses the basis order .
That is . It is the same as a CX, an RZ of θ on the target, and a second CX, and the CP gate is an RZZ with single-qubit phases added.
Effect on basis states
| Input | Output |
|---|---|
A measurement straight after RZZ shows no change on any basis state, whatever the angle. The phases show once the qubits are in superposition: this gate is the building block of Ising-model and QAOA circuits.
Inverse
The inverse of rzz(θ) is rzz(-θ).
Usage
from math import pi
from qiskit import QuantumCircuit
qc = QuantumCircuit(2, 2)
qc.h(0)
qc.h(1)
qc.rzz(pi, 0, 1)
qc.h(0)
qc.h(1)
qc.measure([0, 1], [0, 1])
import { QuantumCircuit } from 'qiskit';
const circuit = QuantumCircuit(2, 2);
circuit.h(0);
circuit.h(1);
circuit.rzz(Math.PI, 0, 1);
circuit.h(0);
circuit.h(1);
circuit.measure([0, 1], [0, 1]);
On a noiseless simulator every shot reads 11: between the H gates, rzz(π) flips the sign of both qubits' components together.
On IonQ hardware
RZZ is the abstract form of Forte's native entangler: rzz(θ) is exactly ZZ(θ/2π), one native gate with no single-qubit pulses at all, and Forte is the hardware behind Qollab's QPU backends. On Aria it is one MS gate with single-qubit pulses around it. See How your circuit is compiled.
Related
Stay in the loop.
Get the latest tutorials, demos, and project showcases straight to your inbox. No noise, just the good stuff.
Gates