Skip to content

bloqade.lanes.rewrite.place2move.InsertInitialize

← Module overview

classInsertInitializesource

bloqade.lanes.rewrite.place2move.InsertInitialize

Bases: RewriteRule

Emit move.LogicalInitialize for all NewLogicalQubits in a block, with location_addresses, thetas, phis, lams collected directly from each statement. Non-NewLogicalQubit statements (e.g. angle constants) are skipped. The Load/LogicalInitialize/Store triple is inserted before the statement that immediately follows the last NewLogicalQubit.

class InsertInitialize

Pre-condition: every NewLogicalQubit has a non-None location_address (established by ResolvePinnedAddresses).

methodrewrite_Blocksource

bloqade.lanes.rewrite.place2move.InsertInitialize.rewrite_Block

def rewrite_Block(node: ir.Block) -> RewriteResult

Parameters

NameTypeDescription
nodeir.Block

Returns

RewriteResult

source