Native gates
← Curated API reference · Compile and inspect · Advanced
Gemini executes CZ, R, and Rz as its native physical operations.
The native gate set
Section titled “The native gate set”At the physical layer, Gemini executes three operations. They are the only statements in the native gate dialect, bloqade.native.dialects.gate.stmts:
| Statement | Arguments | Operation |
|---|---|---|
| CZ | controls, targets (equal-length registers) | Controlled-Z between each control and its paired target. |
| R | axis_angle, rotation_angle, qubits | Rotation by rotation_angle about an axis in the XY plane at angle axis_angle from X. Axis 0 is an X rotation; a quarter turn is a Y rotation. |
| Rz | rotation_angle, qubits | Rotation about Z. |
The statements measure angles in turns, where 1.0 is a full 2π rotation. The standard-library kernels below accept radians and divide by 2π before emitting a statement, so user code never handles turns directly.
How the standard library decomposes each gate
Section titled “How the standard library decomposes each gate”holds the decompositions. Each function is itself a native kernel, so every
gate in the table lowers to nothing but R, Rz, and CZ. The single-qubit
module bloqade.native.stdlib.simple
has the same functions with one-qubit signatures; each wraps its qubit in a
one-element list and calls the broadcast kernel. The one naming difference is
the adjoint S gate: s_dag in simple, s_adj in broadcast.
Rotations map directly onto a statement:
| Gate | Native sequence |
|---|---|
rx(θ) | R(axis=0, θ) |
ry(θ) | R(axis=π/2, θ) |
rz(θ), shift(θ) | Rz(θ) |
phased_xz(x, z, axis_phase) | R(axis=axis_phase, x) then Rz(z) |
u3(θ, φ, λ) | Rz(λ), R(axis=π/2, θ), Rz(φ) |
Fixed single-qubit gates are rotations at fixed angles:
| Gate | Native sequence |
|---|---|
x, sqrt_x, sqrt_x_adj | R(axis=0, π), R(axis=0, π/2), R(axis=0, −π/2) |
y, sqrt_y, sqrt_y_adj | R(axis=π/2, π), R(axis=π/2, π/2), R(axis=π/2, −π/2) |
z, s, s_adj, t, t_adj | Rz(π), Rz(π/2), Rz(−π/2), Rz(π/4), Rz(−π/4) |
h | s, sqrt_x, s, that is Rz(π/2), R(axis=0, π/2), Rz(π/2) |
Multi-qubit gates are built from CZ with single-qubit rotations on the targets:
| Gate | Native sequence | CZ count |
|---|---|---|
cz | CZ | 1 |
cx | sqrt_y_adj(target), CZ, sqrt_y(target) | 1 |
cy | sqrt_x(target), CZ, sqrt_x_adj(target) | 1 |
swap | Three CZ alternating direction, with sqrt_y layers between them | 3 |
ccz | Six CZ interleaved with rx(±π/4), sqrt_y, and a t layer on all three qubits | 6 |
These are physical-layer decompositions. They are distinct from the Gemini logical gate set, where Steane-encoded qubits support the transversal Clifford gates and non-Clifford rotations only as initial state preparation.