loom.interpreter.syndrome
Copyright (c) Entropica Labs Pte Ltd 2025.
Use, distribution and reproduction of this program in its source or compiled form is prohibited without the express written consent of Entropica Labs Pte Ltd.
- class loom.interpreter.syndrome.Syndrome(*args, **kwargs)[source]
Bases:
objectA syndrome is the measurement result of a stabilizer. This dataclass does not contain the actual value of the syndrome but it stores how to calculate the syndrome value based on the output one gets from executing the quantum circuit.
- Parameters:
stabilizer (str) – Uuid of the stabilizer that this syndrome corresponds to.
measurements (tuple[Cbit, ...]) – List of classical bits from which the syndrome is calculated. The syndrome is calculated by taking the parity of these measurements. This includes the readout of ancilla qubits as well as potential updates/corrections based on data qubit readouts during e.g. split or shrink operations.
block (str) – UUID of the block which contains the stabilizer that is measured in this syndrome.
round (int) – Syndrome extraction round of the respective block in which this syndrome was measured. Note that the rounds of syndrome extraction are counted for each block individually.
corrections (tuple[Cbit, ...]) – List of classical bits that needed to account for parity computation between subsequent rounds of syndrome extraction. This is necessary when the stabilizer was modified during a lattice surgery operation
uuid (str) – Unique identifier of the syndrome, created with the uuid module.
-
block:
str
-
corrections:
tuple[Union[tuple[str,int],Literal[1,0]],...] = FieldInfo(annotation=tuple[Union[tuple[str, int], Literal[1, 0]], ...], required=False, default_factory=tuple)
-
labels:
dict[str,str|tuple[int,...] |int] = FieldInfo(annotation=dict[str, Union[str, tuple[int, ...], int]], required=False, default_factory=dict)
-
measurements:
tuple[Union[tuple[str,int],Literal[1,0]],...]
-
round:
int
-
stabilizer:
str
-
uuid:
str= FieldInfo(annotation=str, required=False, default_factory=<lambda>, validate_default=True)