Skip to content

About

MQT Scratch Quantum - A Quantum Computing Extension for Scratch

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

License: MIT and AGPL-3.0 CI Documentation

MQT Logo

Quantum Computing Extension for Scratch

The quantum computing extension adds quantum computing blocks to the Scratch editor. With it, you build quantum circuits by snapping blocks together, run them on a built-in simulator, estimate the resources they need, and export them to the MQT compiler toolchain. Developed by the Chair for Design Automation, Technical University of Munich, as part of the Munich Quantum Toolkit (MQT).

The extension is built to teach quantum design automation (compilation, resource estimation, and verification), which is hard to learn from textual representations. Because quantum circuits live inside normal Scratch programs, loops, conditionals, and variables work around and inside them, instead of unrolling a loop into a long circuit as in circuit editors. Simulation and resource estimation run in the same place, and the MLIR export opens the path to the wider quantum software ecosystem; see the paper for details.

Documentation Open the editor

Key Features

  • Quantum blocks for building circuits, including controlled operations and rotation gates
  • Statevector simulation directly inside Scratch
  • Resource estimation with configurable gate decomposition options
  • Export of circuits to the MQT qc MLIR dialect
  • Ready-to-use exercises for teaching quantum computing

If you have any questions, feel free to create an issue on GitHub.

Building the Editor

This repository contains the source of the extension, not a copy of Scratch. The build downloads scratch-vm and scratch-gui at pinned versions, applies a few patches, and adds the extension. You need Node.js 24 or later and git 2.32 or later:

npm run setup   # download and prepare Scratch, and install its dependencies
npm run dev     # run the editor at http://localhost:8601
npm test        # run the tests of the extension
npm run build   # build the editor into build/

The development guide explains the details.

Contributors and Supporters

The Munich Quantum Toolkit (MQT) is developed by the Chair for Design Automation at the Technical University of Munich and supported by the Munich Quantum Software Company (MQSC). 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 the quantum computing extension for Scratch a reality!

Contributors to munich-quantum-toolkit/scratch-quantum

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.

The quantum computing extension for Scratch

When citing the extension or its use in teaching, cite the QCE paper:

@inproceedings{qce_2026_01,
  title     = {{Teaching Quantum Design Automation with Block-Based Programming}},
  author    = {D. Rovara and R. Wille},
  booktitle = {IEEE International Conference on Quantum Computing and Engineering (QCE)},
  year      = {2026},
}

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       = {Robert Wille and Lucas Berent and Tobias Forster and Jagatheesan Kunasaikaran and Kevin Mato and Tom Peham and Nils Quetschlich and Damian Rovara and Aaron Sander and Ludwig Schmid and Daniel Schoenberger and Yannick Stade and Lukas Burgholzer},
  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}}
}

Credits

The editor is built on Scratch 3.0, developed by the Scratch Foundation. This project is not affiliated with or endorsed by the Scratch Foundation or MIT. The Scratch trademarks, including the Scratch name, logo, and Scratch Cat, are property of the Massachusetts Institute of Technology (MIT).

This repository is licensed under the MIT License, except for the directories vm/, gui/, and patches/, which are licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-only) like Scratch itself. The deployed editor contains Scratch and is therefore distributed under the AGPL-3.0.


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 Scratch Quantum - A Quantum Computing Extension for Scratch

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages