bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC
classMoveNoiseModelABC¶source
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
| Name | Type | Default | Description |
|---|---|---|---|
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 |
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
local_px | float | field(default=0.0004102, kw_only=True) | The error probability for a Pauli-X error during a local single qubit gate operation. |
local_py | float | field(default=0.0004102, kw_only=True) | The error probability for a Pauli-Y error during a local single qubit gate operation. |
local_pz | float | field(default=0.0004112, kw_only=True) | The error probability for a Pauli-Z error during a local single qubit gate operation. |
local_loss_prob | float | field(default=0.0, kw_only=True) | The error probability for a loss during a local single qubit gate operation. |
local_unaddressed_px | float | field(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_py | float | field(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_pz | float | field(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_prob | float | field(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_px | float | field(default=6.5e-05, kw_only=True) | The error probability for a Pauli-X error during a global single qubit gate operation. |
global_py | float | field(default=6.5e-05, kw_only=True) | The error probability for a Pauli-Y error during a global single qubit gate operation. |
global_pz | float | field(default=6.5e-05, kw_only=True) | The error probability for a Pauli-Z error during a global single qubit gate operation. |
global_loss_prob | float | field(default=0.0, kw_only=True) | The error probability for a loss during a global single qubit gate operation. |
cz_paired_gate_px | float | field(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_py | float | field(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_pz | float | field(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_prob | float | field(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_px | float | field(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_py | float | field(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_pz | float | field(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_prob | float | field(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_px | float | field(default=0.000806, kw_only=True) | Probability of X error occurring on a moving qubit during a move operation |
mover_py | float | field(default=0.000806, kw_only=True) | Probability of Y error occurring on a moving qubit during a move operation |
mover_pz | float | field(default=0.002458, kw_only=True) | Probability of Z error occurring on a moving qubit during a move operation |
move_loss_prob | float | field(default=0.0, kw_only=True) | Probability of loss occurring on a moving qubit during a move operation |
sitter_px | float | field(default=0.0003066, kw_only=True) | Probability of X error occurring on a stationary qubit during a move operation |
sitter_py | float | field(default=0.0003066, kw_only=True) | Probability of Y error occurring on a stationary qubit during a move operation |
sitter_pz | float | field(default=0.0004639, kw_only=True) | Probability of Z error occurring on a stationary qubit during a move operation |
sit_loss_prob | float | field(default=0.0, kw_only=True) | Probability of loss occurring on a stationary qubit during a move operation |
propertycz_paired_errors¶source
bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC.cz_paired_errors
propertycz_unpaired_errors¶source
bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC.cz_unpaired_errors
propertylocal_errors¶source
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.
sourcepropertylocal_unaddressed_errors¶source
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.
sourcepropertyglobal_errors¶source
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.
sourcepropertysitter_errors¶source
bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC.sitter_errors
methodparallel_cz_errors¶source
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
| Name | Type | Description |
|---|---|---|
ctrls | Sequence[int] | |
qargs | Sequence[int] | |
rest | Sequence[int] |
Returns
dict[tuple[float, float, float, float], list[int]]
methodjoin_binary_probs¶source
bloqade.qasm2.dialects.noise.model.MoveNoiseModelABC.join_binary_probs
def join_binary_probs(p1: float, *args: float = ()) -> floatMerge 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
| Name | Type | Default | Description |
|---|---|---|---|
p1 | float | required | The probability of the event happening. |
*args | float | () |
Returns
floatfloat: The effective probability of the event happening.