ozaner / qRNG

A quantum random number generator using IBM's QISKit.
GNU General Public License v3.0
66 stars 20 forks source link

randomness of qRNG #1

Closed hchsu closed 4 years ago

hchsu commented 5 years ago

Hi, This may not be an issue, but a question regarding the quality of the qRNG? This is an interesting project demonstrating the application of the quantum bits. Have you tested the "randomness" of the qRNG? How is it compared to the random numbers from deterministic processes? Thank you.

ozanerhansha commented 4 years ago

Hey there,

I actually have considered testing the random bits IBM's computers spit out. However, there are 2 main problems with this:

  1. Testing the randomness of an RNG to any useful accuracy requires a lot of random numbers. IBM, however, limits the usage of their quantum computers quite a bit. This is reasonable since the computers are available to the public, but this means that you can't feasibly generate a large amount of these random numbers
  2. Even if we could get a large sample of random bits to examine, popular RNG testing suites and software like:

can actually only prove that an RNG is cryptographically secure, which just means it can safely be used in cryptographic applications. These tests can't prove the true randomness of the numbers (whatever that may mean).

In fact, even in computing cryptographic security, these test may sometimes falter. A common example is the Diehard suite (the predecessor to Dieharder) which turned out to give passing remarks to an RNG called a Linear Feedback Shift Register, which apparently isn't secure at all. This problem was fixed in Dieharder, however.

All this said though, I imagine IBM has statistics on the accuracy and error rates of their machines buried in a paper somewhere. If we combine these with the assumption that the underlying quantum mechanics truly is random, then we can come up with some estimates of the "quality of the RNG".

However the underlying assumption that the randomness of quantum mechanics is what we mean by truly random is more a physical, and possibly even a philosophical, question. That said, I'd imagine the answer to that question is yes.