tqec.circuit.measurement.RepeatedMeasurement#
- class RepeatedMeasurement(qubit: GridQubit, offsets: Interval)[source]#
A unique representation for a repeated measurement in a quantum circuit.
This class aims at being able to represent a repeated measurement in a quantum circuit in a unique and easily usable way. Repeated measurements can be found when a
stim.CircuitRepeatBlock
contains measurements.Note
This is not a global representation as the offsets is always relative to the end of the quantum circuit considered.
- qubit#
qubit on which the represented repeated measurement is performed.
- offsets#
an interval only containing negative offsets representing the number of measurements performed on the provided qubit after the represented measurement. A value of -1 means that the represented measurement is the last one applied on qubit.
- Type:
- Raises:
TQECException – if the provided offsetd contains positive entries.
Methods
__init__
(qubit, offsets)map_qubit
(qubit_map)Returns a new instance representing a measurement on the qubit obtained from self.qubit and the provided qubit_map.
measurements
()offset_spatially_by
(x, y)Returns a new instance offset by the provided spatial coordinates.
offset_temporally_by
(t)Returns a new instance offset by the provided temporal coordinates.
Attributes