bloqade.gemini.common.validation.terminal_measure
terminal_measure¶
bloqade.gemini.common.validation.terminal_measure
Terminal-measurement validation for physical Gemini programs (post-unroll).
PhysicalTerminalMeasurementValidation checks that the unrolled squin kernel
has exactly one qubit.stmts.Measure statement and that it consumes every
qubit allocated in the circuit.
Run this after SquinToNative + AggressiveUnroll so that
qubit.stmts.New and qubit.stmts.Measure are present as direct IR
statements rather than Invokes.
The _PhysicalTerminalMeasurementAnalysis Forward pass accumulates a
measure_count on the interpreter; the per-statement impl is registered in
bloqade.gemini.common.impl.terminal_measure under the key
"gemini.validate.physical.terminal_measure".