Skip to main content

MQT Predictor - A MQT Tool for Automatic Device Selection with Device-Specific Circuit Compilation for Quantum Computing

Project description

PyPI OS License: MIT CI CD Documentation codecov

MQT Logo

MQT Predictor - Automatic Device Selection with Device-Specific Circuit Compilation for Quantum Computing

MQT 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. It is part of the Munich Quantum Toolkit (MQT).

Documentation

Key Features

MQT Predictor supports end-users in navigating the vast landscape of choices by allowing them to mix-and-match compiler passes from various tools to create optimized compilers that transcend the individual tools. Evaluations 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.

Therefore, MQT Predictor tackles this problem from two angles:

  1. 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.

  2. 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.

If you have any questions, feel free to create a discussion or an issue on GitHub.

Contributors and Supporters

The Munich Quantum Toolkit (MQT) is developed by the Chair for Design Automation at the Technical University of Munich and supported by MQSC. Among others, it is part of the Munich Quantum Software Stack (MQSS) ecosystem, which is being developed as part of the Munich Quantum Valley (MQV) initiative.

MQT Partner Logos

Thank you to all the contributors who have helped make MQT Predictor a reality!

Contributors to munich-quantum-toolkit/predictor

The MQT will remain free, open-source, and permissively licensed—now and in the future. We are firmly committed to keeping it open and actively maintained for the quantum computing community.

To support this endeavor, please consider:

Sponsor the MQT

Getting Started

mqt.predictor is available via PyPI.

uv pip install mqt.predictor

The following code gives an example on the usage:

from mqt.predictor import qcompile
from mqt.bench import get_benchmark, BenchmarkLevel

# Get a benchmark circuit from MQT Bench
qc_uncompiled = get_benchmark(benchmark="ghz", level=BenchmarkLevel.ALG, circuit_size=5)

# Compile it using the MQT Predictor
qc_compiled, compilation_information, quantum_device = qcompile(
    qc=qc_uncompiled,
    figure_of_merit="expected_fidelity",
)

# Print the selected device and the compilation information
print(quantum_device, compilation_information)

# Draw the compiled circuit
print(qc_compiled.draw())

[!NOTE] To execute the code, respective machine learning models must be trained before. Up until mqt.predictor v2.0.0, pre-trained models were provided. However, this is not feasible anymore due to the increasing number of devices and figures of merits. Instead, we now provide a detailed documentation on how to train and setup the MQT Predictor framework.

Detailed documentation and examples are available at ReadTheDocs.

System Requirements

MQT Predictor can be installed on all major operating systems with all supported Python versions. Building (and running) is continuously tested under Linux, macOS, and Windows using the latest available system versions for GitHub Actions.

Cite This

Please cite the work that best fits your use case.

MQT Predictor (the tool)

When citing the software itself or results produced with it, cite the MQT Predictor paper:

@article{quetschlich2025mqtpredictor,
  title        = {{MQT Predictor: Automatic Device Selection with Device-Specific Circuit Compilation for Quantum Computing}},
  author       = {Quetschlich, Nils and Burgholzer, Lukas and Wille, Robert},
  year         = {2025},
  journal      = {ACM Transactions on Quantum Computing (TQC)},
  doi          = {10.1145/3673241},
  eprint       = {2310.06889},
  eprinttype   = {arxiv}
}

The Munich Quantum Toolkit (the project)

When discussing the overall MQT project or its ecosystem, cite the MQT Handbook:

@inproceedings{mqt,
  title        = {The {{MQT}} Handbook: {{A}} Summary of Design Automation Tools and Software for Quantum Computing},
  shorttitle   = {{The MQT Handbook}},
  author       = {Wille, Robert and Berent, Lucas and Forster, Tobias and Kunasaikaran, Jagatheesan and Mato, Kevin and Peham, Tom and Quetschlich, Nils and Rovara, Damian and Sander, Aaron and Schmid, Ludwig and Schoenberger, Daniel and Stade, Yannick and Burgholzer, Lukas},
  year         = 2024,
  booktitle    = {IEEE International Conference on Quantum Software (QSW)},
  doi          = {10.1109/QSW62656.2024.00013},
  eprint       = {2405.17543},
  eprinttype   = {arxiv},
  addendum     = {A live version of this document is available at \url{https://mqt.readthedocs.io}}
}

Acknowledgements

The Munich Quantum Toolkit has been supported by the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement No. 101001318), the Bavarian State Ministry for Science and Arts through the Distinguished Professorship Program, as well as the Munich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda Bayern Plus.

MQT Funding Footer

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mqt_predictor-2.4.0.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mqt_predictor-2.4.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file mqt_predictor-2.4.0.tar.gz.

File metadata

  • Download URL: mqt_predictor-2.4.0.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for mqt_predictor-2.4.0.tar.gz
Algorithm Hash digest
SHA256 d47b8a75a7679d24243c3f103e0e62ab33d65ca772de87d764637e07a44ecd9e
MD5 d16504935adf78f6dcc9713ac519f700
BLAKE2b-256 b5b9d949213372d1c47210913a26bfee81324f536c0fa08c504e9fb00192f67c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mqt_predictor-2.4.0.tar.gz:

Publisher: cd.yml on munich-quantum-toolkit/predictor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mqt_predictor-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: mqt_predictor-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for mqt_predictor-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 947106334a3541f7e392a2e31c561b03f8f4e26ac603c9cefee3968594bb42c3
MD5 84727e31f39d513b75d0f4a8384d0141
BLAKE2b-256 870b872a4c093bf792dc5d694a2122ed64dd9bc5c75205db267cca12f2f2195c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mqt_predictor-2.4.0-py3-none-any.whl:

Publisher: cd.yml on munich-quantum-toolkit/predictor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page