deltakit.decode.noise_sources.SampleStimNoise#

class deltakit.decode.noise_sources.SampleStimNoise(batch_size=1024)#

Bases: StimNoise

A noise model that uses a stim file, without modification, to generate noise.

By default, uses batch model to generate noise to make use of stim parallelism. This batching is hidden from the user, and this model provides the same interface as other sources.

Methods#

SampleStimNoise.as_exhaustive_sequential_model

Return the equivalent exhaustive model for this noise model.

SampleStimNoise.build_batch_error_generator

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

SampleStimNoise.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.

SampleStimNoise.error_generator

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

SampleStimNoise.field_values

Return the values of data that characterises this noise model.

SampleStimNoise.get_rng

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

SampleStimNoise.importance_sampling_decomposition

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

SampleStimNoise.permute_stim_circuit

Apply noise to a lestim circuit

SampleStimNoise.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.