https://github.com/cda-tum/mqt-misim
MQT library to handle quantum circuits with mixed dimensions
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.3%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
MQT library to handle quantum circuits with mixed dimensions
Basic Info
- Host: GitHub
- Owner: cda-tum
- License: mit
- Language: C++
- Default Branch: main
- Homepage: https://www.cda.cit.tum.de/research/quantum_dd/
- Size: 1.83 MB
Statistics
- Stars: 17
- Watchers: 3
- Forks: 1
- Open Issues: 5
- Releases: 0
Topics
Metadata Files
README.md
[!WARNING] As of May 2024, this repository is no longer actively maintained. All code has been directly integrated into MQT Qudits. Development is expected to continue there. No new contributions will be accepted here.
MQT MiSiM - A Tool for the Simulation of Mixed-Dimensional Quantum Circuits based on Decision Diagrams Written in C++
A tool for the simulation of mixed-dimensional quantum circuit by the Chair for Design Automation at the Technical University of Munich.
If you have any questions, feel free to contact us via quantum.cda@xcit.tum.de or by creating an issue on GitHub. For more information on Decision Diagrams, please visit www.cda.cit.tum.de/research/quantum_dd/.
Usage
This package caters primarily to our requirements regarding quantum-related functionality and, hence, may not be straightforward to use for other purposes.
A small example shows how to create set a single qubit in superposition.
```c++
include "dd/MDDPackage.hpp"
include
int main() { std::vectorstd::size_t lines{2, 3}; unsigned int numLines = 2U;
auto dd = std::make_unique<dd::MDDPackage>(numLines, lines); // Create new package instance capable of handling a qubit and a qutrit
auto zero_state = dd->makeZeroState(numLines); // zero_state = |0>
/* Creating a DD requires the following inputs:
- 1. A matrix describing a single-qubit/qudit operation (here: the Hadamard matrix)
- 2. The number of qudits the DD will operate on (here: two lines)
- 3. The operations are applied to the qubit q0 and the qutrit q1
(4. Controlled operations can be created by additionally specifying a list of control qubits before the target declaration) */ auto honqubit = dd->makeGateDDdd::GateMatrix(dd::H(), numLines, 0); // auto honqutrit = dd->makeGateDDdd::TritMatrix(dd::H3(), 2, 1);
// Multiplying the operation and the state results in a new state, here a single qubit in superposition auto psi = dd->multiply(honqubit, zero_state);
// Multiplying the operation and the state results in a new state, here a single qutrit in superposition // psi = dd->multiply(honqutrit, zero_state);
// An example of how to create a set of controls and add them together to create a more complex controlled operation dd::Controls control{}; const dd::Control c{0, 1}; control.insert(c);
// An example of a controlled qutrit X operation, controlled on the level 1 of the qubit auto CEX = dd->makeGateDDdd::TritMatrix(dd::X3, numLines, control, 1);
psi = dd->multiply(CEX, psi);
// The last lines retrieves the state vector and prints it dd->printVector(psi); }
```
System Requirements
Building (and running) is continuously tested under Linux, MacOS, and Windows using the latest available system versions for GitHub Actions. However, the implementation should be compatible with any current C++ compiler supporting C++17 and a minimum CMake version of 3.19.
Setup, Build, and Run
To start off, clone this repository using
shell
git clone --recurse-submodules -j8 https://github.com/cda-tum/mqt-misim/
Note the --recurse-submodules flag. It is required to also clone all the required submodules. If you happen to forget
passing the flag on your initial clone, you can initialize all the submodules by
executing git submodule update --init --recursive in the main project directory.
The MDD (Mixed-Decision-Diagrams) package is a header-only library, so there is no need to build it. However, we provide
a CMake-based build system for testing and benchmarking purposes. Additionally, a dedicated CMake
target MQT::MiSiM is provided to easily integrate the DD package into other CMake projects (see,
e.g., https://github.com/cda-tum/qfr).
If you want to build the tests and benchmarks, you need to first configure the project using CMake. This can be done by calling
shell
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_MISIM_TESTS=ON
This tells CMake to search the current directory . (passed via -S) for a CMakeLists.txt file and process it into a
directory build (passed via -B). The flag -DCMAKE_BUILD_TYPE=Release tells CMake to configure a Release build (
as opposed to, e.g., a Debug build), while the flag -DBUILD_MISIM_TESTS=ON tells CMake to also include the
tests in the build process.
After configuring with CMake, the project can be built by calling
shell
cmake --build build --config Release
This tries to build the project in the build directory (passed via --build). Some operating systems and developer
environments explicitly require a configuration to be set, which is why the --config flag is also passed to the build
command. The flag --parallel <NUMBER_OF_THREADS> may be added to trigger a parallel build.
This generates a number of executables in the build/test directory, including the test executable MiSiM_test
and the example executable MiSiM_example.
Further Information
The following papers provide further information on different aspects of representing states and operation in the quantum realm.
K. Mato, S. Hillmich and R. Wille, "Mixed-Dimensional Quantum Circuit Simulation with Decision Diagrams," 2023 IEEE International Conference on Quantum Computing and Engineering (QCE), Bellevue, Washington, USA, 2023.
For the representation of unitary matrices and state vectors (with a particular focus on simulation and measurement): A. Zulehner and R. Wille. Advanced Simulation of Quantum Computations. IEEE Transactions on Computer Aided Design of Integrated Circuits and Systems (TCAD), 2018.
For the representation and manipulation of unitary matrices (including proof of canonicy, multi-qubit systems, etc): P. Niemann, R. Wille, D. M. Miller, M. A. Thornton, and R. Drechsler. QMDDs: Efficient Quantum Function Representation and Manipulation. IEEE Transactions on Computer Aided Design of Integrated Circuits and Systems (TCAD), 35(1):86-99, 2016.
The paper describing this decision diagram package (with a special focus on the representation of complex numbers): A. Zulehner, S. Hillmich and R. Wille. How to Efficiently Handle Complex Values? Implementing Decision Diagrams for Quantum Computing. The IEEE/ACM International Conference on Computer-Aided Design (ICCAD). 2019
Owner
- Name: Chair for Design Automation, TU Munich
- Login: cda-tum
- Kind: organization
- Location: Germany
- Website: https://www.cda.cit.tum.de
- Repositories: 22
- Profile: https://github.com/cda-tum
The CDA provides expertise for all main steps in the design and realization of integrated circuits, embedded systems, as well as cyber-physical systems.
GitHub Events
Total
- Watch event: 9
- Push event: 13
Last Year
- Watch event: 9
- Push event: 13
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| kmatoxxx | k****o@t****e | 18 |
| Stefan Hillmich | s****h@j****t | 11 |
| pre-commit-ci[bot] | 6****] | 3 |
| Lukas Burgholzer | b****r@m****m | 1 |
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 2
- Total pull requests: 23
- Average time to close issues: 6 days
- Average time to close pull requests: 19 days
- Total issue authors: 2
- Total pull request authors: 4
- Average comments per issue: 1.0
- Average comments per pull request: 1.13
- Merged pull requests: 12
- Bot issues: 0
- Bot pull requests: 3
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- burgholzer (1)
- danielmpla (1)
Pull Request Authors
- KevinMTO (17)
- hillmich (5)
- burgholzer (3)
- pre-commit-ci[bot] (2)