deltakit.decode.noise_sources.ToyNoise#

class deltakit.decode.noise_sources.ToyNoise(p_physical: float)#

Bases: StimNoise

A noise model which adds:

  • Depolarise 1 channel after every one qubit gate, reset gate and measurement gates (with the exception of the MPP gate)

  • Inverse noise after every two qubit gate and MPP gate. Inverse noise consists of a depolarise 2 channel after every two qubit gate in a gate layer and a depolarise 1 channel after all qubits that are not acted on in the gate layer

  • Depolarise1 channels have an error probability of p_physical/10 while depolarise2 channels have an error probability of p_physical

Parameters:

p_physical (float) – Single parameter used to define the rate of occurrence of several noise channels.

Methods#

ToyNoise.as_exhaustive_sequential_model

Return the equivalent exhaustive model for this noise model.

ToyNoise.build_batch_error_generator

Given some representation of a code, return a generator of batches of errors for that code.

ToyNoise.build_split_batch_error_generators

Given some representation of a code, return num_splits number of batch generators of errors for that code and the respective sizes for those generators.

ToyNoise.error_generator

Given some representation of a code, return a generator of errors for that code.

ToyNoise.field_values

Return the values of data that characterises this noise model.

ToyNoise.get_rng

Return a numpy random number generator, using the member data seed.

ToyNoise.importance_sampling_decomposition

Expresses the independent error distribution as a statistical mixture of other error distributions.

ToyNoise.permute_stim_circuit

Apply noise to a lestim circuit

ToyNoise.split_error_generator

Given some representation of a code, return num_splits number of generators of errors for that code and the respective sizes for those generators.