Host readout¶
oracq.infrastructure.readout
Host readout plan; the quantum RIR stays composable, with terminal measurement and reset described separately.
- class oracq.infrastructure.readout.ReadoutAction(kind, register)[source]¶
Bases:
objectDescription of one terminal host readout action.
- Variables:
kind (str) – action category,
measureorreset.register (str) – public register name the action applies to.
- kind¶
- register¶
- oracq.infrastructure.readout.export_with_readout(program, actions=())[source]¶
Export a closed program to OriginIR and append host readout actions in order at the end.
- Parameters:
program – closed program to export.
actions – sequence of
ReadoutActionsteps executed in order; when empty the export result is returned directly.
- Returns:
export artifact with the actions appended; the plain export result when there are no actions.
- Return type:
- Raises:
ValidationError – an action category is neither measurement nor reset, or a register name is absent from the export artifact.
uniqcis imported lazily only when actions are provided, flattening the modular text into extended OriginIR (the host dynamic parser does not accept DEF); measurement results go into sequentially numbered classical bits, and the CREG line is rewritten accordingly.