deltakit.decode.noise_sources.ExhaustiveWeightedMatchingNoise#

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

Bases: SequentialNoise[HyperMultiGraph, OrderedDecodingEdges]

A noise model that outputs all errors where their weighted error locations sum up to less than a given exhaustion ceiling

Methods#

ExhaustiveWeightedMatchingNoise.build_batch_error_generator

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

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

ExhaustiveWeightedMatchingNoise.error_generator

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

ExhaustiveWeightedMatchingNoise.error_list

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

ExhaustiveWeightedMatchingNoise.field_values

Return the values of data that characterises this noise model.

ExhaustiveWeightedMatchingNoise.get_rng

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

ExhaustiveWeightedMatchingNoise.prune_edges

From a set of weighted edges, get the subset of edges and their combinations that have weights that can be summed without exceeding a given target weight (exhaustion ceiling).

ExhaustiveWeightedMatchingNoise.sequence_size

Return the number of elements in the sequence that would be generated for the given code_data.

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