All random number generated by SW are in virtue pseudo-random, because a deterministic machine can’t produce pure random numbers.
In the laboratory of physics https://qrng.anu.edu.au/ , quantum fluctuations of vacuum are ceaselessly measured to supply true random numbers for anyone in the world.
To get true random numbers from Python you need install ‘quantumrandom’ module: pip install quantumrandom
The ‘randint’ method of quantumrandom module connects your machine to QRNG site and retrieves a current random number.
Python script:
import quantumrandom as qr
qgen = qr.cached_generator() # create generator
# access QRNG and get 10 random values in the range [0..1]
for i in range(10):
print(qr.randint(0, 1, qgen))
Answer:
0.5091935606927596
0.6195925841153582
0.43736934462500954
0.5078965438315404
0.5313954375524529
0.2921187151903563
0.06724650949874113
0.1057755397878996
0.7543755245288777
0.8750286106660563
Note: Quantum fluctuations are uniformly distributed and packed to users in the range [0..1]
If we wish to get random numbers Y distributed uniformly in the range [a,b] , then the following transformation must be used:
Y = a + (b-a)*X , where X is uniformly distributed in the range [0..1].
For the exponential distribution
the transformation from uniformly distributed random values (the range [0..1]) to exponentially distributed with the parameter λ:
for details see https://medium.com/@oscarnieves100/how-to-simulate-random-numbers-dad35905ecdb
Note: why scientists assume that quantum fluctuations are random?
23+ years’ programming and theoretical experience in the computer science fields such as video compression, media streaming and artificial intelligence (co-author of several papers and patents).
the author is looking for new job, my resume
Hi videonerd.website owner, Great content!
Hello videonerd.website admin, Your posts are always well-supported by research and data.