deltakit.decode.noise_sources.EdgeProbabilityMatchingNoise.importance_sampling_decomposition#

EdgeProbabilityMatchingNoise.importance_sampling_decomposition(code_data: HyperMultiGraph, coefficient_limit: float = 1e-20) list[tuple[MonteCarloNoise, float]]#

Decompose this noise model to be used in importance sampling. Decomposition is done by creating a uniform matching noise model for each unique p_err in the graph. Then each of these matching noises is decomposed and every combination of models is evaluated as the sum of the individual models with product of the individual probabilities.

In this way, if an edge in a graph has 2 different probabilities the decomposition of noise is the sum of each of the individual noise models defined over the edge and the probability of that noise happening is the product of the probabilities.

Parameters:
  • code_data (HyperMultiGraph) – The graph to decompose noise models over.

  • coefficient_limit (float, optional) – If the probabilities drop below this level then the combined model is discarded, by default 1e-20

Return type:

List[Tuple[MonteCarloNoise, float]]