deltakit.decode.utils.dem_and_pij_edges_max_diff#

deltakit.decode.utils.dem_and_pij_edges_max_diff(dem: DetectorErrorModel, pij: dict[frozenset[int], float], is_hypergraph: bool = False) float#

Given a stim.DetectorErrorModel and Pij matrix, compare the two to find the maximum difference in probability between similar edges.

Parameters:
  • dem (stim.DetectorErrorModel) – DEM to compare with Pij.

  • pij (PijData) – Pij to compare with DEM.

  • is_hypergraph (bool) – Specifies whether DEM/Pij describe a hypergraph or not. Default value is False.

Returns:

float value representing the maximum difference in probability between similar edges between DEM and Pij.

Return type:

float