bloqade.stim.rewrite.squin_noise.SquinNoiseToStim
classSquinNoiseToStim¶source
bloqade.stim.rewrite.squin_noise.SquinNoiseToStim
Bases: RewriteRule
class SquinNoiseToStim(address_analysis: dict[SSAValue, Address])Parameters
| Name | Type | Description |
|---|---|---|
address_analysis | dict[SSAValue, Address] |
Attributes
| Name | Type | Description |
|---|---|---|
address_analysis | dict[SSAValue, Address] |
methodrewrite_Statement¶source
bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_Statement
def rewrite_Statement(node: Statement) -> RewriteResultParameters
| Name | Type | Description |
|---|---|---|
node | Statement |
Returns
RewriteResult
methodrewrite_NoiseChannel¶source
bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_NoiseChannel
Signature
def rewrite_NoiseChannel(stmt: squin_noise.stmts.NoiseChannel) -> RewriteResultRewrite NoiseChannel statements to their stim equivalents.
Parameters
| Name | Type | Description |
|---|---|---|
stmt | squin_noise.stmts.NoiseChannel |
Returns
RewriteResult
methodrewrite_SingleQubitPauliChannel¶source
bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_SingleQubitPauliChannel
Signature
def rewrite_SingleQubitPauliChannel(stmt: squin_noise.stmts.SingleQubitPauliChannel, qubit_idx_ssas: Tuple[SSAValue]) -> StatementRewrite squin.noise.SingleQubitPauliChannel to stim.PauliChannel1.
Parameters
| Name | Type | Description |
|---|---|---|
stmt | squin_noise.stmts.SingleQubitPauliChannel | |
qubit_idx_ssas | Tuple[SSAValue] |
Returns
Statement
methodrewrite_QubitLoss¶source
bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_QubitLoss
Signature
def rewrite_QubitLoss(stmt: squin_noise.stmts.QubitLoss, qubit_idx_ssas: Tuple[SSAValue]) -> StatementRewrite squin.noise.QubitLoss to stim.TrivialError.
Parameters
| Name | Type | Description |
|---|---|---|
stmt | squin_noise.stmts.QubitLoss | |
qubit_idx_ssas | Tuple[SSAValue] |
Returns
Statement
methodrewrite_CorrelatedQubitLoss¶source
bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_CorrelatedQubitLoss
Signature
def rewrite_CorrelatedQubitLoss(stmt: squin_noise.stmts.CorrelatedQubitLoss, qubit_idx_ssas: Tuple[SSAValue]) -> StatementRewrite squin.noise.CorrelatedQubitLoss to stim.CorrelatedQubitLoss.
Parameters
| Name | Type | Description |
|---|---|---|
stmt | squin_noise.stmts.CorrelatedQubitLoss | |
qubit_idx_ssas | Tuple[SSAValue] |
Returns
Statement
methodrewrite_QubitLeakage¶source
bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_QubitLeakage
Signature
def rewrite_QubitLeakage(stmt: squin_noise.stmts.QubitLeakage, qubit_idx_ssas: Tuple[SSAValue]) -> StatementRewrite leakage to STIM statement
Parameters
| Name | Type | Description |
|---|---|---|
stmt | squin_noise.stmts.QubitLeakage | |
qubit_idx_ssas | Tuple[SSAValue] |
Returns
Statement
methodrewrite_Depolarize¶source
bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_Depolarize
Signature
def rewrite_Depolarize(stmt: squin_noise.stmts.Depolarize, qubit_idx_ssas: Tuple[SSAValue]) -> StatementRewrite squin.noise.Depolarize to stim.Depolarize1.
Parameters
| Name | Type | Description |
|---|---|---|
stmt | squin_noise.stmts.Depolarize | |
qubit_idx_ssas | Tuple[SSAValue] |
Returns
Statement
methodrewrite_TwoQubitPauliChannel¶source
bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_TwoQubitPauliChannel
Signature
def rewrite_TwoQubitPauliChannel(stmt: squin_noise.stmts.TwoQubitPauliChannel, qubit_idx_ssas: Tuple[SSAValue]) -> StatementRewrite squin.noise.TwoQubitPauliChannel to stim.PauliChannel2.
Parameters
| Name | Type | Description |
|---|---|---|
stmt | squin_noise.stmts.TwoQubitPauliChannel | |
qubit_idx_ssas | Tuple[SSAValue] |
Returns
Statement
methodrewrite_Depolarize2¶source
bloqade.stim.rewrite.squin_noise.SquinNoiseToStim.rewrite_Depolarize2
Signature
def rewrite_Depolarize2(stmt: squin_noise.stmts.Depolarize2, qubit_idx_ssas: Tuple[SSAValue]) -> StatementRewrite squin.noise.Depolarize2 to stim.Depolarize2.
Parameters
| Name | Type | Description |
|---|---|---|
stmt | squin_noise.stmts.Depolarize2 | |
qubit_idx_ssas | Tuple[SSAValue] |
Returns
Statement