Background
OpenQASM 3 provides a dedicated angle type that corresponds to binary angular measure (fixed precision). Some hardware only supports limited precision (e.g., a few bits) rotation angles.
Problem
Input programs (e.g. written in OpenQASM 3) might be using this angle type and we should be able to handle them.
Furthermore, some devices may only support limited precision for rotation angles.
Thus, we would need a quantization pass for rotation angles so that the resulting circuit can actually be executed on the hardware.
Proposal:
- Evaluate MLIR’s quant/fixed-point facilities to model angles; define a mapping and conversions to/from
arith when needed.
- Decide where angle typing lives (Ref vs Opt vs frontend-only) and document trade-offs.
This partially depends on #30 if we want to build the support for the angle type into the regular MQT Core IR.
Alternatively, one could consider adapting the existing OQ3 parser to act as a direct translator to MLIR. There is no current tracking issue for that.
Acceptance criteria:
- Design note with chosen representation and examples; parser/lowering hooks planned or implemented.
Background
OpenQASM 3 provides a dedicated
angletype that corresponds to binary angular measure (fixed precision). Some hardware only supports limited precision (e.g., a few bits) rotation angles.Problem
Input programs (e.g. written in OpenQASM 3) might be using this angle type and we should be able to handle them.
Furthermore, some devices may only support limited precision for rotation angles.
Thus, we would need a quantization pass for rotation angles so that the resulting circuit can actually be executed on the hardware.
Proposal:
arithwhen needed.This partially depends on #30 if we want to build the support for the angle type into the regular MQT Core IR.
Alternatively, one could consider adapting the existing OQ3 parser to act as a direct translator to MLIR. There is no current tracking issue for that.
Acceptance criteria: