Skip to content

bloqade.lanes.dialects.place.Permute

← Module overview

classPermutesource

bloqade.lanes.dialects.place.Permute

Bases: QuantumStmt

Place-layer permute directive.

class Permute

Produced by RewritePlaceOperations.rewrite_Permute from movement.Permute. Consumed by placement analysis and deleted by RewriteGates after InsertMoves emits any forward Move IR. perm is a permutation over the positions of qubits: qubits[i] ends up referring to what was qubits[perm[i]].

insert_moves selects how the permutation is realized (see MoveToPlacementStrategyABC.permute_placements):

  • False (default): relabel only — the qubit references are permuted with no physical moves (the layout is permuted; the quantum information is permuted for free). Valid under any strategy, including palindrome.
  • True: also commit the physical moves that route the atoms so the permutation is realized in place (Permuted; layout pinned to the pre-permute layout). Rejected by PalindromePlacementStrategy.

Attributes

NameTypeDefaultDescription
qubitstuple[int, ...]info.attribute()
permtuple[int, ...]info.attribute()
insert_movesboolinfo.attribute(default=False)