graphix.noise_models.depolarising module

Depolarising noise model.

class DepolarisingNoise(prob: float)[source]

Bases: Noise

One-qubit depolarising noise with probabibity prob.

__init__(prob: float) → None[source]

Initialize one-qubit depolarizing noise.

Parameters:

prob (float) – Probability parameter of the noise, between 0 and 1.

prob

Descriptor for probability (between 0 and 1).

property nqubits: int

Return the number of qubits targetted by the noise element.

to_krauschannel() → KrausChannel[source]

Return the Kraus channel describing the noise element.

class TwoQubitDepolarisingNoise(prob: float)[source]

Bases: Noise

Two-qubits depolarising noise with probabibity prob.

__init__(prob: float) → None[source]

Initialize two-qubit depolarizing noise.

Parameters:

prob (float) – Probability parameter of the noise, between 0 and 1.

prob

Descriptor for probability (between 0 and 1).

property nqubits: int

Return the number of qubits targetted by the noise element.

to_krauschannel() → KrausChannel[source]

Return the Kraus channel describing the noise element.

class DepolarisingNoiseModel(prepare_error_prob: float = 0.0, x_error_prob: float = 0.0, z_error_prob: float = 0.0, entanglement_error_prob: float = 0.0, measure_channel_prob: float = 0.0, measure_error_prob: float = 0.0)[source]

Bases: NoiseModel

Depolarising noise model.

Parameters:

NoiseModel (class) – Parent abstract class class:NoiseModel

__init__(prepare_error_prob: float = 0.0, x_error_prob: float = 0.0, z_error_prob: float = 0.0, entanglement_error_prob: float = 0.0, measure_channel_prob: float = 0.0, measure_error_prob: float = 0.0) → None[source]
input_nodes(nodes: Iterable[int], rng: Generator | None = None, *, stacklevel: int = 1) → list[CommandOrNoise][source]

Return the noise to apply to input nodes.

command(cmd: CommandOrNoise, rng: Generator | None = None, *, stacklevel: int = 1) → list[CommandOrNoise][source]

Return the noise to apply to the command cmd.

confuse_result(cmd: BaseM, result: Outcome, rng: Generator | None = None, *, stacklevel: int = 1) → Outcome[source]

Assign wrong measurement result cmd = “M”.