tqec.plaquette.plaquette.Plaquette#
- class Plaquette(name: str, qubits: ~tqec.plaquette.qubit.PlaquetteQubits, circuit: ~tqec.circuit.schedule.circuit.ScheduledCircuit, mergeable_instructions: frozenset[str] = <factory>)[source]#
Represents a QEC plaquette.
This class stores qubits in the plaquette local coordinate system and a scheduled circuit that should be applied on those qubits to perform the QEC experiment.
By convention, the local plaquette coordinate system is composed of a X-axis pointing to the right and a Y-axis pointing down.
- name#
a unique name for the plaquette. This field is used to compare plaquettes efficiently (two
Plaquette
instances are considered equal if and only if their names are the same) as well as computing a hash value for any plaquette instance. Finally, the name is used to represent aPlaquette
instance as a string.- Type:
str
- qubits#
qubits used by the plaquette circuit, given in the local plaquette coordinate system.
- circuit#
scheduled quantum circuit implementing the computation that the plaquette should represent.
- mergeable_instructions#
a set of instructions that can be merged. This is useful when merging several plaquettes’ circuits together to remove duplicate instructions.
- Type:
frozenset[str]
- Raises:
TQECException – if the provided circuit uses qubits not listed in qubits.
- __init__(name: str, qubits: ~tqec.plaquette.qubit.PlaquetteQubits, circuit: ~tqec.circuit.schedule.circuit.ScheduledCircuit, mergeable_instructions: frozenset[str] = <factory>) None #
Methods
__init__
(name, qubits, circuit[, ...])project_on_boundary
(projected_orientation)Project the plaquette on boundary and return a new plaquette with the remaining qubits and circuit.
reliable_hash
()Attributes
num_measurements
origin