ZZ gate

The ZZ gate, IonQ Forte's native entangler: matrix, angle parameter in turns, effect on the basis states, the ZZGate call, and its relation to RZZ.

The ZZ gate is the native two-qubit entangling gate of IonQ's Forte systems, the hardware behind Qollab's QPU backends. It applies eiπθZZe^{-i\pi\theta\,Z \otimes Z}: a phase that depends on whether the two qubits agree. It acts on two qubits and takes one parameter, θ\theta in turns. It is an RZZ gate of angle 2πθ2\pi\theta. 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 0\vert 0 \rangle name the basis states and rotations are described on the Bloch sphere; the qubits lesson introduces both.

Before you use a native gate

Native gates only run in a native-gate circuit, and a circuit cannot mix native and standard gates. In qiskit-ionq a backend is created for one gateset, provider.get_backend(name, gateset="native"); the pre-created backend on Qollab uses the standard gateset. ZZ is the entangler of Forte; Aria systems, which on Qollab are the Aria noise-model simulators, use the MS gate instead. Submitting native gates bypasses IonQ's compiler and optimiser and turns error mitigation off by default. See How your circuit is compiled.

Call

WhereCall
Pythonqc.append(ZZGate(θ), [qubit0, qubit1])
JScircuit.append(ZZGate(θ), [qubit0, qubit1])
ClassZZGate, from qiskit_ionq

Matrix

The matrix uses the basis order 00,01,10,11\vert 00 \rangle, \vert 01 \rangle, \vert 10 \rangle, \vert 11 \rangle.

ZZ(θ)=(eiπθ0000eiπθ0000eiπθ0000eiπθ)ZZ(\theta) = \begin{pmatrix} e^{-i\pi\theta} & 0 & 0 & 0 \\ 0 & e^{i\pi\theta} & 0 & 0 \\ 0 & 0 & e^{i\pi\theta} & 0 \\ 0 & 0 & 0 & e^{-i\pi\theta} \end{pmatrix}

ZZ(θ) is rzz(2πθ). A CZ gate is a ZZ(0.25) with virtual Z rotations on both qubits, up to a global phase, which is why CZ costs Forte a single native gate.

Effect on basis states

InputOutput
00\vert 00 \rangleeiπθ00e^{-i\pi\theta}\vert 00 \rangle
01\vert 01 \rangleeiπθ01e^{i\pi\theta}\vert 01 \rangle
10\vert 10 \rangleeiπθ10e^{i\pi\theta}\vert 10 \rangle
11\vert 11 \rangleeiπθ11e^{-i\pi\theta}\vert 11 \rangle

A measurement straight after ZZ shows no change on any basis state, whatever the angle. The phases show once the qubits are in superposition.

Inverse

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

Usage

from qiskit import QuantumCircuit
from qiskit_ionq import ZZGate

qc = QuantumCircuit(2, 2)
qc.append(ZZGate(0.25), [0, 1])
qc.measure([0, 1], [0, 1])
import { QuantumCircuit } from 'qiskit';
import { ZZGate } from 'qiskit_ionq';

const circuit = QuantumCircuit(2, 2);
circuit.append(ZZGate(0.25), [0, 1]);
circuit.measure([0, 1], [0, 1]);

Every shot reads 00: on basis states the gate only changes phases, so the entanglement shows only after other gates put the qubits in superposition.

Stay in the loop.

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