QuantaVania is a 2D action-adventure platformer where the quantum circuit is your weapon. Don't just collect power-ups - build real quantum circuits to fight through each level.

โš›๏ธ Play with real quantum

Every level hands you a live circuit grid. Drop gates - X, H, Z, CNOT and more - onto your qubits to put your shots into superposition and entanglement. The state you build is the attack you fire. It's powered by a real quantum backend (Qiskit on desktop), so what you learn here is the real thing, not a metaphor.

๐Ÿ—บ๏ธ Explore the quantum world

- Cross a scrolling overworld and unlock story levels one by one.

- Dodge crab monsters and turrets, collect coins, ride the terrain.

- Take on the QUBO / TSP challenge - solve a real optimisation problem with quantum annealing (D-Wave on desktop, a pure-Python annealer in the browser).

๐Ÿ› ๏ธ Build & share

Use the in-game level editor to design your own levels - paint terrain, place coins, enemies, and quantum tiles - then play and share them.

๐ŸŽฎ Controls

Overworld (level map)

- โ† / โ†’ - move between level nodes

- Space / Enter - enter the selected level

- Q - open the QUBO / TSP challenge

- B - open the level builder

- Esc - back

In a level - move your hero

- โ† / โ†’ - run, Space - jump

- Reach the right end of the level to win; falling off or losing all health sends you back.

In a level - build your circuit (WASD grid)

Each level gives you a live quantum circuit (more qubits as you progress). You move a cursor over the grid and drop gates onto the wires.

Key Action 
W,A,S,Dmove the circuit cursor (up / left / down / right)
Xplace an X (NOT) gate
Yplace a Y gate
Zplace a Z gate
Hplace a Hadamard (H) gate โ†’ superposition
Tplace a T gate
Cadd a control to the gate under the cursor (turns Xโ†’CNOT, etc.) โ†’ entanglement
R / Fmove that control wire up / down
Q / Erotate the gate's phase (โˆ’ / +)
Backspacedelete the gate under the cursor
Deleteclear the whole circuit
In a level - measure, set state, shoot

- Left-click or M - measure the circuit and lock the result in as your hero's quantum state.

- Right-click or N - shoot a qubit bullet carrying a freshly measured state (costs 1 qubit-bullet).

- Esc - back to the overworld.

โš”๏ธ How combat works (the quantum bit)

Every enemy carries its own quantum state. Your shot (or a stomp from above) only damages an enemy when your measured state is orthogonal to its state - i.e. their bit-string dot product is 0. If it's non-zero, you heal the enemy instead. So you're not mashing fire: you read the enemy, then build a circuit whose measurement comes out orthogonal to it.

- Use H to put a wire in superposition, C to entangle wires, and X/Y/Z to flip and phase, then measure to collapse to a basis state.

- Qubit-bullets are ammo - top them up with coins: ๐Ÿฅˆ silver +2, ๐Ÿฅ‡ gold +5, ๐Ÿ’Ž diamond +10.

- Watch your health and shield bars; spikes, crab monsters, and turret shots all hurt.

๐Ÿ’ก Why it exists

QuantaVania teaches quantum computing from the ground up by playing - gates, superposition, entanglement, and optimisation become game mechanics, not textbook chapters. Built as an open, community-driven project with room to grow into an open-world sandbox: design levels, share them, and mine qubits, gates, and power-ups.

First load takes a few seconds - the browser is fetching the Python/WASM runtime. Best on desktop Chrome/Firefox. ๐ŸŽง with sound.

โญ Open source: https://github.com/ashmitjsg/QuantaVania