# Does QRNG generates True Random numbers?

I read an article that claims, QRNG can produce a true random number. So I wonder, how could they prove that this is a true random numbers generator? In fact, imagine I look at my memory state and took a bit of that and claims that I generate a true random number. If we want to prove this, we need a perfect theoretical model of the generator. But as far as I know, our knowledge of quantom behavior is not that perfect. I want to know, as a student, is my intuation correct?

• Hi and welcome to Quantum Computing SE. Any physical process governed by a probabilistic laws can serve as a true random number generator. Take for example generating of random numbers with thermal noise on a computer bus. Jul 28, 2021 at 20:51
• @MartinVesely What if we simmulate our physical computer and and run this simmulation with a same initial condition. And some how imagine our computer is on a lab room which there is no air inside it. Could not we predict the thermal noise on a specific time with this imaginary methode ? Jul 28, 2021 at 20:58
• I would say that this is true and useful for things that never need to be deciphered again. There you can use randomness without end. However, if you want to decrypt this data again, you have to follow a pattern. Making something very difficult but not too difficult to be solved is a real problem and challenge of encryption. I like this approach and as you can see, there are many of them with such open questions. Jul 28, 2021 at 21:07
• @OmidYaghoubi: It does not matter if there is an air or not, there still be a thermal noise. Of course we can predict the noise since we have a model of it. But in this case we generate pseudorandom numbers, i.e. those based on an algorithm. However, measuring the noise directly, we get true random numbers as we cannot reach the same initial conditions, e.g. position of each elementary particle, again. To sum up, our prediction will always have some error. Jul 29, 2021 at 6:20

There is certainly a very valid concern in your question. Yes, there are physical processes which, assuming quantum mechanics to be true, give us perfect randomness that is completely unpredictable to anyone. It's as simple as a beamsplitter that can perform a 50:50 split of photons into two different directions.

The issue is, if you are buying such a device from a company, and you don't want to dismantle it to check that it's really doing what they claim, how do you know it's not just a pseudo-random number generator (whose outputs might even be known by the company)?

For the really simple devices, there is no such proof. However, there have been studies on device independent randomness expansion. These cannot create randomness out of nothing, but if you have a small seed of true randomness, you can provably expand it into much longer sequences of randomness. The idea is essentially to build in a CHSH test (or similar) that can prove there is no hidden variable theory (read: eavesdropper who can predict outcomes, and that includes the company who made the device) compatible with the outcomes, i.e. that they are truly behaving quantum mechanically, whether or not you know how the device is put together!

"our knowledge of quantom behavior is not that perfect" -- I would disagree.

Sometimes, the fact that quantum behavior "can't be predicted", or some of the claims in popular media ("entanglement is spooky!" / "Mysterious quantum process...!") lead people to think that quantum mechanics isn't well understood. It is! The mathematics has all been perfectly well understood since, gosh, the World War II era.

The things that quantum physicists today continue to work on is the consequences of the math, like, behavior of certain materials, good experimental design, better computer algorithms for crunching the math ... or in some cases, finding new particles or interactions in our universe.

With that said, the physics of QRNGs are very well understood, and they definitely are quantumly random. And what does that mean? Is that genuine randomness?

In 90% of the ways you might define 'genuine randomness', yes, it is. There is one viewpoint (and this is a philosophical matter, not a matter of computer security or physics) where you are entangled with the data, and both outcomes have happened at once. This is the only allowed outcome, and so quantum mechanics is deterministic, and there's nothing random happening; but then the 'random' part comes from, "Which version of you are you? The version of you that got a zero, or the version that got a one?" Physicists prefer this description for some analysis, which is why you might hear that quantum mechanics actually isn't random at all. But it's not very relevant, practically speaking.

So yes, QRNGs are truly random! There are no patterns or predictability or anything! And this is not just a matter of us not understanding physics well enough.

As for DEX7RA's comment that "it would have to be such a small quantum computer", that's not true; there are many random quantum processes that are much much simpler to build than a quantum computer. If you wanted a really simple-to-understand setup, here's one: keep a sample of radioactive iron in a box, with a Geiger counter to detect its radiation. Every second, if your Geiger counter picked something up, that's a "1", otherwise that second was a "0". And then, once a minute, turn on your neutron beam to blast the iron (and its decay products) to keep it radioactive. That way you can keep the cycle going.