Pseudo-random number generators aren't actually random. They're deterministic functions that look random if you don't know the seed.

For most applications, this doesn't matter. For stop-loss placement in a trading system, it might. If enough bots use the same PRNG with similar seeds, their stops cluster at the same prices. Market makers know this. The stops get hunted.

I needed true randomness.

The QPU call

Origin Quantum runs a publicly accessible QPU. I wrote a 60-qubit Hadamard circuit: apply H|0⟩ to every qubit, creating equal superposition, then measure. Quantum measurement is genuinely non-deterministic — not computationally hard to predict, but physically impossible to predict. The result is 1,024 shots × 60 qubits = 61,440 truly random bits per call.

One QPU call costs almost nothing and takes a few minutes. The bits get serialised to a binary pool on disk. The trading system consumes from the front of the pool as needed, advancing a cursor. When the pool drops below a threshold, it logs a warning. Fallback is os.urandom() — which is cryptographic quality, not quantum, but still better than Python's random module.

How it's used

The QRNG pool generates ±0.3% jitter for stop-loss and take-profit placement. Instead of placing a stop at exactly ATR × 1.5 below entry, the system adds a small quantum-random offset. Enough to avoid the obvious clustering levels without materially changing the risk profile.

I also use it for order timing — adding a random delay of a few seconds to entry to reduce predictability.

Does this actually improve returns? Genuinely uncertain. I can't A/B test it at my account size — the position count is too low. What I can say is that the infrastructure cost was a few hours and the pool lasts months. If it helps even slightly, it more than pays for itself.