deltakit.core.decoding_graphs.DecodingHyperMultiGraph#
- class deltakit.core.decoding_graphs.DecodingHyperMultiGraph(edge_data: Iterable[DecodingHyperEdge | tuple[int, ...] | tuple[DecodingHyperEdge, EdgeRecord]], detector_records: dict[int, DetectorRecord] | None = None)#
Bases:
HyperMultiGraph[tuple[DecodingHyperEdge,int]]Representation of a decoding multigraph with hyper-edges.
- Parameters:
multi_hyper_edges (Iterable[Tuple[DecodingHyperEdge, int]]) – Edges that form this graph.
detector_records (Optional[Dict[int, DetectorRecord]], optional) – Optional mapping of detector indices to detector 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. |
|
Fetch the edges connecting a sequence of detectors. |
|
Iterator for the incident edges connected to a given detector. |
|
Iterator for the neighbours of a given detector. |
|
Convert the hypergraph to a parity check matrix of size (len(nodes), len(edges)). |
|
Create a DecodingHyperGraph instance with the same nodes but with only single edges, merging the multi-edge edge records to a single edge record. |