loom.interpreter.syndrome
Copyright 2024 Entropica Labs Pte Ltd
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
- 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)