iqm.error_reduction_tools.twirling.twirling_modifiers.process_measure_gate#
- iqm.error_reduction_tools.twirling.twirling_modifiers.process_measure_gate(operation, new_circuit, registers, drop_final_rz=True)#
Process a measurement gate: record readout twirling character and append.
Determines the net readout twirling character (‘I’ or ‘X’) from the parity of accumulated π rotations on the measured qubit, stores it in
registers.rot_chars, and appends the measurement operation.- Parameters:
operation (CircuitOperation) – The measurement CircuitOperation to process.
new_circuit (TwirledCircuit) – The new circuit being built.
registers (TrackingRegisters) – Tracking registers for π-rotation state and readout characters.
drop_final_rz (bool) – If True (default), any pending virtual-Z before measurement is silently dropped. If False, raises NotImplementedError.
- Return type:
None