Are random numbers generated using a quantum integer as its seed considered pseudo-random or truly random?

荒凉一梦 提交于 2021-02-15 07:43:42

问题


I always hear that random numbers produced by quantum computers are considered "truly random" while random numbers generated from a classical computer are considered "pseudo-random".

If one were to generate random numbers using a quantum integer as the seed, would the numbers generated from that seed be considered "pseudo-random" or truly random? Cannot find this clarification anywhere, any explanation welcome.

import random
random.seed(get_my_quantum_number()) #Some quantum integer generated from an API.
random.random() #Is this "pseudo-random" or "truly random" ?

回答1:


random.random() uses a pseudorandom number generator, which uses a deterministic algorithm by definition and mathematically expands its input. Thus, the numbers it generates are pseudorandom, even if it was seeded by the output of a quantum random number generator or some other nondeterministic source. See also these questions:

  • Is Random function (in any programming language) biased?
  • How to get truly random data, not random data fed into a PRNG seed like CSRNG's do?

In any case, the distinction between "pseudorandom" and "truly random" numbers is not what applications care about (and you didn't really specify what kind of application you have in mind). Instead, in general:

  • Security applications care whether the numbers are hard to guess; in this case, only a cryptographic RNG can achieve this requirement (even one that relies on a pseudorandom number generator). A Python example is the secrets module or random.SystemRandom.
  • Scientific simulations care whether the numbers behave like independent uniform random numbers, and often care whether the numbers are reproducible at a later time. A Python example is numpy.random.Generator.

For example, the pseudorandom number generator used by random.random(), Mersenne Twister, is not suitable for cryptography or information security; the numbers it produces are not designed to be hard to guess, and this is the case no matter how that generator was seeded (whether by a quantum random number generator or otherwise).



来源:https://stackoverflow.com/questions/63609099/are-random-numbers-generated-using-a-quantum-integer-as-its-seed-considered-pseu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!