Skip to content

Why Quantum?

Quantum Forge is not a random number generator. It's a quantum simulator that gives your game objects real quantum behavior: superposition, measurement collapse, entanglement, and interference.

Emergent Gameplay from Physics

Classical physics engines work because you don't script every collision. You set up the rules, and interesting behavior falls out. Quantum Forge works the same way. When quantum mechanics is the physics engine, gameplay emerges from the rules themselves. Entangled objects stay correlated because that's what entanglement does. Interference shifts probabilities because that's what phase does. Players discover strategies you didn't program, because the mechanics are real and composable. Quantum mechanics is a richer set of rules, and the emergent behavior it produces isn't available classically.

Intuition Through Interaction

We understand classical physics intuitively because we've interacted with it our whole lives. Nobody teaches a child how a ball bounces; they throw one and find out. Quantum mechanics feels confusing because we never get to play with it. Quantum games change that. When entangled objects in your game behave like entangled objects, you build intuition through experience. Building and playing quantum games can develop a generation of thinkers for whom quantum behavior is natural, not abstract.

Why Now

Quantum computing hardware is improving every year, expanding into areas nobody predicted. Games and interactive experiences will be part of that future, but we don't have to wait. Simulation lets us build with quantum mechanics today, developing the design language and patterns now so we're ready when hardware catches up.

Quantum Forge's API is backend-agnostic. The same code works whether the backend is simulation or real quantum hardware. We've already connected our games to actual quantum computers. Start building today, and the same games run on quantum backends as they become practical.

Not Math.random()

Math.random() gives you independent numbers with no memory and no connections. Quantum properties are different:

  • Superposition is stateful. A property holds a probability distribution that evolves as you apply gates. You can read probabilities without collapsing.
  • Measurement is irreversible. Collapse forces a definite value. One-way, dramatic.
  • Entanglement creates correlations. Measuring one property instantly determines another, anywhere in the game world.

Quick Primer

Superposition. A quantum property can be in multiple states at once. A Hadamard gate creates equal superposition (50/50). You can read the probability without collapsing, so you can render a ghost at half opacity.

Measurement. Measuring collapses superposition to one definite value. The outcome is sampled from the probability distribution defined by the quantum state. No more superposition after that.

Entanglement. i_swap links two properties. Entangle a ball at |1⟩ (exists) with one at |0⟩ (doesn't), and you get "A exists, B doesn't" superposed with "B exists, A doesn't." Measuring one collapses the other.

Dimension. The dimension parameter sets basis states per property. Dimension 2 (qubit) covers most cases: exists/doesn't, alive/dead, left/right. Dimension 3 (qutrit) handles three-way states like rock/paper/scissors. Start with 2.

Quick Taste

typescript
import { QuantumPropertyManager, ensureLoaded } from "quantum-forge/quantum";

await ensureLoaded();

class GameRegistry extends QuantumPropertyManager {
  constructor() { super({ dimension: 2 }); }

  spawnQuantumEntity(id: string) {
    const prop = this.acquireProperty();
    const m = this.getModule();
    m.cycle(prop);              // |0⟩ → |1⟩ (exists)
    m.hadamard(prop);           // → equal superposition
    this.setProperty(id, prop);
  }

  observe(id: string): number {
    const prop = this.getProperty(id)!;
    const [value] = this.getModule().measure_properties([prop]); // collapses!
    this.deleteProperty(id);
    this.releaseProperty(prop, value);               // pool for reuse
    return value; // 0 or 1
  }
}

What's Next

Powered by Quantum Forge