deltakit.core.decoding_graphs.NXDecodingMultiGraph#
- class deltakit.core.decoding_graphs.NXDecodingMultiGraph(graph: _QECNXMG, boundaries: Iterable[int] = frozenset({}))#
Bases:
NXGraph[_QECNXMG,tuple[DecodingEdge,int]]Implementation of a decoding multigraph using NetworkX and QEC syndrome and edge objects. All edges in this graph are size 2, and a pair of syndromes can be connected by multiple edges (a multi-edge). As with the non-multiedge decoding graph, a fictitious boundary vertex exists to match isolated vertices.
- Parameters:
graph (_QECNXMG) – NetworkX MultiGraph to wrap.
boundaries (Optional[Iterable[int]], optional) – Optional indices of detectors that should be treated as a boundary, by default frozenset().
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. |
|
Create a graph, where connectivity is defined by an edge list. |
|
Generator for the edges defined by the given set of detectors. |
|
Return the nodes that have an edge with a path to logical that is not via the boundary |
|
Iterator for the incident edges connected to a given detector. |
|
Iterator for the neighbours of a given detector. |
|
Find the shortest path between two syndrome bits, as a sequence of decoding edges. |
|
Find the length of the shortest path between two syndrome bits. |
|
Find the length of the shortest path between two syndrome bits without going via any boundaries. |
|
Find the shortest path between two syndrome bits without going via any boundaries, as a sequence of decoding edges. |
|
Convert the hypergraph to a parity check matrix of size (len(nodes), len(edges)). |
|
Create an NXDecodingGraph instance with the same nodes but with only single edges, merging the multi-edge edge records to a single edge record. |