The Quantum Integrity of Randomness
🌟 Inspiration
The core inspiration for this project stemmed from the realization that standard systems—from online lotteries to secure key generators—rely on Pseudo-Random Number Generators (PRNGs). While mathematically complex, PRNGs are fundamentally deterministic. This leads to a critical question: Can anything truly be fair if its outcome is theoretically predictable?
We were motivated to expose this deterministic flaw in classical computing and present Quantum Random Number Generation (QRNG) as the necessary path toward absolute, verifiable fairness and security.
🛠️ What it does
The Quantum Integrity of Randomness is a comparative simulator that visually proves the fundamental difference between classical and quantum randomness.
- Exposes the Flaw: We demonstrate $100\%$ prediction success against a classical PRNG by knowing its seed. This proves the system is theoretically hackable.
- Presents the Solution: We use Qiskit to construct a QRNG and show that its results are physically unpredictable and non-deterministic, making it immune to the classical prediction flaw.
- Visualizes Fairness: The project highlights the source of true fairness in the Hadamard Gate's ability to create a perfect $50:50$ superposition.
🏗️ How we built it
- Backend Logic (Python/Qiskit): The entire proof logic was consolidated into a single Jupyter Notebook.
- PRNG Prediction: We used Python's
random.seed(SECRET\_SEED)to generate a sequence of predicted numbers and then reset the seed to generate the 'actual' sequence, proving they match. - QRNG Fairness: We used Qiskit to build a 3-qubit circuit applying the Hadamard Gate (
H) to all qubits. The circuit was executed on theAerSimulatorto produce a truly random, non-deterministic number (1-8).
- PRNG Prediction: We used Python's
- Visualization: The results were printed clearly, contrasting the matching PRNG lists with the ever-changing QRNG list (which yields a different result every time the notebook is run).
🤯 Challenges we ran into
Our primary challenge was managing the project's scope versus the very tight deadline.
- API Complexity: Our initial plan was to build a full web application with live API calls (using Flask/ngrok) and a dynamic CSS visualization. We quickly realized that integrating the Qiskit execution into a fast, stateless web environment was too time-consuming for the hackathon's deadline.
- Focusing the Proof: We decided to pivot and focus all effort on the core theoretical proof. We streamlined the submission to a Jupyter Notebook, ensuring the technical output and data comparison were flawless and unencumbered by web development complexities.
✅ Accomplishments that we're proud of
We are most proud of:
- Theoretical Clarity: Successfully translating the highly complex, abstract concept of deterministic vs. non-deterministic randomness into a clear, verifiable output format.
- Effective Tool Use: Demonstrating the power of the Hadamard Gate as a tool for security and fairness, not just a theoretical concept.
- Achieving Completeness: Despite the scope reduction, we delivered a fully functional, well-documented, and technically sound demonstration that directly addresses the prompt.
🧠 What we learned
We gained a profound appreciation for the distinction between classical and quantum mechanics:
- We learned that predictability in PRNGs is not a bug, but a feature of determinism.
- We learned that true randomness requires tapping into the physical non-determinism of quantum state collapse.
- Technically, we mastered using Qiskit's
AerSimulatorto model real quantum phenomena, proving its utility as a core development tool.
✨ What's next for The Quantum Integrity of Randomness
- Full Web App Implementation: Building the planned web frontend to integrate the PRNG/QRNG logic via a proper Flask/FastAPI backend, allowing for more dramatic CSS/JS visualization.
- Real QPU Verification: Submitting the Hadamard QRNG circuit to the actual IBM Quantum Processing Unit (QPU) to verify that the unpredictable results hold true on real hardware, further strengthening the proof of absolute integrity.
Built With
- jupyternotebook
- python
- qiskit
Log in or sign up for Devpost to join the conversation.