Build circuits
Create qubit registers and apply the standard gates, rotations, and controlled operations, all by dragging and dropping blocks.
As quantum circuits grow beyond small toy examples, preparing them for execution on real hardware becomes increasingly complex. Design automation methods take over this work: compilation adapts circuits to a specific device, resource estimation evaluates their cost, and verification checks their correctness. For newcomers, however, these concepts come with a steep learning curve, especially when quantum circuits are introduced through textual programming languages.
Scratch for Quantum Computing lowers this barrier. It adds a Quantum extension to Scratch, a widely used block-based programming environment, so that quantum circuits can be built from blocks, combined with classical program logic, and analyzed with design automation techniques directly in the browser.
Quantum computing is usually introduced through linear algebra or through programming frameworks such as Qiskit. Both pose a high entry barrier for newcomers. With blocks, syntax errors cannot occur, and the focus stays on the concepts: qubits, gates, superposition, entanglement, and measurement. Since the extension is part of regular Scratch, quantum circuits can also be combined with loops, variables, and sprites, which links quantum programs to familiar classical control flow.
Create qubit registers and apply the standard gates, rotations, and controlled operations, all by dragging and dropping blocks.
Simulate circuits directly in the browser and use measurement outcomes in the rest of a Scratch program.
Check whether two circuits are equivalent, count their qubits and gates, and see how decomposing gates changes those counts.
Translate circuits to MLIR and process them further with quantum compiler tools such as the MQT Compiler Collection.
0 or 1; since measurement outcomes are random, the result varies between runs.
Measuring qubit 1 as well shows that the two qubits are entangled: both results always agree.
Scratch for Quantum Computing runs entirely in the browser and requires no installation. Exercises are shared as ordinary Scratch project files that users open, complete, and hand back. The tool has been used in courses on quantum computing and quantum design automation at the Technical University of Munich, where a set of guided exercises takes students from their first circuit to verification, resource estimation, and compilation in about 45 minutes. An evaluation with computer science students indicates that this approach lowers the entry barrier to quantum design automation concepts.
Would you like to use it in your own course? The exercises are freely available in the documentation, and we are happy to help; feel free to get in touch.
The documentation walks you through a quickstart, describes every block in detail, and explains the quantum design automation tasks the extension covers.
If you use Scratch for Quantum Computing in your teaching or research, please cite:
Scratch is a project of the Scratch Foundation, in collaboration with the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at scratch.mit.edu.