True Randomness: Pulling Random Numbers from a Quantum Vacuum
Project Overview
Your computer's "random" numbers aren't really random , they're generated by a mathematical formula (a pseudo-random algorithm), which means if you know the formula and starting point, you can predict every number. True randomness in nature only comes from quantum processes. In this project, you'll build a small web page that pulls real random numbers generated by a physical quantum phenomenon (vacuum fluctuations, measured by a lab in Australia) and compares them to your computer's fake randomness , live, in the browser.
Materials Required:
1.A computer with internet access
2.A text editor (VS Code, or even Notepad)
3.A web browser
4.No installs, accounts, or paid tools needed
Instructions:
-Create a new file called quantum-random.html and open it in a text editor.
-Add this basic page structure with a button and two result areas: Html
-Create script.js in the same folder and add a function that calls the free ANU Quantum Random Numbers API , a public API that generates numbers from measuring quantum vacuum fluctuations in a real lab: Javascript
-Open quantum-random.html in your browser (just double-click the file) and click "Generate Numbers." You'll see two sets of 5 numbers side by side.
-Click the button several times. Both sets look equally random to the eye , but only one set traces back to an unpredictable physical process. The classical set was produced by a formula (a "seed" plus math), meaning it's technically predictable if you knew the seed.
-(Optional stretch step) Run a simple test: generate 100 quantum numbers and 100 classical numbers, then check how many are even vs. odd in each set using a quick script. Both should be roughly 50/50 — proving that "looking random" and "being truly random" aren't the same test; only physics can guarantee the latter.
Congratulations — you just built a tool that taps into real quantum hardware, the same core idea used in quantum cryptography to generate unbreakable encryption keys.
Fun Fact:
True quantum random number generators like this one are already used in real-world security systems — including some casinos' shuffling algorithms and cryptographic key generation — because unlike computer-generated randomness, quantum randomness is provably unpredictable, even in principle, not just difficult to predict.