Skip to content

bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC

← Module overview

classMoveNoiseModelABCsource

bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC

Bases: abc.ABC

Abstract base class for noise based on atom movement.

Signature
class MoveNoiseModelABC(*, local_px: float = 0.0004102, local_py: float = 0.0004102, local_pz: float = 0.0004112, local_loss_prob: float = 0.0, local_unaddressed_px: float = 2e-07, local_unaddressed_py: float = 2e-07, local_unaddressed_pz: float = 1.2e-06, local_unaddressed_loss_prob: float = 0.0, global_px: float = 6.5e-05, global_py: float = 6.5e-05, global_pz: float = 6.5e-05, global_loss_prob: float = 0.0, cz_paired_gate_px: float = 0.0006549, cz_paired_gate_py: float = 0.0006549, cz_paired_gate_pz: float = 0.003184, cz_gate_loss_prob: float = 0.0, cz_unpaired_gate_px: float = 0.0005149, cz_unpaired_gate_py: float = 0.0005149, cz_unpaired_gate_pz: float = 0.002185, cz_unpaired_loss_prob: float = 0.0, mover_px: float = 0.000806, mover_py: float = 0.000806, mover_pz: float = 0.002458, move_loss_prob: float = 0.0, sitter_px: float = 0.0003066, sitter_py: float = 0.0003066, sitter_pz: float = 0.0004639, sit_loss_prob: float = 0.0)

This class defines the interface for a noise model. The gate noise is calculated from the parameters provided in this dataclass which can be updated when inheriting from this class. The move error is calculated by implementing the parallel_cz_errors method which takes a set of ctrl and qarg qubits and returns a noise model for all the qubits. The noise model is a dictionary with the keys being the error rates for the qubits and the values being the list of qubits that the error rate applies to.

Once implemented the class can be used with the NoisePass to analyze a circuit and apply the noise model to the circuit.

NOTE: This model is not guaranteed to be supported long-term in bloqade. We will be moving towards a more general approach to noise modeling in the future.

Parameters

NameTypeDefaultDescription
local_pxfloat0.0004102
local_pyfloat0.0004102
local_pzfloat0.0004112
local_loss_probfloat0.0
local_unaddressed_pxfloat2e-07
local_unaddressed_pyfloat2e-07
local_unaddressed_pzfloat1.2e-06
local_unaddressed_loss_probfloat0.0
global_pxfloat6.5e-05
global_pyfloat6.5e-05
global_pzfloat6.5e-05
global_loss_probfloat0.0
cz_paired_gate_pxfloat0.0006549
cz_paired_gate_pyfloat0.0006549
cz_paired_gate_pzfloat0.003184
cz_gate_loss_probfloat0.0
cz_unpaired_gate_pxfloat0.0005149
cz_unpaired_gate_pyfloat0.0005149
cz_unpaired_gate_pzfloat0.002185
cz_unpaired_loss_probfloat0.0
mover_pxfloat0.000806
mover_pyfloat0.000806
mover_pzfloat0.002458
move_loss_probfloat0.0
sitter_pxfloat0.0003066
sitter_pyfloat0.0003066
sitter_pzfloat0.0004639
sit_loss_probfloat0.0

Attributes

NameTypeDefaultDescription
local_pxfloatfield(default=0.0004102, kw_only=True)The error probability for a Pauli-X error during a local single qubit gate operation.
local_pyfloatfield(default=0.0004102, kw_only=True)The error probability for a Pauli-Y error during a local single qubit gate operation.
local_pzfloatfield(default=0.0004112, kw_only=True)The error probability for a Pauli-Z error during a local single qubit gate operation.
local_loss_probfloatfield(default=0.0, kw_only=True)The error probability for a loss during a local single qubit gate operation.
local_unaddressed_pxfloatfield(default=2e-07, kw_only=True)The error probability for a Pauli-X error during a local single qubit gate operation when the qubit is not addressed.
local_unaddressed_pyfloatfield(default=2e-07, kw_only=True)The error probability for a Pauli-Y error during a local single qubit gate operation when the qubit is not addressed.
local_unaddressed_pzfloatfield(default=1.2e-06, kw_only=True)The error probability for a Pauli-Z error during a local single qubit gate operation when the qubit is not addressed.
local_unaddressed_loss_probfloatfield(default=0.0, kw_only=True)The error probability for a loss during a local single qubit gate operation when the qubit is not addressed.
global_pxfloatfield(default=6.5e-05, kw_only=True)The error probability for a Pauli-X error during a global single qubit gate operation.
global_pyfloatfield(default=6.5e-05, kw_only=True)The error probability for a Pauli-Y error during a global single qubit gate operation.
global_pzfloatfield(default=6.5e-05, kw_only=True)The error probability for a Pauli-Z error during a global single qubit gate operation.
global_loss_probfloatfield(default=0.0, kw_only=True)The error probability for a loss during a global single qubit gate operation.
cz_paired_gate_pxfloatfield(default=0.0006549, kw_only=True)The error probability for a Pauli-X error during CZ gate operation when two qubits are within blockade radius.
cz_paired_gate_pyfloatfield(default=0.0006549, kw_only=True)The error probability for a Pauli-Y error during CZ gate operation when two qubits are within blockade radius.
cz_paired_gate_pzfloatfield(default=0.003184, kw_only=True)The error probability for a Pauli-Z error during CZ gate operation when two qubits are within blockade radius.
cz_gate_loss_probfloatfield(default=0.0, kw_only=True)The error probability for a loss during CZ gate operation when two qubits are within blockade radius.
cz_unpaired_gate_pxfloatfield(default=0.0005149, kw_only=True)The error probability for Pauli-X error during CZ gate operation when another qubit is not within blockade radius.
cz_unpaired_gate_pyfloatfield(default=0.0005149, kw_only=True)The error probability for Pauli-Y error during CZ gate operation when another qubit is not within blockade radius.
cz_unpaired_gate_pzfloatfield(default=0.002185, kw_only=True)The error probability for Pauli-Z error during CZ gate operation when another qubit is not within blockade radius.
cz_unpaired_loss_probfloatfield(default=0.0, kw_only=True)The error probability for a loss during CZ gate operation when another qubit is not within blockade radius.
mover_pxfloatfield(default=0.000806, kw_only=True)Probability of X error occurring on a moving qubit during a move operation
mover_pyfloatfield(default=0.000806, kw_only=True)Probability of Y error occurring on a moving qubit during a move operation
mover_pzfloatfield(default=0.002458, kw_only=True)Probability of Z error occurring on a moving qubit during a move operation
move_loss_probfloatfield(default=0.0, kw_only=True)Probability of loss occurring on a moving qubit during a move operation
sitter_pxfloatfield(default=0.0003066, kw_only=True)Probability of X error occurring on a stationary qubit during a move operation
sitter_pyfloatfield(default=0.0003066, kw_only=True)Probability of Y error occurring on a stationary qubit during a move operation
sitter_pzfloatfield(default=0.0004639, kw_only=True)Probability of Z error occurring on a stationary qubit during a move operation
sit_loss_probfloatfield(default=0.0, kw_only=True)Probability of loss occurring on a stationary qubit during a move operation

propertycz_paired_errorssource

bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC.cz_paired_errors

cz_paired_errors: tuple[float, float, float, float]

Returns the error rates for a CZ gate.

source

propertycz_unpaired_errorssource

bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC.cz_unpaired_errors

cz_unpaired_errors: tuple[float, float, float, float]

Returns the error rates for a CZ gate.

source

propertylocal_errorssource

bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC.local_errors

local_errors: tuple[float, float, float, float]

Returns the error rates for a local single qubit gate.

source

propertylocal_unaddressed_errorssource

bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC.local_unaddressed_errors

local_unaddressed_errors: tuple[float, float, float, float]

Returns the error rates for a local single qubit gate.

source

propertyglobal_errorssource

bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC.global_errors

global_errors: tuple[float, float, float, float]

Returns the error rates for a global single qubit gate.

source

propertysitter_errorssource

bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC.sitter_errors

sitter_errors: tuple[float, float, float, float]

Returns the error rates for a move operation.

source

methodparallel_cz_errorssource

bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC.parallel_cz_errors

Signature
def parallel_cz_errors(ctrls: Sequence[int], qargs: Sequence[int], rest: Sequence[int]) -> dict[tuple[float, float, float, float], list[int]]

Takes a set of ctrls and qargs and returns a noise model for all qubits.

Parameters

NameTypeDescription
ctrlsSequence[int]
qargsSequence[int]
restSequence[int]

Returns

dict[tuple[float, float, float, float], list[int]]

source

methodjoin_binary_probssource

bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC.join_binary_probs

def join_binary_probs(p1: float, *args: float = ()) -> float

Merge the probabilities of an event happening if the event can only happen once.

For example, finding the effective probability of losing an atom from multiple sources, since a qubit can only be lost once. This is done by using the formula:

p = p1 * (1 - p2) + p2 * (1 - p1)

applied recursively to all the probabilities in the list.

Parameters

NameTypeDefaultDescription
p1floatrequiredThe probability of the event happening.
*argsfloat()

Returns

floatfloat: The effective probability of the event happening.

source