Kirogotchi: Schrödinger's Kiro

A small Kiro pet to help you get familiar with quantum concepts.

Play it: https://kirogotchi-13-51-169-92.sslip.io · Video: [video URL] · Code: https://github.com/Nahuel990/kirogotchi

Inspiration

The 90s pocket pet asked one question: is it still alive? Quantum mechanics has a famous answer: both, until you check. Kirogotchi joins the two. The pet is the Kiro ghost. Its life is a qubit. Schrödinger's cat is alive and dead until someone looks. Kiro is a ghost: alive and dead at once. That is why it is Schrödinger's Kiro.

What it does

You hatch a ghost and name it. It is born exactly half alive and half gone. On screen it appears as two faint copies, one floating and one sinking. Their brightness is the only hint to the odds.

Every action is a real quantum operation, and the game names it:

You do The qubit gets
Hatch X then H (Hadamard): an equal superposition
Nothing It keeps turning on its own: an Ry from a seeded random walk, with a new speed and direction every 3 seconds
Feed Ry(−π/4), a fixed gate
Play Ry(−π/6), a smaller fixed gate
Candle An Ry of random size, drawn once on the server and stored. It is the game's picture of decoherence
Bind with a friend CNOT at the look: both alive or both gone
Look One shot. The ghost collapses

A gate is the same turn wherever the ghost is, so the same press can raise the odds at one moment and lower them the next. Four Feeds on a fully alive ghost turn it all the way to gone. Overfeeding kills.

Look is the only thing that measures. Reading the care record never runs a circuit. Found alive, the ghost is exactly |1⟩ again and keeps turning. Gone is final. The goal is to survive as many Looks as you can.

After each Look, "Show me what happened" shows the real Braket circuit with a plain label under every box, and the bitstring it returned.

How we built it

  • Back end: Python 3.12, FastAPI and SQLite. One table holds the ghosts. An owner secret travels only in a request header.
  • Quantum: the Amazon Braket SDK, on its local density-matrix simulator. With shots=0 it gives the exact probability before the look, and with shots=1 it runs the look itself. The code can send looks to a real QPU through BRAKET_DEVICE_ARN, but the deployed game has not run on quantum hardware.
  • The ghost's turning: a seeded random walk. The same function exists in Python and in the page's JavaScript, so the hint on screen matches the odds the server will use. A test runs the page's JavaScript and checks that it gives the same angle as the server.
  • Front end: plain HTML, CSS and JavaScript. There is no framework and no bundler. The two-copy superposition, the collapse, the tombstone and the burning ghost are CSS and SVG. It works on desktop and on phones, where the ghost and the candle drag by touch.

How Kiro was used

  • Spec first. .kiro/specs/kirogotchi/ holds the requirements in EARS style, the design and the task list. The build followed the task list.
  • Steering as rules: .kiro/steering/ holds the rules every change had to follow.
    • Only /look may run a circuit.
    • Every mechanic must map to a real gate or channel, and the UI must say which.
    • The copy may never claim more than the simulation does.
    • The spin code in Python and JavaScript must stay identical.
    • No default QPU ARN, because QPU runs cost money.
  • Hooks:
    • test-on-save reruns the tests on any change under app/ and keeps the hand-derived probability in step with the circuit.
    • spec-sync checks the quantum claims in the page against the model whenever the page copy changes.
  • The spec moved with the game. The first design had hunger over hours and a depolarizing channel for neglect. Play replaced that with constant turning. The spec, the tests and the code were then cut back together, so the repository describes only what the game does.

Challenges we ran into

  • Honesty. A pet lives for days, and a real qubit would not survive that. Kirogotchi does not pretend otherwise. The qubit is prepared fresh from the record on each look, on a simulator, and only the single-shot measurement is drawn. The README and the page both say so.
  • One angle, two machines. The page and the server must agree on the ghost's position to the second, or the hint lies. The fix was a shared seeded function and a test that runs both.
  • Labelling a real circuit. Braket's text diagram had to stay exactly as Braket prints it, with words placed under each box for people who are not physicists.

Accomplishments that we're proud of

  • No fake quantum. Every mechanic is a gate or a channel, and the page names it.
  • Entanglement a player can feel. Two friends bind their ghosts, and the first to look decides both.
  • A plain-language layer: "What is quantum?" explains qubit, superposition, gate, measurement, decoherence and entanglement in a few lines each.

What we learned

Measurement makes a good game mechanic. The tension of a single irreversible look is the same tension the physics has.

What's next for Kirogotchi: Schrödinger's Kiro

Running the Look on a real quantum computer. The code already supports it; the hosted game runs on a simulator.

The Kiro ghost is a trademark of Amazon Web Services, used under the Kiroween 2026 Official Rules.

Built With

Share this project:

Updates

Submission history