← Quantum Store · Guides · Lessons · Glossary · Packages · About · Türkçe
TU München — Chair for Design Automation
MQT Bench benchmark circuits
Official source: munich-quantum-toolkit/bench
Download ZIP (free)MQT Bench, which produces standard benchmark circuits (GHZ, QFT, Grover and dozens more) for comparing quantum software tools, with a tested example that exports the circuits as OpenQASM 3.
What is MQT Bench?
MQT Bench is part of the Technical University of Munich's Munich Quantum Toolkit (MQT) project. It produces standard sets of circuits for fairly comparing quantum compilers, simulators and other tools. Each circuit is available at different levels of abstraction (algorithmic, target-independent, mapped to hardware).
When to use it
- When measuring the performance of a compiler or optimisation method.
- When you want reproducible test circuits in your paper.
The example in this package
benchmark_al.py generates GHZ, QFT and Grover circuits for 3 and 5 qubits,
prints their depth and gate counts, and saves each one as an OpenQASM 3 file
in the benchmarks/ folder.
Next steps
- Get the circuits in a specific hardware's gate set with
level=BenchmarkLevel.NATIVEGATES. - Download in bulk without writing code from the mqt-bench.app web interface.
Installation and running
pip install mqt.bench
python benchmark_al.py
Tested with: mqt.bench 2.3.0, Python 3.12.
Official source
- Repository: munich-quantum-toolkit/bench
- Latest release: v2.3.0 — 12 September 2026
- Licence: MIT
- Stars: 131
- Default branch commit when the catalogue was built:
fcc5b3cb15a5(12 October 2026)
Links
Package contents
benchmark_al.pyREADME.en.md— this fileREADME.md— the same guide in TurkishLICENSE— the licence of the files in this packageKAYNAK.json— a machine-readable summary of the official sourceUPSTREAM-LICENSE.txt— the licence text of the official project
Licence
The example code and the guide in this package were written by the Quantum Store editors and are MIT licensed. The project it uses is subject to its own licence (MIT).
Quantum Store — https://hakanerdogan.com/en
Example code
The example shipped in the package, run and checked. Comments and printed messages are in Turkish; the code is the same in any language. Everything is in the ZIP.
benchmark_al.py
"""MQT Bench: standart kıyaslama (benchmark) devrelerini üret ve dışa aktar.
GHZ, QFT ve Grover devrelerini farklı boyutlarda üretir, kapı sayılarını
yazdırır ve OpenQASM 3 dosyası olarak kaydeder.
Çalıştırma:
pip install mqt.bench
python benchmark_al.py
"""
from pathlib import Path
from mqt.bench import BenchmarkLevel, get_benchmark
from qiskit import qasm3
out = Path("benchmarks")
out.mkdir(exist_ok=True)
for name in ("ghz", "qft", "grover"):
for size in (3, 5):
qc = get_benchmark(benchmark=name, level=BenchmarkLevel.ALG, circuit_size=size)
ops = dict(qc.count_ops())
path = out / f"{name}_{size}.qasm"
path.write_text(qasm3.dumps(qc), encoding="utf-8")
print(f"{name:7s} n={size}: derinlik={qc.depth():3d} kapılar={ops}")
assert qc.num_qubits >= size
print(f"Tamam: devreler {out.resolve()} klasörüne kaydedildi.")
Related concepts
- Quantum circuit · A quantum circuit is a quantum program made of gates applied to qubits in order, followed by measurements.