tqecd.measurement.RelativeMeasurementLocation#
- class RelativeMeasurementLocation(offset: int, qubit_index: int)[source]#
Represents a unique measurement with an offset.
Measurements are represented with the same method as stim: by a negative offset. This means that instances of this class have no meaning if they are not associated with a precise point in the circuit, but this also means that they can represent measurements without the need for global information.
This class also stores the qubit that is being measured in order to be able to retrieve its coordinate to build a detector when found.
- __init__(offset: int, qubit_index: int) None #
Methods
__init__
(offset, qubit_index)offset_by
(offset)Attributes
offset
qubit_index