Researchers report hybrid MLIR-to-QIR translator reaches 95% similarity on 70 circuit tests
A preprint reports a hybrid MLIR-to-QIR translator that combines deterministic compilation, LLM agents and simulator testing. It achieved gate-exact deterministic translation on 70 circuit-dialect tests and above 95 percent distribution similarity, while producing valid logical QIR for four of six models on an unseen fault-tolerant dialect. The work matters because it gives quantum software teams a tested route to reduce manual compiler porting work in fragmented stacks.
In a preprint, Sharmin Afrose and colleagues describe a translator that moves quantum circuit code from MLIR dialects into QIR runtimes without writing a separate hand-coded pass for every dialect. The system chooses among three routes: a deterministic compiler path for known grammars, an agentic large-language-model path for unseen dialects, and a repair path that runs when deterministic output fails testing. The approach targets a practical software problem: quantum frameworks use different intermediate representations, making porting labor-intensive as hardware and compilers evolve.
The paper reports tests on 41 circuits spanning three dialects and 1 to 100 qubits. For known dialects Catalyst and Quake, the deterministic path was gate-exact on all 70 circuit-dialect pairs, with output distributions averaging above 95 percent similarity measured as 1 minus total variation distance. A dual-backend pipeline ran the original MLIR and generated QIR on independent simulators and compared their output distributions. On an unseen fault-tolerant dialect, four of six models produced valid logical-level QIR on the first iteration.
This sits in a growing effort to use AI as a compiler helper rather than a standalone oracle. The hybrid design keeps deterministic compilation where grammar is known, then calls a model only for dialect gaps, while testing catches invalid output. That matters because quantum software stacks are fragmented, and hand-written translation passes can slow portability across vendors and runtime targets. The paper is a preprint, so the results have not yet been peer reviewed, but the dual-backend testing gives a concrete check against simulator behavior rather than relying only on code plausibility.
For quantum software engineers, the result addresses manual porting work as new dialects and fault-tolerant representations appear. The tested workflow accepts existing MLIR input and produces QIR output checked on simulators, giving teams a route to reduce hand-written passes in the evaluated cases. The scale, up to 100 qubits and logical-level fault-tolerant circuits, points to tooling value for research platforms and runtime developers, while broader use would require validation on more dialects, real hardware interfaces and production workloads.
Quantum software teams and runtime developers gain a tested route to move circuits between MLIR dialects and QIR targets with less hand-written compiler work. The dual-backend simulator check gives a concrete way to validate generated quantum code before hardware execution.
Sources (1)
- [1]Original source(https://arxiv.org/abs/2611.25106)