Skip to content

bloqade.lanes.rewrite.circuit2place.RewriteLogicalInitializeToNewLogical

← Module overview

classRewriteLogicalInitializeToNewLogicalsource

bloqade.lanes.rewrite.circuit2place.RewriteLogicalInitializeToNewLogical

Bases: abc.RewriteRule

Rewrite qubit references in place.LogicalInitialize statements to place.NewLogicalQubit allocations.

class RewriteLogicalInitializeToNewLogical

Handles both qubit.stmts.New (un-pinned, no location_address) and gemini.operations.NewAt (pinned, with location_address built from constant-folded args).

methodrewrite_Statementsource

bloqade.lanes.rewrite.circuit2place.RewriteLogicalInitializeToNewLogical.rewrite_Statement

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

Parameters

NameTypeDescription
nodeir.Statement

Returns

abc.RewriteResult

source