deltakit.core.decoding_graphs.DecodingHyperGraph#
- class deltakit.core.decoding_graphs.DecodingHyperGraph(edge_data: Iterable[DecodingHyperEdge | tuple[int, ...] | tuple[DecodingHyperEdge, EdgeRecord]], detector_records: dict[int, DetectorRecord] | None = None)#
Bases:
HyperMultiGraph[DecodingHyperEdge]Representation of a decoding hypergraph, built to handle Stim-based noise sources. Each hyperedge in the graph has a weight between 0 and 1 (inclusive).
- Parameters:
hyper_edges (Iterable[DecodingHyperEdge]) – Edges that form this graph.
detector_records (Optional[Dict[int, DetectorRecord]], optional) – Optional mapping of detector indices to detector records, by default None.
edge_records (Optional[Dict[DecodingHyperEdge, EdgeRecord]], optional) – Optional mapping of edges to edge records, by default None.
Methods#
Return True if given detector is a boundary, False otherwise. |
|
Assume an error has happened on the given edges and return the corresponding syndrome. |
|
Returns the unique edge in the graph corresponding to the given set of detector indices. |
|
Fetch the edge record for a sequence of detectors. |
|
Generator for the edges defined by the given set of detectors. |
|
Return nodes that have a hyperedge with a path to logical. |
|
Iterator for the incident edges connected to a given detector. |
|
Iterator for the neighbours of a given detector. |
|
Lower hypergraph to NXDecodingGraph, on the condition that the hypergraph does not contain any hyperedges. |
|
Convert the hypergraph to a parity check matrix of size (len(nodes), len(edges)). |