Repository Usage

There are three ways how to use this benchmark suite:

  1. Via the webpage hosted at https://www.cda.cit.tum.de/mqtbench/

  2. Via the pip package mqt.bench

  3. Directly via this repository

Since the first way is rather self-explanatory, the other two ways are explained in more detail in the following.

Usage via pip package

MQT Bench is available via PyPI

(venv) $ pip install mqt.bench

To generate a benchmark circuit, use the get_benchmark() method. The available parameters are described on the parameter space description page and the algorithms are described on the algorithm page. For example, in order to obtain the 5-qubit Deutsch-Josza benchmark on algorithm level, use the following:

1from mqt.bench import BenchmarkLevel, get_benchmark
2
3qc = get_benchmark("dj", BenchmarkLevel.ALG, 5)
4qc.draw(output="mpl")
_images/062eeb8a0f8a3e656addead5dee543cb8c50fce2cf3cacac315883f462e33112.svg

Examples can be found in the Quickstart jupyter notebook.

Usage directly via this repository

For that, the repository must be cloned and installed:

git clone https://github.com/munich-quantum-toolkit/bench.git mqt-bench
cd mqt-bench
pip install .

Afterwards, the package can be used as described above.