Skip to content

bloqade.stim.rewrite.qubit_to_stim.SquinGateToStim

← Module overview

classSquinGateToStimsource

bloqade.stim.rewrite.qubit_to_stim.SquinGateToStim

Bases: RewriteRule

class SquinGateToStim(address_analysis: dict[ir.SSAValue, Address])

Parameters

NameTypeDescription
address_analysisdict[ir.SSAValue, Address]

Attributes

NameTypeDescription
address_analysisdict[ir.SSAValue, Address]

methodrewrite_Statementsource

bloqade.stim.rewrite.qubit_to_stim.SquinGateToStim.rewrite_Statement

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

Parameters

NameTypeDescription
nodeir.Statement

Returns

RewriteResult

source

methodrewrite_SingleQubitGatesource

bloqade.stim.rewrite.qubit_to_stim.SquinGateToStim.rewrite_SingleQubitGate

Signature
def rewrite_SingleQubitGate(stmt: gate.stmts.SingleQubitGate) -> RewriteResult

Parameters

NameTypeDescription
stmtgate.stmts.SingleQubitGate

Returns

RewriteResult

source

methodrewrite_ControlledGatesource

bloqade.stim.rewrite.qubit_to_stim.SquinGateToStim.rewrite_ControlledGate

Signature
def rewrite_ControlledGate(stmt: gate.stmts.ControlledGate) -> RewriteResult

Parameters

NameTypeDescription
stmtgate.stmts.ControlledGate

Returns

RewriteResult

source

methodrewrite_TwoQubitGatesource

bloqade.stim.rewrite.qubit_to_stim.SquinGateToStim.rewrite_TwoQubitGate

def rewrite_TwoQubitGate(stmt: gate.stmts.TwoQubitGate) -> RewriteResult

Rewrite a squin two-qubit gate into its Stim equivalent.

Parameters

NameTypeDescription
stmtgate.stmts.TwoQubitGate

Returns

RewriteResult

source

methodrewrite_RotationGatesource

bloqade.stim.rewrite.qubit_to_stim.SquinGateToStim.rewrite_RotationGate

def rewrite_RotationGate(stmt: gate.stmts.RotationGate) -> RewriteResult

Parameters

NameTypeDescription
stmtgate.stmts.RotationGate

Returns

RewriteResult

source

methodrewrite_U3Gatesource

bloqade.stim.rewrite.qubit_to_stim.SquinGateToStim.rewrite_U3Gate

def rewrite_U3Gate(stmt: gate.stmts.U3) -> RewriteResult

Parameters

NameTypeDescription
stmtgate.stmts.U3

Returns

RewriteResult

source