Repository Usage

There are two ways how to use MQT Predictor:

  1. Via the pip package mqt.predictor

  2. Directly via this repository

Usage via pip package

MQT Predictor is available via PyPI

(venv) $ pip install mqt.predictor

To compile a quantum circuit, use the qcompile method:

MQT Predictor.

This file is part of the MQT Predictor library released under the MIT license. See or go to for more information.

qcompile(qc, figure_of_merit='expected_fidelity')[source]

Compiles a given quantum circuit to a device with the highest predicted figure of merit.

  • qc (QuantumCircuit) – The quantum circuit to be compiled.

  • figure_of_merit (Literal['expected_fidelity', 'critical_depth']) – The figure of merit to be used for compilation. Defaults to “expected_fidelity”.


tuple[QuantumCircuit, list[str], str] – Returns a tuple containing the compiled quantum circuit, the compilation information and the name of the device used for compilation. If compilation fails, False is returned.

Currently available figures of merit are expected_fidelity and critical_depth.

An example how qcompile is used can be found in the quickstart jupyter notebook.

Usage directly via this repository

For that, the repository must be cloned and installed:

git clone
cd mqt-predictor
pip install .

Afterwards, the package can be used as described above.