Skip to content

bloqade.lanes.rewrite.place2move.RewriteGates

← Module overview

classRewriteGatessource

bloqade.lanes.rewrite.place2move.RewriteGates

Bases: RewriteRule

Rewrite R circuit statements to move R statements.

Signature
class RewriteGates(placement_analysis: dict[ir.SSAValue, placement.AtomState])

Parameters

NameTypeDescription
placement_analysisdict[ir.SSAValue, placement.AtomState]

Attributes

NameTypeDescription
placement_analysisdict[ir.SSAValue, placement.AtomState]

methodstmts_to_insertsource

bloqade.lanes.rewrite.place2move.RewriteGates.stmts_to_insert

Signature
def stmts_to_insert(node: ir.Statement, state_after: placement.AtomState) -> list[ir.Statement] | None

Parameters

NameTypeDescription
nodeir.Statement
state_afterplacement.AtomState

Returns

list[ir.Statement] | None

source

methodis_globalsource

bloqade.lanes.rewrite.place2move.RewriteGates.is_global

Signature
def is_global(node: place.R | place.Rz, state_after: placement.ConcreteState) -> bool

Parameters

NameTypeDescription
nodeplace.R | place.Rz
state_afterplacement.ConcreteState

Returns

bool

source

methodrewrite_Statementsource

bloqade.lanes.rewrite.place2move.RewriteGates.rewrite_Statement

def rewrite_Statement(node: ir.Statement) -> RewriteResult

Parameters

NameTypeDescription
nodeir.Statement

Returns

RewriteResult

source