Schrödinger's Cat: Build Your Own Quantum Cat Simulator
Project Overview:
Schrödinger's cat is the most famous quantum thought experiment ever imagined, a cat sealed in a box with a fifty percent chance of survival, existing in a superposition of alive and dead until someone opens the box and looks. It was originally meant as a joke pointing out how strange quantum mechanics sounds when applied to everyday objects, not a real experiment. In this quick and playful project, you will build a tiny program that puts a cat into superposition and lets you open the box yourself, using true quantum randomness so the outcome is not just pretend.
Materials Required:
A computer with internet access
A free Google account, to use Google Colab, no installation needed
Step by Step Instructions
Set up your notebook.
Go to Google Colab at colab.research.google.com and create a new notebook.
Put the cat into superposition and open the box.
Type this into a code cell and run it:
import requests
def open_the_box():
response = requests.get("https://qrng.anu.edu.au/API/jsonI.php?length=1&type=uint8")
data = response.json()
number = data["data"][0]
if number % 2 == 0:
print("You open the box... the cat is ALIVE and mildly annoyed you disturbed it.")
else:
print("You open the box... the cat has quantum tunneled to a sunnier location.")
open_the_box()
Open the box a few times.
Run the function several times in a row and see what happens. Each result comes from a real quantum random number generated by measuring quantum vacuum fluctuations in a physics lab, the same source used in your true randomness project, so this is genuinely a quantum coin flip deciding the cat's fate each time, not a scripted joke.
Stretch step, make it more dramatic.
Add a countdown before revealing the result, and try changing the two possible outcomes to your own funny alternatives.
import time
def open_the_box_dramatic():
print("Approaching the box...")
time.sleep(1)
print("Placing your hand on the lid...")
time.sleep(1)
response = requests.get("https://qrng.anu.edu.au/API/jsonI.php?length=1&type=uint8")
number = response.json()["data"][0]
print("Opening...")
time.sleep(1)
if number % 2 == 0:
print("The cat is alive, and unimpressed by the suspense.")
else:
print("The cat is gone, having apparently found the whole thing beneath it.")
open_the_box_dramatic()
Congratulations, you just built a working, scientifically accurate homage to the most famous cat in physics history, using real quantum randomness rather than a pretend coin flip.
Fun Fact:
Schrödinger never actually intended for anyone to think a cat could really be alive and dead at once, he invented the scenario specifically to mock how absurd quantum mechanics sounds when you apply it to large everyday objects instead of tiny particles, and he was reportedly a little annoyed that his sarcastic joke became the most iconic image associated with quantum physics.