Skip to content

Native gates

← Curated API reference · Compile and inspect · Advanced

Gemini executes CZ, R, and Rz as its native physical operations.

    At the physical layer, Gemini executes three operations. They are the only statements in the native gate dialect, bloqade.native.dialects.gate.stmts:

    StatementArgumentsOperation
    CZcontrols, targets (equal-length registers)Controlled-Z between each control and its paired target.
    Raxis_angle, rotation_angle, qubitsRotation 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.
    Rzrotation_angle, qubitsRotation 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”
    bloqade.native.stdlib.broadcast

    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:

    GateNative 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:

    GateNative sequence
    x, sqrt_x, sqrt_x_adjR(axis=0, π), R(axis=0, π/2), R(axis=0, −π/2)
    y, sqrt_y, sqrt_y_adjR(axis=π/2, π), R(axis=π/2, π/2), R(axis=π/2, −π/2)
    z, s, s_adj, t, t_adjRz(π), Rz(π/2), Rz(−π/2), Rz(π/4), Rz(−π/4)
    hs, 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:

    GateNative sequenceCZ count
    czCZ1
    cxsqrt_y_adj(target), CZ, sqrt_y(target)1
    cysqrt_x(target), CZ, sqrt_x_adj(target)1
    swapThree CZ alternating direction, with sqrt_y layers between them3
    cczSix CZ interleaved with rx(±π/4), sqrt_y, and a t layer on all three qubits6

    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.