tqec.circuit.operations.measurement_map.compute_global_measurements_lookback_offsets
- compute_global_measurements_lookback_offsets(measurements_record: MeasurementsRecord, measurement_map: CircuitMeasurementMap, current_moment_index: int) list[int] [source]
Computes, from the data in the given measurement_map, the global measurement offsets.
This method uses the global data computed in the CircuitMeasurementMap instance given as parameter to compute the measurement record indices for the current gate instance.
- Parameters:
measurements_record – the record of measurements to compute global measurements offset from.
measurement_map – global measurement data obtained from the complete quantum circuit.
current_moment_index – index of the moment this gate instance is found in. Used to recover the correct data from the given measurement_map.
- Returns:
the computed list of global measurements lookback offsets.
- Raises:
TQECException – if the global measurement offset computation fails.