Skip to main content

MQT Predictor - A MQT tool for Determining Good Quantum Circuit Compilation Options

Project description

PyPI OS License: MIT CI CD Documentation codecov

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

For more details, please refer to:

Documentation

MQT Predictor is part of the Munich Quantum Toolkit (MQT) developed by the Chair for Design Automation at the Technical University of Munich.

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

Getting Started

mqt-predictor is available via PyPI.

(venv) $ pip install mqt.predictor

The following code gives an example on the usage:

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

# get a benchmark circuit on algorithmic level representing the GHZ state with 5 qubits from [MQT Bench](https://github.com/cda-tum/mqt-bench)
qc_uncompiled = get_benchmark(benchmark_name="ghz", level="alg", circuit_size=5)

# compile it using the MQT Predictor
qc_compiled, compilation_information, quantum_device = qcompile(qc_uncompiled)

# 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.**

Further documentation and examples are available at ReadTheDocs.

References

In case you are using MQT Predictor in your work, we would be thankful if you referred to it by citing the following publication:

@ARTICLE{quetschlich2024mqtpredictor,
    AUTHOR      = {N. Quetschlich and L. Burgholzer and R. Wille},
    TITLE       = {{MQT Predictor: Automatic Device Selection with Device-Specific Circuit Compilation for Quantum Computing}},
    YEAR        = {2024},
    JOURNAL     = {ACM Transactions on Quantum Computing (TQC)},
    DOI         = {10.1145/3673241},
    EPRINT      = {2310.06889},
    EPRINTTYPE  = {arxiv},
}

Acknowledgements

This project received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement No. 101001318), was part of the Munich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda Bayern Plus, and has been supported by the BMWK on the basis of a decision by the German Bundestag through project QuaST, as well as by the BMK, BMDW, the State of Upper Austria in the frame of the COMET program, and the QuantumReady project within Quantum Austria (managed by the FFG).

TUM Logo Coat of Arms of Bavaria ERC Logo MQV Logo

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.1.1.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

mqt.predictor-2.1.1-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mqt_predictor-2.1.1.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for mqt_predictor-2.1.1.tar.gz
Algorithm Hash digest
SHA256 7ae2fb4e424355c404f9e78d5ae41ec74221b6f4f3479ef12b455d8be5169398
MD5 283b9331eb1f8a31ca64df1670d7366c
BLAKE2b-256 081a6f76117cfa087ff62d1ca021e9c91aa7830283a5dd13eed1a60a30e2f2f8

See more details on using hashes here.

Provenance

File details

Details for the file mqt.predictor-2.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mqt.predictor-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2544d7a332da7d71d505e22847de8010e805d553b9486f92ceb54bef057a3430
MD5 a574f6b22ebe26aa978082c624ad9595
BLAKE2b-256 e007612d3f88fb35d9ffa03fd8e60c2e7e095c6558a3d494a9b16ed98c3c8518

See more details on using hashes here.

Provenance

Supported by

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