bloqade.gemini.common.dialects.arrange.stmts.Permute
← Module overview
class
classPermute¶source
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 PermuteLowered 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
| Name | Type | Default | Description |
|---|---|---|---|
name | — | 'permute' | |
traits | — | frozenset({lowering.FromPythonCall()}) | |
qubits | ir.SSAValue | info.argument(type=(ilist.IListType[QubitType, Len])) | |
perm | ir.SSAValue | info.argument(type=(ilist.IListType[types.Int, Len])) | |
insert_moves | bool | info.attribute(default=False) |