Skip to content

Latest commit

 

History

5,103 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 Factor 21 with Shor's algorithm; 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 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

Factor 21 with Shor's algorithm, using modular arithmetic, a reused query qubit, and measurement feedback. The callback compiles each circuit for the bundled DDSIM device and submits 64 shots through each payload format:

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

device = open_device("mqt.ddsim.default")


def run(benchmark: shor.Shor) -> dict[str, int]:
    compiled = compile_program(benchmark.generate(), target=device, program_format=program_format)
    job = submit_program(compiled, target=device, num_shots=64, custom1=17)
    job.wait()
    return job.get_counts()


for program_format in (ProgramFormat.QIR_ADAPTIVE_MODULE, ProgramFormat.QASM3):
    result = shor.factor(21, run)
    assert result.status == shor.FactorStatus.SUCCESS
    assert result.factors == (3, 7)
    print(f"{program_format.name}: {result.factors}")
QIR_ADAPTIVE_MODULE: (3, 7)
QASM3: (3, 7)

The factoring walkthrough explains the measured phase, continued fractions, and verified factor recovery.

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 - 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.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

134 stars

Watchers

9 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages