Skip to content

Latest commit

 

History

5,071 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPI OS License: MIT DOI CI CD Documentation codecov

MQT Logo

MQT Core - The Backbone of the Munich Quantum Toolkit (MQT)

MQT Core provides reusable C++20 and Python libraries for quantum computing: the MQT Compiler Collection, built on MLIR and LLVM, together with decision diagrams, QIR execution, QDMI device access, SDK and HPC integrations, and structured benchmarks. It forms the backbone of the Munich Quantum Toolkit (MQT).

MQT Core 4 is a major architectural release. Structured compiler representations replace the classic circuit APIs and connect quantum-classical programs to optimization, hardware mapping, and execution. For the release highlights, see the v4 overview. Existing users should start with the v3-to-v4 migration guide.

Documentation

Start with your task

Install mqt.core in a Python 3.11 or newer virtual environment:

uv pip install mqt.core

For other installation options, follow the source-build instructions. Then choose a starting point:

Task Start here
Compile and execute a program Estimate a phase with QPE; explore compilation and execution.
Connect or implement a device Discover devices, integrate SDKs, or implement an interface.
Use decision diagrams Represent states and operations in C++ or Python: DD quickstart.
Generate and evaluate benchmarks Configure quantum programs and compare results with analytic references.
Exchange quantum programs Qiskit to QIR, OpenQASM, and jeff.
Embed or extend MQT Core Use the C++ libraries or extend the MLIR compiler.

Getting Started

Estimate the phase 3/8 with eight bits of precision using iterative quantum phase estimation (QPE). This uses two qubits and measurement feedback. Compile for the bundled DDSIM device, then submit the compiled program:

from fractions import Fraction

from mqt.core.bench import qpe
from mqt.core.mlir import compile_program, submit_program
from mqt.core.qdmi.driver import open_device

benchmark = qpe.QPE(qpe.Options(precision=8, phase=Fraction(3, 8), method=qpe.Method.ITERATIVE))
program = benchmark.generate()
device = open_device("mqt.ddsim.default")
compiled = compile_program(program, target=device)
job = submit_program(compiled, target=device, num_shots=1024)
job.wait()

counts = job.get_counts()
outcome = max(counts, key=lambda bits: counts[bits])
phase = Fraction(int(outcome, 2), 2**benchmark.output.width)
assert phase == benchmark.options.phase
assert benchmark.evaluate(counts).total_variation_distance < 1e-12
print(f"Counts: {counts}")
print(f"Estimated phase: {phase}")
Counts: {'01100000': 1024}
Estimated phase: 3/8

The QPE walkthrough compares standard and iterative QPE and evaluates a phase that cannot be represented exactly with eight bits. This phase-gate benchmark illustrates the phase-estimation step used in algorithms such as Shor's.

Development

Source builds require a C++20 compiler and CMake 3.28 or newer. Building the compiler collection also requires LLVM/MLIR 23.1 or newer. Prebuilt Python wheels include the compiler and simulator. Graphviz is optional for exporting DD visualizations.

See the contribution guide for development setup and checks. For questions and suggestions, open a discussion or an issue.

Contributors and Supporters

MQT Core is developed by MQSC and the Chair for Design Automation at the Technical University of Munich. Among others, it is part of the Munich Quantum Software Stack (MQSS) ecosystem, which is being developed as part of the Munich Quantum Valley (MQV) initiative.

MQT Partner Logos

Thank you to all the contributors who have helped make MQT Core a reality!

Contributors to munich-quantum-toolkit/core

The MQT will remain free, open-source, and permissively licensed — now and in the future. We are firmly committed to keeping it open and actively maintained for the quantum computing community.

To support this endeavor, please consider:

Sponsor the MQT

Cite This

Please cite the work that best fits your use case.

MQT Core (the tool)

When citing the software itself or results produced with it, cite the MQT Core paper:

@article{burgholzer2025MQTCore,
  title        = {{{MQT Core}}: {{The}} Backbone of the {{Munich Quantum Toolkit (MQT)}}},
  author       = {Burgholzer, Lukas and Stade, Yannick and Peham, Tom and Wille, Robert},
  year         = 2025,
  journal      = {Journal of Open Source Software},
  publisher    = {The Open Journal},
  volume       = 10,
  number       = 108,
  pages        = 7478,
  doi          = {10.21105/joss.07478},
  url          = {https://doi.org/10.21105/joss.07478}
}

The MQT Compiler Collection

When citing the compilation framework built on MLIR, cite the MQT Compiler Collection paper:

@article{MQTCompilerCollection2026,
  title        = {The {{MQT Compiler Collection}}: {{A}} Blueprint for a Future-Proof Quantum-Classical Compilation Framework},
  author       = {Burgholzer, Lukas and Haag, Daniel and Stade, Yannick and Rovara, Damian and Hopf, Patrick and Wille, Robert},
  year         = {2026},
  booktitle    = {Design, Automation and Test in Europe},
  doi          = {10.23919/DATE69613.2026.11539504},
  eprint       = {2604.08674},
  eprinttype   = {arxiv},
}

The Munich Quantum Toolkit (the project)

When discussing the overall MQT project or its ecosystem, cite the MQT Handbook:

@inproceedings{mqt,
  title        = {The {{MQT}} Handbook: {{A}} Summary of Design Automation Tools and Software for Quantum Computing},
  shorttitle   = {{The MQT Handbook}},
  author       = {Wille, Robert and Berent, Lucas and Forster, Tobias and Kunasaikaran, Jagatheesan and Mato, Kevin and Peham, Tom and Quetschlich, Nils and Rovara, Damian and Sander, Aaron and Schmid, Ludwig and Schoenberger, Daniel and Stade, Yannick and Burgholzer, Lukas},
  year         = 2024,
  booktitle    = {IEEE International Conference on Quantum Software (QSW)},
  doi          = {10.1109/QSW62656.2024.00013},
  eprint       = {2405.17543},
  eprinttype   = {arxiv},
  addendum     = {A live version of this document is available at \url{https://mqt.readthedocs.io}}
}

Acknowledgements

The Munich Quantum Toolkit has been supported by the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement No. 101001318), the Bavarian State Ministry for Science and Arts through the Distinguished Professorship Program, as well as the Munich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda Bayern Plus.

MQT Funding Footer

About

MQT Core - The Backbone of the Munich Quantum Toolkit

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

134 stars

Watchers

9 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages