🤖 AI Summary
This work addresses the lack of efficient support for critical quantum compilation tasks—such as qubit routing and SWAP insertion within quantum circuit mapping—in the MLIR ecosystem. We present the first native implementation of an A* search algorithm tailored for quantum circuits directly within the MLIR framework, enabling a scalable, quantum-specific optimization pipeline. By integrating tightly with MLIR’s infrastructure, our approach overcomes performance and system integration limitations inherent in conventional non-MLIR solutions. Experimental results demonstrate that our method consistently outperforms existing techniques in both solution quality and runtime efficiency. The implementation has been open-sourced to facilitate broader adoption and further research in quantum compilation within the MLIR community.
📝 Abstract
The Multi-Level Intermediate Representation (MLIR) framework has become a cornerstone for building extensible, domain-specific compilers, with the quantum computing community already leveraging it to model quantum programs and implement basic optimizations. However, computationally intensive tasks in the quantum compilation pipeline, such as quantum circuit mapping, remain underexplored within the MLIR ecosystem. This paper proposes an MLIR-native blueprint for these non-local, quantum-specific optimization routines by reimplementing a well-established, state-of-the-art mapping A* search algorithm for qubit routing and SWAP insertion. Our evaluation demonstrates that this approach not only integrates seamlessly into an MLIR-based quantum compiler collection but also surpasses previous non-MLIR solutions in both solution quality and runtime. The implementation is open-source and publicly available at https://github.com/munich-quantum-toolkit/core.