Skip to content

bloqade.gemini.common.dialects.arrange.stmts.Permute

← Module overview

classPermutesource

bloqade.gemini.common.dialects.arrange.stmts.Permute

Bases: ir.Statement

User-facing permute directive: move qubits into a permutation of their own current locations. qubits[i] moves to the current location of qubits[perm[i]].

class Permute

Lowered from a Python call by FromPythonCall. RewritePlaceOperations rewrites this to a StaticPlacement(place.Permute) after const-folding the perm ilist.

insert_moves (compile-time constant) selects how the permutation is realized: False (default) relabels the qubit references only — no atoms move, the quantum information is permuted for free; True also commits the physical moves that realize the permutation in place. See place.Permute / MoveToPlacementStrategyABC.permute_placements for details.

Attributes

NameTypeDefaultDescription
name—'permute'
traits—frozenset({lowering.FromPythonCall()})
qubitsir.SSAValueinfo.argument(type=(ilist.IListType[QubitType, Len]))
permir.SSAValueinfo.argument(type=(ilist.IListType[types.Int, Len]))
insert_movesboolinfo.attribute(default=False)