♪

QUBIT DEFENSE

♪

How to Play

Welcome to Qubit Defense!

A tower defense game where you use quantum mechanics to defeat enemies!

The Goal

Enemies travel along a path toward your defenses. Your job is to kill them before they escape!

What's Different?

Unlike traditional tower defense games, enemies here exist in a special quantum state called superposition. They're neither fully alive nor fully dead until you measure them!

How to Play

  • Left-click on the path to place a quantum tower.
  • Right-click on a tower to remove it.
  • Press START WAVE to begin each wave.

Quantum Basics

What is a Qubit?

A qubit (quantum bit) is like a regular computer bit, but with a twist! While a regular bit can only be 0 or 1, a qubit can be both at the same time.

Think of it like a spinning coin: While it's spinning, you can't say whether it's heads or tails. In a sense, it is both at once. When you catch it, it "collapses" to one or the other.

Superposition

We write a qubit's state as:

|ψ⟩ = α|0⟩ + β|1⟩

This is called superposition. The values α (alpha) and β (beta) tell us how "much" of |0⟩ and |1⟩ the qubit has.

In our game:

  • |0⟩ = Enemy survives (full health)
  • |1⟩ = Enemy dies

Probability

The chance of measuring |1⟩ (killing the enemy) is |β|² — the squared size of β. If β is 0.7 (70%), there's a 49% chance to kill!

The Bloch Sphere

Visualizing a Qubit

We can picture a qubit as a point on a sphere called the Bloch sphere. Every possible qubit state is a point on this sphere!

The Poles

|0⟩ North Pole = 100% chance of survival
|1⟩ South Pole = 100% chance of death

Quantum Gates = Rotations

When you place a tower, you're applying a quantum gate—which rotates the enemy's state on the sphere:

  • Rx gates — Rotate around X-axis
  • Ry gates — Rotate around Y-axis
  • Rz gates — Rotate around Z-axis
  • Hadamard (H) — Creates superposition!

Measurement = Collapse!

When you measure an enemy, their quantum state collapses to one of the poles. That's when we find out if they live or die!

Towers & Strategy

Types of Towers

Rotation Towers (Gate Towers)

These rotate the enemy's state on the Bloch sphere:

H Hadamard — Rotates along multiple axes at once. Has the special property of being its own inverse.
X20 Rx(20°) — Small X rotation
Y20 Ry(20°) — Small Y rotation
Z20 Rz(20°) — Small Z rotation
...and larger rotations (45°, 90°)
Measurement Towers

These collapse the enemy's state, deciding their fate:

Ψ Z-Measure |0⟩ = survive, |1⟩ = die
+ X-Measure resets to |+⟩ or |-⟩
Y Y-Measure resets to |↗⟩ or |↙⟩

Strategy Tips

  • Build rotation towers first to move enemies toward the |1⟩ state (south pole)
  • Place measurement towers at the end of the path for the final kill attempt

Now you're ready to defend the quantum realm!

♪

QUBIT DEFENSE

100
Credits
1
Wave
10
Lives
0
Kills

TOWERS

GAME SPEED

TOGGLE OVERLAY

QUANTUM STATE

Hover enemy for state

LOG

CONFIRM

Are you sure?