qat.middleend.passes.gates.validation module

class NoMidCircuitMeasurements

Bases: ValidationPass

Checks that a circuit has no mid-circuit measurements.

Looks for Measure instructions on a qubit that is followed by any gate- or pulse-level instructions. Implementation at the gate-level allows us to identify measurements without wondering about the intent of pulses on the measure channel or acquisitions (which might be used for other reasons).

run(ir, *args, **kwargs)