🤖 AI text below 🤖
Goal
Reduce the duplicated OpenQASM parser and semantic implementation while preserving lightweight QuantumComputation consumers.
Direction to evaluate
Make the compiler's OpenQASM parser and semantic analysis the canonical frontend.
Provide separate emitters for MLIR programs and QuantumComputation rather than requiring every CoreIR consumer to link the complete LLVM/MLIR stack.
Retire the legacy parser only after behavioral parity is demonstrated.
Coordinate with the compiler translation work tracked in ✨ Extend OpenQASM-to-QC translation #1733 .
Required compatibility
OpenQASM 2 and supported OpenQASM 3 input.
Python QuantumComputation imports.
DDSIM inputs and layout comments.
Symbolic parameters, custom gates, control flow, diagnostics, and source locations to the extent supported today.
Acceptance criteria
One lexer/parser/semantic implementation serves both compiler and classic IR paths.
Lightweight CoreIR consumers do not acquire a runtime LLVM/MLIR dependency merely to parse OpenQASM.
Differential tests cover accepted programs, rejected programs, diagnostics, and constructed circuit semantics before the old frontend is deleted.
🤖 AI text below 🤖
Goal
Reduce the duplicated OpenQASM parser and semantic implementation while preserving lightweight
QuantumComputationconsumers.Direction to evaluate
QuantumComputationrather than requiring every CoreIR consumer to link the complete LLVM/MLIR stack.Required compatibility
QuantumComputationimports.Acceptance criteria