**Quantum Breakout** - a quantum twist on Atari's classic Breakout. Your paddle is a **quantum state**: build a small quantum circuit to control where it can be, then break the bricks.

You don't move the paddle directly - you program **3 qubits**. The paddle spreads across up to 8 positions, brighter where it's more likely to be. When the ball arrives, the state is **measured** and the paddle **collapses** to one spot. Build superpositions, phases and entanglement to steer it where the ball is going.

**Learn by playing** - no textbook needed. Each level teaches one quantum idea on a quick board, then lets you practise it:

1. Qubits & the X gate (bit flip)

2. Superposition (Hadamard)

3. Measurement & collapse

4. Phase & interference (Z, S, T)

5. Entanglement (controlled-X)

# Controls

- **Arrow keys** - move the circuit cursor

- **X / Y / Z / H** - place that gate

- **S / T** - phase gates

- **C**, then **R / F** - make a gate controlled (e.g. CX), control above / below

- **Q / E** - rotate (RX/RY/RZ) by ∓ π⁄8

- **Backspace / Delete** - remove a gate / clear the circuit

- **Space** - continue / start a level

*(Click the game once to start - browsers need a click before audio.)*

Built with Pygame on the open-source **qcge** engine (`pip install qcge`): real Qiskit on the desktop, a dependency-free pure-Python simulator here in the browser - same game, both places. Great for school students and CS freshmen meeting qubits and quantum gates for the first time.

🎮 Source: https://github.com/ashmitjsg/Quantum-Breakout

⚙️ Engine: https://github.com/ashmitjsg/Quantum-Circuit-Game-Engine

---

# The story

I first built Quantum Breakout in 2023 for **Team Abraxas at Fest Nimbus**, the annual tech fest of **NIT Hamirpur** - a small pygame experiment to make qubits feel tangible. It started life as a fork of the quantum-circuit grid from **QPong** by Junye Huang (Qiskit's *12 Days of Qiskit*), which is what first made superposition and measurement *click* for me.

For this version I pulled that circuit engine out into a standalone, open-source package - **qcge** (Quantum Circuit Game Engine, now on PyPI) - and rebuilt the whole game on top of it: in-game levels that teach one quantum idea at a time, real Qiskit on the desktop, a dependency-free pure-Python simulator in the browser, and a one-click web build so anyone can play without installing anything. The goal is simple - pass on that "learn by playing" feeling to the next person picking up quantum computing.

Development log