loom.eka.syndrome_circuit
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.eka.syndrome_circuit.SyndromeCircuit(*args, **kwargs)[source]
Bases:
objectA SyndromeCircuit object specifies one way to measure a pauli string. There can be multiple SyndromeCircuit objects for the same pauli string, specifying different circuits for how to measure it. The qubits in the circuit field are labeled 0, …, n. Once the actual syndrome extraction circuit for a stabilizer is generated, qubit i of the SyndromeCircuit object is replaced by stabilizer.data_qubits[i]. Therefore the qubit order inside stabilizer.data_qubits must match the order in which they are used in SyndromeCircuit.
Parameter
- paulistr
The pauli string which this circuit is supposed to measure. Must be a string
- name: str, optional
A name for the SyndromeCircuit object consisting of the characters {X, Y, Z}.
- circuit: Circuit | None
The circuit instructions to measure the syndrome. If None is provided, a default circuit for the given pauli string is automatically constructed.
- uuid: str
A uuid associated with the object
-
circuit:
Circuit|None= FieldInfo(annotation=Union[Circuit, NoneType], required=False, default_factory=<lambda>, validate_default=True)
- classmethod default_syndrome_circuit(value, info)[source]
In case the field circuit is not provided, the default syndrome extraction circuit is automatically assigned
-
name:
str= FieldInfo(annotation=str, required=False, default_factory=<lambda>, metadata=[MinLen(min_length=1)])
-
pauli:
str= FieldInfo(annotation=str, required=True, metadata=[MinLen(min_length=1)])
-
uuid:
str= FieldInfo(annotation=str, required=False, default_factory=<lambda>, validate_default=True)