EntropyLoop

A fully open-source, low-cost phase-diffusion Quantum Random Number Generator (QRNG) built from off-the-shelf parts.

EntropyLoop harvests genuine randomness from quantum fluctuations rather than from a deterministic algorithm. Built around a Raspberry Pi Pico and standard fiber-optic components, the whole thing fits in a credit-card-sized package and costs around $35 to build - making true quantum randomness accessible to hackers, students, and researchers alike.

Cost~$35
Source of randomnessQuantum phase diffusion
BrainsRaspberry Pi Pico
LicenseFully open source
View on GitHub →

How it works

EntropyLoop uses a technique called phase diffusion. When a laser diode is pulsed on from below its lasing threshold, it starts up with a phase and polarization that are determined by quantum vacuum fluctuations - fundamentally random and unpredictable.

These quantum-random pulses are fed through a fiber-optic network containing a roughly 5-metre delay line, so that pulses interfere with one another. The result is a chaotic, fundamentally random interference pattern that a photodetector reads out as a fluctuating analog signal - the raw entropy source for the generator.

Hardware

EntropyLoop is deliberately built from inexpensive, off-the-shelf components:

  • Raspberry Pi Pico microcontroller
  • Fiber-optic transceivers and splitters
  • SC/APC fiber connectors and patch cables (including the delay line)
  • Standard electronics - resistors, capacitors, and a prototyping board

Software

The Pico firmware makes use of both of the chip's cores:

  • Core 0 performs high-rate ADC sampling of the detector signal.
  • Core 1 estimates the min-entropy of the sampled data and produces SHA-512 hashes, streamed out over UART.

Both C and MicroPython implementations are provided, and the project has recently been extended with AI-native Model Context Protocol (MCP) integration so that agents can request fresh quantum randomness directly.

Randomness quality

Raw entropy is only useful if it stands up to scrutiny. EntropyLoop's output passes rigorous statistical testing - including the NIST Statistical Test Suite (STS) and ENT - producing random data suitable for use in AI training, simulation work, and cryptography.

Build it yourself

EntropyLoop is fully open source: schematics, bill of materials, firmware, and step-by-step build instructions are all on GitHub. Whether you want quantum randomness on your bench or just want to learn how a QRNG works, you can build your own.

Get the build on GitHub →

Questions or want to collaborate? Get in touch!