MQT Bench - A MQT tool for Benchmarking Quantum Software Tools
Project description
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:
- Algorithm Layer
- Target-independent Layer
- Target-dependent Native Gates Layer
- 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:
- IBM-Q gate set with ['id', 'rz', 'sx', 'x', 'cx', 'reset']
- Rigetti gate set with ['id, 'rx', 'rz', 'cz', 'reset']
Mapping Scheme Support
Currently, MQT Bench supports two mapping schemes:
- Smallest Fitting Architecture Mapping: Maps quantum circuits to the smallest architecture with a sufficient number of physical qubits
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mqt.bench-0.1.0rc1.tar.gz
.
File metadata
- Download URL: mqt.bench-0.1.0rc1.tar.gz
- Upload date:
- Size: 28.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c89b9b8a98b3e6cb861c7a0793db2153a0b4ebd5fdc0c520e314866888ec852d |
|
MD5 | 56e736553c24d12d4aff419ef95d4968 |
|
BLAKE2b-256 | 9ff2fd6d539eb6a9661debc5c0cf2eb2553e360da558fbb8a5f7ec486e3e6f07 |
File details
Details for the file mqt.bench-0.1.0rc1-py3-none-any.whl
.
File metadata
- Download URL: mqt.bench-0.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 39.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5272b5312f4fec7474aca77f8c62ac7c8871bae7b67edf6c172b5d9c12963a27 |
|
MD5 | da642830ace1b1fc888c4142595742d6 |
|
BLAKE2b-256 | d5ac2d1596ea52567cca4474b1d36f80a518be42efe776de37d37feea49c549f |