deltakit.decode.noise_sources.EdgeProbabilityMatchingNoise#

class deltakit.decode.noise_sources.EdgeProbabilityMatchingNoise(edge_filter: Callable[[HyperMultiGraph], Sequence[EdgeT]] | None = None)#

Bases: IndependentMatchingNoise

A noise model that defines noise over a decoding graph based on the edge probabilities. A random variable is generated for each edge and an error occurs on the edge if the edge’s p_err is greater than this random variable. Therefore edges with higher p_err have more chance of being selected.

Methods#

EdgeProbabilityMatchingNoise.as_exhaustive_sequential_model

Return the equivalent exhaustive model for this noise model.

EdgeProbabilityMatchingNoise.build_batch_error_generator

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

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

EdgeProbabilityMatchingNoise.empty_filter

Filter that does not change the input.

EdgeProbabilityMatchingNoise.error_generator

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

EdgeProbabilityMatchingNoise.field_values

Return the values of data that characterises this noise model.

EdgeProbabilityMatchingNoise.get_rng

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

EdgeProbabilityMatchingNoise.importance_sampling_decomposition

Decompose this noise model to be used in importance sampling.

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