← Back to QuantumRand

NIST SP 800-22 Statistical Randomness Results

The NIST SP 800-22 battery run against entropy sampled from real IBM Quantum hardware.

Entropy source: IBM Quantum — ibm_kingston (156-qubit Heron r2 processor), Qiskit Runtime, channel ibm_cloud
Date run: 2026-07-02  ·  Job ID: d93ip2i47v0s738221l0
Instance: crn:v1:bluemix:public:quantum-computing:us-east:a/7d1f564e636d4b7d9d0c77957b2852d3:788a3fc1-...
Sampled: 127 qubits × 800 shots = 101,600 raw measured bits (measured ones fraction 0.4933)
Result, stated plainly: the raw measured bits from the quantum processor carry a small hardware readout bias and do not pass the full battery on their own — which is exactly why real-world QRNGs apply a randomness extractor. After a standard von Neumann extraction, the underlying quantum entropy passes 10 of 11 eligible NIST tests, with only the sample-size-sensitive Random Excursion test marginal at this length. We publish both runs, unedited, rather than only the flattering one.
Randomness conditioning. Raw superconducting-qubit readout has a small, expected bias — the hardware measures slightly more 0s than 1s as qubits relax toward |0⟩. Before QuantumRand serves any hardware-sourced bits, it applies von Neumann extraction — a standard quantum-RNG step that removes that bias by keeping only 01→0 and 10→1 pairs and discarding the rest. The second table below is the same hardware sample after that conditioning.

1. Raw IBM hardware bits

100,000 bits, measured directly off ibm_kingston (no post-processing).
TestResultp-value
Monobit (Frequency)FAIL8.5 × 10⁻⁶
Frequency Within BlockPASS0.0351
Runsn/aineligible (bias > NIST threshold)
Longest Run of OnesPASS0.0637
Binary Matrix RankPASS0.0520
Discrete Fourier TransformFAIL≈ 0
Non-Overlapping TemplateFAIL≈ 0
SerialFAIL≈ 0
Approximate EntropyFAIL≈ 0
Cumulative SumsPASS0.9994
Random ExcursionFAILfailed sub-states
Random Excursion VariantFAIL≈ 0
Overall: does not pass — dominated by a ~0.7% readout bias in the raw measurements.

2. Von Neumann–extracted bits

25,299 bits, after standard von Neumann debiasing of the same hardware sample.
TestResultp-value
Monobit (Frequency)PASS0.0673
Frequency Within BlockPASS0.5636
RunsPASS0.2139
Longest Run of OnesPASS0.7710
Discrete Fourier TransformPASS0.1932
Non-Overlapping TemplatePASS0.9997
SerialPASS0.5287
Approximate EntropyPASS0.1072
Cumulative SumsPASS0.8161
Random ExcursionFAIL0.0670 (marginal)
Random Excursion VariantPASS0.3046
Overall: passes 10 / 11 eligible tests. Random Excursion is length-sensitive and needs more state cycles than 25k bits reliably provides; it typically passes on larger samples.
Why does raw hardware fail? Superconducting qubits relax toward |0⟩ during readout, so a raw measurement stream is slightly biased (here, 49.33% ones). NIST's frequency-based tests detect exactly that bias. This is a property of the measurement device, not evidence that the quantum source lacks entropy — and it is the reason every serious quantum RNG applies a randomness extractor (von Neumann, Toeplitz hashing, or SHA-based conditioning) before the bits are used. QuantumRand applies von Neumann extraction to hardware-sourced bits for exactly this reason, so the bias shown in the raw table above is removed before those bits are ever served. Methodology is reproducible from the job ID above.

What These Tests Mean

The NIST SP 800-22 battery is a standard set of statistical tests that check whether a stream of bits looks genuinely random — with no detectable patterns a computer could exploit. Each test targets a different way randomness can fail. A test “passes” when its p-value is at or above 0.01.

Monobit (Frequency) — Are there roughly as many 1s as 0s? A biased source fails here (as the raw run did).

Frequency Within Block / Longest Run — Is that balance and streak behaviour held within smaller chunks?

Runs — Do streaks of identical bits occur as often as true randomness predicts?

DFT / Serial / Approximate Entropy / Templates — Are there hidden periodicities or repeated patterns?

Cumulative Sums / Random Excursions — Treating the bits as a random walk, does the path behave like an unbiased one?

We publish the raw and extracted results together so you can judge the source for yourself, rather than take our word for it.