Gate Reference
This page lists every gate Tessera accepts as input, its parameters, and how it is handled on each backend. A gate marked as basis on a given backend passes through unchanged. A gate marked with a decomposition is replaced with that sequence during BasisTranslationPass. Measurements and barriers are always passed through unchanged regardless of backend.
Single-Qubit Gates: No Parameters
| Gate | Description | IBM | IonQ | Rigetti |
|---|---|---|---|---|
h | Hadamard | Rz(π/2) Sx Rz(π/2) | Rz(π/2) Rx(π/2) Rz(π/2) | Rz(π/2) Rx(π/2) Rz(π/2) |
x | Pauli-X (bit flip) | basis | Rx(π) | Rx(π) |
y | Pauli-Y | Rz(π) X | Ry(π) | Rz(π) Rx(π) |
z | Pauli-Z | Rz(π) | Rz(π) | Rz(π) |
s | S gate (√Z) | Rz(π/2) | Rz(π/2) | Rz(π/2) |
sdg | S† gate | Rz(-π/2) | Rz(-π/2) | Rz(-π/2) |
t | T gate (∜Z) | Rz(π/4) | Rz(π/4) | Rz(π/4) |
tdg | T† gate | Rz(-π/4) | Rz(-π/4) | Rz(-π/4) |
sx | √X gate | basis | Rx(π/2) | Rx(π/2) |
Single-Qubit Gates: With Parameters
| Gate | Parameters | Description | IBM | IonQ | Rigetti |
|---|---|---|---|---|---|
rx(θ) | θ: rotation angle | X-axis rotation | Rz(-π/2) Sx Rz(θ-π/2) Sx Rz(π/2) | basis | basis |
ry(θ) | θ: rotation angle | Y-axis rotation | U(θ, 0, 0) | basis | Rz(π/2) Rx(θ) Rz(-π/2) |
rz(θ) | θ: rotation angle | Z-axis rotation | basis | basis | basis |
p(θ) | θ: phase angle | Phase gate | Rz(θ) | Rz(θ) | Rz(θ) |
u(θ,φ,λ) | θ, φ, λ: Euler angles | General single-qubit unitary | basis | Rz(φ) Ry(θ) Rz(λ) | Rz(φ+π/2) Rx(θ) Rz(λ-π/2) |
Two-Qubit Gates: No Parameters
| Gate | Description | IBM | IonQ | Rigetti |
|---|---|---|---|---|
cx / cnot | Controlled-X | basis | basis | H(q1) CZ(q0,q1) H(q1) |
cz | Controlled-Z | H(q1) CX(q0,q1) H(q1) | H(q1) CX(q0,q1) H(q1) | basis |
cy | Controlled-Y | Rz(-π/2,q1) CX Rz(π/2,q1) | Rz(-π/2,q1) CX Rz(π/2,q1) | Rx(π/2,q1) Rz(π/2,q1) CZ Rz(π/2,q1) Rx(π/2,q1) Rz(π,q1) |
swap | SWAP | CX CX(rev) CX | CX CX(rev) CX | 3× inlined CX (→ CZ) |
Note
Both
cx and cnot are accepted as input and treated identically. cnot is normalized to cx during BasisTranslationPass.Two-Qubit Gates: With Parameters
| Gate | Parameters | Description | IBM | IonQ | Rigetti |
|---|---|---|---|---|---|
cp(θ) | θ: phase angle | Controlled phase | Rz(θ/2,q0) CX Rz(-θ/2,q1) CX Rz(θ/2,q1) | Rz(θ/2,q0) CX Rz(-θ/2,q1) CX Rz(θ/2,q1) | Same pattern with CX inlined as H·CZ·H |
Three-Qubit Gates
| Gate | Description | IBM | IonQ | Rigetti |
|---|---|---|---|---|
ccx | Toffoli (controlled-controlled-X) | 19 instructions (4 CX) | 19 instructions (4 CX, uses Rx instead of Sx) | 55 instructions (4 CX each inlined as H·CZ·H) |
Note
ccx must be decomposed by BasisTranslationPass before BasicSwapRouter runs. The router raises a ValueError if it encounters any gate with more than 2 qubits.Special Instructions
| Instruction | Description |
|---|---|
measure | Measures a qubit into a classical bit. Always passed through unchanged by all passes. |
barrier | Structural hint that prevents gate reordering. Passed through unchanged until RemoveBarriersPass strips it. |