{"id":28953402,"url":"https://github.com/munich-quantum-toolkit/predictor","last_synced_at":"2025-06-23T18:08:51.546Z","repository":{"id":61425299,"uuid":"467562687","full_name":"munich-quantum-toolkit/predictor","owner":"munich-quantum-toolkit","description":"MQT Predictor - A Tool for Automatic Device Selection with Device-Specific Circuit Compilation for Quantum Computing","archived":false,"fork":false,"pushed_at":"2025-06-11T15:37:48.000Z","size":84073,"stargazers_count":68,"open_issues_count":21,"forks_count":17,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-11T17:08:02.871Z","etag":null,"topics":["quantum-circuit","quantum-compiler","reinforcement-learning","supervised-machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/munich-quantum-toolkit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.rst","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.bib","codeowners":null,"security":null,"support":".github/support.rst","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-03-08T15:12:11.000Z","updated_at":"2025-06-11T15:45:51.000Z","dependencies_parsed_at":"2024-04-15T11:16:56.633Z","dependency_job_id":"cc7183c4-69f0-4089-ab02-1f394105c31b","html_url":"https://github.com/munich-quantum-toolkit/predictor","commit_stats":{"total_commits":463,"total_committers":6,"mean_commits":77.16666666666667,"dds":0.3131749460043196,"last_synced_commit":"ab0721bca669b63de05842c4cfddfdb64556533f"},"previous_names":["cda-tum/mqt-predictor","cda-tum/mqtpredictor","munich-quantum-toolkit/predictor"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/munich-quantum-toolkit/predictor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munich-quantum-toolkit%2Fpredictor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munich-quantum-toolkit%2Fpredictor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munich-quantum-toolkit%2Fpredictor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munich-quantum-toolkit%2Fpredictor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/munich-quantum-toolkit","download_url":"https://codeload.github.com/munich-quantum-toolkit/predictor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munich-quantum-toolkit%2Fpredictor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261528683,"owners_count":23172756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["quantum-circuit","quantum-compiler","reinforcement-learning","supervised-machine-learning"],"created_at":"2025-06-23T18:08:50.974Z","updated_at":"2025-06-23T18:08:51.506Z","avatar_url":"https://github.com/munich-quantum-toolkit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI](https://img.shields.io/pypi/v/mqt.predictor?logo=pypi\u0026style=flat-square)](https://pypi.org/project/mqt.predictor/)\n![OS](https://img.shields.io/badge/os-linux%20%7C%20macos%20%7C%20windows-blue?style=flat-square)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://opensource.org/licenses/MIT)\n[![CI](https://img.shields.io/github/actions/workflow/status/munich-quantum-toolkit/predictor/ci.yml?branch=main\u0026style=flat-square\u0026logo=github\u0026label=ci)](https://github.com/munich-quantum-toolkit/predictor/actions/workflows/ci.yml)\n[![CD](https://img.shields.io/github/actions/workflow/status/munich-quantum-toolkit/predictor/cd.yml?style=flat-square\u0026logo=github\u0026label=cd)](https://github.com/munich-quantum-toolkit/predictor/actions/workflows/cd.yml)\n[![Documentation](https://img.shields.io/readthedocs/mqt-predictor?logo=readthedocs\u0026style=flat-square)](https://mqt.readthedocs.io/projects/predictor)\n[![codecov](https://img.shields.io/codecov/c/github/munich-quantum-toolkit/predictor?style=flat-square\u0026logo=codecov)](https://codecov.io/gh/munich-quantum-toolkit/predictor)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://mqt.readthedocs.io\"\u003e\n   \u003cpicture\u003e\n     \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/logo-mqt-dark.svg\" width=\"60%\"\u003e\n     \u003cimg src=\"https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/logo-mqt-light.svg\" width=\"60%\" alt=\"MQT Logo\"\u003e\n   \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# MQT Predictor: Automatic Device Selection with Device-Specific Circuit Compilation for Quantum Computing\n\nMQT Predictor is a framework that allows one to automatically select a suitable quantum device for a particular application and provides an optimized compiler for the selected device.\nIt not only supports end-users in navigating the vast landscape of choices, it also allows to mix-and-match compiler passes from various tools to create optimized compilers that transcend the individual tools.\nEvaluations on more than 500 quantum circuits and seven devices have shown that—compared to Qiskit's and TKET's most optimized compilation flows—the MQT Predictor yields circuits with an expected fidelity that is on par with the best possible result that could be achieved by trying out all combinations of devices and compilers and even achieves a similar performance when considering the critical depth as an alternative figure of merit.\n\nTherefore, MQT Predictor tackles this problem from two angles:\n\n1. It provides a method (based on Reinforcement Learning) that produces device-specific quantum circuit compilers by combining compilation passes from various compiler tools and learning optimized sequences of those passes with respect to a customizable figure of merit). This mix-and-match of compiler passes from various tools allows one to eliminate vendor locks and to create optimized compilers that transcend the individual tools.\n\n2. It provides a prediction method (based on Supervised Machine Learning) that, without performing any compilation, automatically predicts the most suitable device for a given application. This completely eliminates the manual and laborious task of determining a suitable target device and guides end-users through the vast landscape of choices without the need for quantum computing expertise.\n\n\u003cp align=\"center\"\u003e\n\u003cpicture\u003e\n  \u003cimg src=\"docs/_static/problem.png\" width=\"100%\"\u003e\n\u003c/picture\u003e\n\u003c/p\u003e\n\nFor more details, please refer to:\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://mqt.readthedocs.io/projects/predictor\"\u003e\n  \u003cimg width=30% src=\"https://img.shields.io/badge/documentation-blue?style=for-the-badge\u0026logo=read%20the%20docs\" alt=\"Documentation\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Contributors and Supporters\n\nThe _[Munich Quantum Toolkit (MQT)](https://mqt.readthedocs.io)_ is developed by the [Chair for Design Automation](https://www.cda.cit.tum.de/) at the [Technical University of Munich](https://www.tum.de/) and supported by the [Munich Quantum Software Company (MQSC)](https://munichquantum.software).\nAmong others, it is part of the [Munich Quantum Software Stack (MQSS)](https://www.munich-quantum-valley.de/research/research-areas/mqss) ecosystem, which is being developed as part of the [Munich Quantum Valley (MQV)](https://www.munich-quantum-valley.de) initiative.\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/mqt-logo-banner-dark.svg\" width=\"90%\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/mqt-logo-banner-light.svg\" width=\"90%\" alt=\"MQT Partner Logos\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\nThank you to all the contributors who have helped make MQT Predictor a reality!\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/munich-quantum-toolkit/predictor/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=munich-quantum-toolkit/predictor\" /\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n## Getting Started\n\n`mqt.predictor` is available via [PyPI](https://pypi.org/project/mqt.predictor/).\n\n```console\n(venv) $ pip install mqt.predictor\n```\n\nThe following code gives an example on the usage:\n\n```python3\nfrom mqt.predictor import qcompile\nfrom mqt.bench import get_benchmark\n\n# get a benchmark circuit on algorithmic level representing the GHZ state with 5 qubits from [MQT Bench](https://github.com/munich-quantum-toolkit/bench)\nqc_uncompiled = get_benchmark(benchmark_name=\"ghz\", level=\"alg\", circuit_size=5)\n\n# compile it using the MQT Predictor\nqc_compiled, compilation_information, quantum_device = qcompile(\n    qc_uncompiled, figure_of_merit=\"expected_fidelity\"\n)\n\n# print the selected device and the compilation information\nprint(quantum_device, compilation_information)\n\n# draw the compiled circuit\nprint(qc_compiled.draw())\n```\n\n\u003e [!NOTE]\n\u003e To execute the code, respective machine learning models must be trained before.\n\u003e Up until mqt.predictor v2.0.0, pre-trained models were provided. However, this is not feasible anymore due to the\n\u003e increasing number of devices and figures of merits. Instead, we now provide a detailed documentation on how to train\n\u003e and setup the MQT Predictor framework.\\*\\*\n\n**Further documentation and examples are available at [ReadTheDocs](https://mqt.readthedocs.io/projects/predictor).**\n\n## References\n\nIn case you are using MQT Predictor in your work, we would be thankful if you referred to it by citing the following publication:\n\n```bibtex\n@ARTICLE{quetschlich2025mqtpredictor,\n    AUTHOR      = {N. Quetschlich and L. Burgholzer and R. Wille},\n    TITLE       = {{MQT Predictor: Automatic Device Selection with Device-Specific Circuit Compilation for Quantum Computing}},\n    YEAR        = {2025},\n    JOURNAL     = {ACM Transactions on Quantum Computing (TQC)},\n    DOI         = {10.1145/3673241},\n    EPRINT      = {2310.06889},\n    EPRINTTYPE  = {arxiv},\n}\n```\n\n---\n\n## Acknowledgements\n\nThis project received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research\nand innovation program (grant agreement No. 101001318), was part of the Munich Quantum Valley, which is supported by the\nBavarian state government with funds from the Hightech Agenda Bayern Plus, and has been supported by the BMWK on the\nbasis of a decision by the German Bundestag through project QuaST, as well as by the BMK, BMDW, the State of Upper\nAustria in the frame of the COMET program, and the QuantumReady project within Quantum Austria (managed by the FFG).\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/mqt-funding-footer-dark.svg\" width=\"90%\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/mqt-funding-footer-light.svg\" width=\"90%\" alt=\"MQT Funding Footer\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunich-quantum-toolkit%2Fpredictor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmunich-quantum-toolkit%2Fpredictor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunich-quantum-toolkit%2Fpredictor/lists"}