Skip to content

bloqade.stim.rewrite.squin_noise.SquinNoiseToStim

← Module overview

classSquinNoiseToStimsource

bloqade.stim.rewrite.squin_noise.SquinNoiseToStim

Bases: RewriteRule

class SquinNoiseToStim

methodrewrite_Statementsource

bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_Statement

def rewrite_Statement(node: Statement) -> RewriteResult

Parameters

NameTypeDescription
nodeStatement

Returns

RewriteResult

source

methodrewrite_NoiseChannelsource

bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_NoiseChannel

Signature
def rewrite_NoiseChannel(stmt: squin_noise.stmts.NoiseChannel) -> RewriteResult

Rewrite NoiseChannel statements to their stim equivalents.

Parameters

NameTypeDescription
stmtsquin_noise.stmts.NoiseChannel

Returns

RewriteResult

source

methodrewrite_SingleQubitPauliChannelsource

bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_SingleQubitPauliChannel

Signature
def rewrite_SingleQubitPauliChannel(stmt: squin_noise.stmts.SingleQubitPauliChannel, qubit_idx_ssas: Tuple[SSAValue]) -> Statement

Rewrite squin.noise.SingleQubitPauliChannel to stim.PauliChannel1.

Parameters

NameTypeDescription
stmtsquin_noise.stmts.SingleQubitPauliChannel
qubit_idx_ssasTuple[SSAValue]

Returns

Statement

source

methodrewrite_QubitLosssource

bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_QubitLoss

Signature
def rewrite_QubitLoss(stmt: squin_noise.stmts.QubitLoss, qubit_idx_ssas: Tuple[SSAValue]) -> Statement

Rewrite squin.noise.QubitLoss to stim.TrivialError.

Parameters

NameTypeDescription
stmtsquin_noise.stmts.QubitLoss
qubit_idx_ssasTuple[SSAValue]

Returns

Statement

source

methodrewrite_CorrelatedQubitLosssource

bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_CorrelatedQubitLoss

Signature
def rewrite_CorrelatedQubitLoss(stmt: squin_noise.stmts.CorrelatedQubitLoss, qubit_idx_ssas: Tuple[SSAValue]) -> Statement

Rewrite squin.noise.CorrelatedQubitLoss to stim.CorrelatedQubitLoss.

Parameters

NameTypeDescription
stmtsquin_noise.stmts.CorrelatedQubitLoss
qubit_idx_ssasTuple[SSAValue]

Returns

Statement

source

methodrewrite_Depolarizesource

bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_Depolarize

Signature
def rewrite_Depolarize(stmt: squin_noise.stmts.Depolarize, qubit_idx_ssas: Tuple[SSAValue]) -> Statement

Rewrite squin.noise.Depolarize to stim.Depolarize1.

Parameters

NameTypeDescription
stmtsquin_noise.stmts.Depolarize
qubit_idx_ssasTuple[SSAValue]

Returns

Statement

source

methodrewrite_TwoQubitPauliChannelsource

bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_TwoQubitPauliChannel

Signature
def rewrite_TwoQubitPauliChannel(stmt: squin_noise.stmts.TwoQubitPauliChannel, qubit_idx_ssas: Tuple[SSAValue]) -> Statement

Rewrite squin.noise.TwoQubitPauliChannel to stim.PauliChannel2.

Parameters

NameTypeDescription
stmtsquin_noise.stmts.TwoQubitPauliChannel
qubit_idx_ssasTuple[SSAValue]

Returns

Statement

source

methodrewrite_Depolarize2source

bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_Depolarize2

Signature
def rewrite_Depolarize2(stmt: squin_noise.stmts.Depolarize2, qubit_idx_ssas: Tuple[SSAValue]) -> Statement

Rewrite squin.noise.Depolarize2 to stim.Depolarize2.

Parameters

NameTypeDescription
stmtsquin_noise.stmts.Depolarize2
qubit_idx_ssasTuple[SSAValue]

Returns

Statement

source