Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyPI License: MIT Deploy to PyPI CodeCov

MQT Bench: Benchmarking Software and Design Automation Tools for Quantum Computing

MQT Bench is a benchmarking suite with cross-layer support. This means, that the same benchmarking algorithms are provided for different abstraction layers throught the quantum computing software stack.

MQT Bench uses the structure proposed by the openQASM 3.0 consortia [1] and offers benchmarks on four different abstraction layers:

  1. Algorithm Layer
  2. Target-independent Layer
  3. Target-dependent Native Gates Layer
  4. Target-dependent Mapped Layer

Variational quantum algorithms (VQAs) are an emerging class of quantum algorithms with a wide range of applications. A respective circuit is depicted above and shows an example of an ansatz function frequently used for variational quantum eigensolvers, a subclass of VQAs. On this abstraction layer, the circuit is parameterized by the angles θi of the six single-qubit gates. This is the Algorithm layer description.

VQAs are hybrid quantum-classical algorithms, where the parameters of the quantum ansatz are iteratively updated by a classical optimizer analogous to conventional gradient-based optimization. Assuming these parameters have been calculated, they are now propagated and the resulting quantum circuit is shown in above. This is the target-independent layer description.

Different quantum computer realizations support different native gate-sets. In our example, the target device is the IBM-Q Manila device which natively supports Rz, √X, CX, U, and X and is shown in the graph. Consequently, the Ry gates in the previous figure have to be converted using only the native gates. In this case, they are substituted by a sequence of Rz gates denoted as phase gates of -pi and X gates as shown in the figure above. This is the target-dependent native gates layer description.

The architecture of the IBM-Q Manila device is shown in the hardware architecture figure and it defines between which qubits a two-qubit operation may be performed. Since the circuit shown in the previous figure contains CX gates operating between all combination of qubits, there is no mapping directly matching the target architecture's layout. As a consequence, a non-trivial mapping followed by a round of optimization leads to the resulting circuit shown in the figure above. This is also the reason for the different sequence of CX gates compared to the previous example. This is the target-dependent mapped layer description.

Benchmark Selection

So far, the following benchmarks are implemented:

  • Amplitude Estimation
  • GHZ State
  • Graph State
  • W State
  • Grover's Algorithm
  • Shor's Algorithm
  • QAOA
  • VQE
  • VQE-ansätze with random values:
    • Two Local
    • Real Amplitudes
    • Efficient SU2
  • Deutsch Jozsa
  • HHL
  • Quantum Walk
  • Quantum Fourier Transformation
  • Quantum Fourier Transformation Entangled
  • Quantum Phase Estimation Exact
  • Quantum Phase Estimation Inexact

Additionally, several quantum application algorithms are available.

Native Gate-Set Support

So far, MQT Bench supports the following native gate-sets:

  1. IBM-Q gate set with ['id', 'rz', 'sx', 'x', 'cx', 'reset']
  2. Rigetti gate set with ['id, 'rx', 'rz', 'cz', 'reset']

Mapping Scheme Support

Currently, MQT Bench supports two mapping schemes:

  1. Smallest Fitting Architecture Mapping: Maps quantum circuits to the smallest architecture with a sufficient number of physical qubits
  2. Biggest Architecture Mapping: Always use the biggest available hardware architecture

Structure

  • src: Directory for utils.py file and the source code of the benchmarks
  • benchmarks: On top level, the benchmarks are included with one benchmark algorithms per file.
    • Additionally, folders for each qiskit application module and their respective benchmarks are listed
  • benchviewer: This is the folder for our webpage hosted at https://www.cda.cit.tum.de/app/benchviewer/.
MQT Bench/
│ - README.md
│
└───mqt/bench/
│   │───benchmark_generator.py  
│   └───utils/
│   │   │ - utils.py
│   │
│   └───benchmarks/
│       │ - ae.py
│       │   ...
│       │ - wstate.py
│       └─── qiskit_application_finance
│       │       ...
│       └─── qiskit_application_ml
│       │       ...
│       └─── qiskit_application_nature
│       │       ...
│       └─── qiskit_application_optimization
│       │       ...
│
│───benchviewer/
└───qasm_output/

Repository Usage

Preferably, our benchmarks are accessed using our website or our using pip install mqt.bench. Since all generated benchmarks hosted on our website are included in this repository, the repository is very large (>25 GB). Therefore, please do a sparse-checkout if you want to directly access the repository itself:

git clone --filter=blob:none --no-checkout  https://github.com/cda-tum/MQTBench.git
cd MQTBench
git sparse-checkout init --cone
git sparse-checkout set mqt img
git checkout main

Packages Usage

To start the creation of all benchmarks, just run the jupyter notebook python benchmark_creator.py <config_name>.json file.

References:

[1] A.Cross et al., OpenQASM 3: A broader and deeper quantum assembly language, arXiv:2104.14722, 2021

Release files for mqt-bench 0.1.0rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mqt-bench 0.1.0rc1
File Size Uploaded
mqt.bench-0.1.0rc1.tar.gz 28.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mqt-bench 0.1.0rc1
File Interpreter ABI Platform
mqt.bench-0.1.0rc1-py3-none-any.whl Python 3 none any Details

Total release size: 67.4 kB

Release files / mqt.bench-0.1.0rc1.tar.gz

Download URL mqt.bench-0.1.0rc1.tar.gz
Size 28.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c89b9b8a98b3e6cb861c7a0793db2153a0b4ebd5fdc0c520e314866888ec852d
BLAKE2b-256 checksum
How to use checksums
9ff2fd6d539eb6a9661debc5c0cf2eb2553e360da558fbb8a5f7ec486e3e6f07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / mqt.bench-0.1.0rc1-py3-none-any.whl

Download URL mqt.bench-0.1.0rc1-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5272b5312f4fec7474aca77f8c62ac7c8871bae7b67edf6c172b5d9c12963a27
BLAKE2b-256 checksum
How to use checksums
d5ac2d1596ea52567cca4474b1d36f80a518be42efe776de37d37feea49c549f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release history Release notifications | RSS feed

2.3.0

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

This release

0.1.0rc1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page