tqec.noise_models.before_measure_flip.BeforeMeasurementFlipNoise

class BeforeMeasurementFlipNoise(p: float)[source]
__init__(p: float)[source]

Applies an X flip noise before each measurement operation.

This noise model only works on cirq.MeasurementGate instances! If your quantum circuit contains operations like the stim “MR” (Measurement and Reset) instruction, this noise channel will not add any noise.

Parameters:

p – strength (probability of error) of the applied noise.

Methods

__init__(p)

Applies an X flip noise before each measurement operation.

from_noise_model_like(noise)

Transforms an object into a noise model if unambiguously possible.

is_in_effect()

is_virtual_moment(moment)

Returns true iff the given moment is non-empty and all of its operations are virtual.

noisy_moment(moment, system_qubits)

Adds noise to the operations from a moment.

noisy_moments(moments, system_qubits)

Adds possibly stateful noise to a series of moments.

noisy_operation(operation)

Adds noise to an individual operation.

recurse_in_operation_if_circuit_operation(...)

Helper method to handle cirq.CircuitOperation nearly transparently.

Attributes

prob