Predicting Good Quantum Circuit Compilation Options
Nils Quetschlich, Lukas Burgholzer, Robert Wille
TL;DR
This work addresses the challenge of selecting optimal quantum circuit compilation options (qubit technology, device, compiler, and settings) for a given circuit. It formulates the problem as a supervised classification task and builds a training pipeline using $3000$ circuits from MQT Bench to predict the best option with a Random Forest classifier, achieving best options for over $75 ext{ of unseen circuits}$ and top-3 for over $95 ext{ of unseen circuits}$, while reducing median compilation time by more than an order of magnitude. The framework yields interpretable knowledge via feature importance and is publicly available as MQTPredictor within the Munich Quantum Toolkit, enabling end-users to deploy quantum circuits on real hardware with guidance and rapid feedback. The results demonstrate a practical, scalable approach to automate and explain the selection of compilation options, potentially accelerating adoption of quantum computing across diverse domains.
Abstract
Any potential application of quantum computing, once encoded as a quantum circuit, needs to be compiled in order to be executed on a quantum computer. Deciding which qubit technology, which device, which compiler, and which corresponding settings are best for the considered problem -- according to a measure of goodness -- requires expert knowledge and is overwhelming for end-users from different domains trying to use quantum computing to their advantage. In this work, we treat the problem as a statistical classification task and explore the utilization of supervised machine learning techniques to optimize the compilation of quantum circuits. Based on that, we propose a framework that, given a quantum circuit, predicts the best combination of these options and, therefore, automatically makes these decisions for end-users. Experimental evaluations show that, considering a prototypical setting with 3000 quantum circuits, the proposed framework yields promising results: for more than three quarters of all unseen test circuits, the best combination of compilation options is determined. Moreover, for more than 95% of the circuits, a combination of compilation options within the top-three is determined -- while the median compilation time is reduced by more than one order of magnitude. Furthermore, the resulting methodology not only provides end-users with a prediction of the best compilation options, but also provides means to extract explicit knowledge from the machine learning technique. This knowledge helps in two ways: it lays the foundation for further applications of machine learning in this domain and, also, allows one to quickly verify whether a machine learning algorithm is reasonably trained. The corresponding framework and the pre-trained classifier are publicly available on GitHub (https://github.com/cda-tum/MQTPredictor) as part of the Munich Quantum Toolkit (MQT).
