deltakit.core.decoding_graphs.OrderedSyndrome#
- class deltakit.core.decoding_graphs.OrderedSyndrome(detectors: Iterable[int] = (), enforce_mod_2: bool = True)#
Bases:
Sequence[int],Set[int]Immutable ordered mod 2 set of detectors. Where detectors are represented by integers.
- Parameters:
detectors (Iterable[int], optional) – Detectors to put into this ordered mod 2 collection, by default ().
enforce_mod_2 (bool, optional) – Whether to enforce that there’s only an odd number of each detector in the syndrome, by default True.
Methods#
Convert OrderedSyndrome to a bitstring, with num_bits bits. |
|
Create a sequence of layers from a syndrome, where each layer is a collection of integers representing the detectors triggered on that layer. |
|
Create an ordered syndrome from a bistring. |
|
Create a syndrome from a sequence of layers, where each layer is a collection of integers representing the detectors triggered on that layer. |
|
Raises ValueError if the value is not present. |
|
Return True if two sets have a null intersection. |
|
Split OrderedSyndrome in to two lists of detection events in order, ending the first at the given detector event. |
|
Split the OrderedSyndrome into a time-ordered list of OrderedSyndromes, with layers number of items in the list. |