Skip to content

bloqade.lanes.rewrite.clifford2native

clifford2native

bloqade.lanes.rewrite.clifford2native

Decompose composite squin Cliffords into the neutral-atom native gate set.

Gemini runs three primitives: a rotation R(axis_angle, rotation_angle), a Rz(angle), and an entangling CZ. Seven squin Clifford statements map onto one of those one-to-one —

====================== ========================== squin statement neutral-atom primitive ====================== ========================== X R(0, 1/2) Y R(1/4, 1/2) Z Rz(1/2) S / S_adj Rz(+/- 1/4) SqrtX / adj R(0, +/- 1/4) SqrtY / adj R(1/4, +/- 1/4) CZ CZ ====================== ==========================

— while H, CX, CY and Swap are composites that have to be expanded first.

Upstream SquinToNative does expand them, but inside the bloqade.native standard-library kernels (broadcast.cy and friends), one level below squin. Anything the composites expand to is therefore invisible to squin-statement rewrites, which is how logical squin.cy ended up as Zbar(control) . CY: the Steane transversal correction had no SqrtX statement to flip, because cy’s two sqrt(X) layers only existed inside the native kernel (QuEraComputing/bloqade-internal#404).

This rule performs the same expansion at the statement level instead, so every gate the hardware will actually run is visible as squin IR before SquinToNative turns it into rotations. The decompositions below are the ones in bloqade.native.stdlib.broadcast; keep them in sync.