deltakit.decode.noise_sources.ExhaustiveWeightedMatchingNoise.prune_edges#

ExhaustiveWeightedMatchingNoise.prune_edges(code_data: HyperMultiGraph) tuple[Any, ...]#

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

Parameters:

code_data (OrderedDecodingEdges) – A weighted graph of decoding edges

Returns:

Tuple of edges with weights that are within a given exhaustion target and the maximum number of those edges’ weights that can be summed while still remaining within the exhaustion target

Return type:

Tuple[List[OrderedDecodingEdges], int]