Randomness is a scarce and precious resource: cryptography, scientific simulation, gambling regulation, and even foundational physics all depend on being able to produce numbers that no one — not even the generator itself — could have predicted in advance. Classical computers cannot create such numbers on their own, because they are deterministic machines; every pseudorandom number generator (PRNG) is, in principle, a fixed algorithm whose entire output is fixed the moment a seed is chosen. Quantum random number generators (QRNGs) promise something categorically different: unpredictability guaranteed by the indeterminism of quantum measurement itself. This paper examines whether “true” randomness is achievable at all, surveys the physical arguments (rooted in Bell's theorem) that quantum measurement outcomes are not merely unknown but undetermined, and then asks a narrower, more computational question: can a machine-learning model tell the difference between the output of a well-designed PRNG and genuine entropy? We built and tested a small experimental pipeline comparing a deliberately flawed linear-congruential generator, a mildly weak variant, two industry-standard PRNGs (Mersenne Twister and PCG64), and operating-system entropy (as an accessible proxy for physically-sourced randomness). Gradient-boosted and logistic-regression classifiers detected the flawed generator with 100% accuracy but could not beat chance (49–51%) against modern PRNGs, mirroring published results in the cryptographic and quantum-optics literature. We conclude that while true randomness is very plausibly achievable through quantum processes certified by Bell-inequality violation, no black-box statistical or machine-learning test — however sophisticated — can, on principle, certify the difference between a good PRNG and true randomness from output alone; the distinction is one of provenance and physical mechanism, not detectable pattern.
Randomness is a scarce and precious resource: cryptography, scientific simulation, gambling regulation, and even foundational physics all depend on being able to produce numbers that no one — not even the generator itself — could have predicted in advance. Classical computers cannot create such numbers on their own, because they are deterministic machines; every pseudorandom number generator (PRNG) is, in principle, a fixed algorithm whose entire output is fixed the moment a seed is chosen. Quantum random number generators (QRNGs) promise something categorically different: unpredictability guaranteed by the indeterminism of quantum measurement itself. This paper examines whether “true” randomness is achievable at all, surveys the physical arguments (rooted in Bell's theorem) that quantum measurement outcomes are not merely unknown but undetermined, and then asks a narrower, more computational question: can a machine-learning model tell the difference between the output of a well-designed PRNG and genuine entropy? We built and tested a small experimental pipeline comparing a deliberately flawed linear-congruential generator, a mildly weak variant, two industry-standard PRNGs (Mersenne Twister and PCG64), and operating-system entropy (as an accessible proxy for physically-sourced randomness). Gradient-boosted and logistic-regression classifiers detected the flawed generator with 100% accuracy but could not beat chance (49–51%) against modern PRNGs, mirroring published results in the cryptographic and quantum-optics literature. We conclude that while true randomness is very plausibly achievable through quantum processes certified by Bell-inequality violation, no black-box statistical or machine-learning test — however sophisticated — can, on principle, certify the difference between a good PRNG and true randomness from output alone; the distinction is one of provenance and physical mechanism, not detectable pattern.
The vital characteristic of randomness is unpredictability. Thus any regularity will compromise the application of random numbers. Quantum random number generators (QRNGs) can provide intrinsic unpredictable randomness based on the nature of quantum physics, while pseudo-random number generator can not due to the origination of deterministic algorithms or physical processes. However, commonly used traditional test suits are rigorously to test the statistical properties, and the unpredictability of random numbers is still difficult to test. To verify which sources of random numbers are truly unpredictable, in this paper, we propose a new randomness testing method with the artificial neural network (ANN). Random number sequences generated by four different kinds of sources are tested, which are the natural number λ, the linear congruence generator (LCG) pseudo-random algorithm, the Mersenne Twister (MT) pseudorandom algorithm and the QRNG based on vacuum noise, respectively. The testing results indicate that the random sequences from natural number λ and LCG fail to pass our randomness test, while the other two kinds of sequences pass the test successfully due to the relatively simple structure of our ANN. As the complexity of the ANN and the amount of computing power involved increasing, this test method has potential to predict the MT random numbers, and it is also expected that the quantum random numbers can not pass the test with unpredictability no matter how complex the ANN is.
Abstract The advantages of quantum random number generators (QRNGs) over pseudo-random number generators (PRNGs) are normally attributed to the nature of quantum measurements. This is often seen as implying the superiority of the sequences of bits themselves generated by QRNGs, despite the absence of empirical tests supporting this. Nonetheless, one may expect sequences of bits generated by QRNGs to have properties that pseudo-random sequences do not; indeed, pseudo-random sequences are necessarily computable, a highly nontypical property of sequences. In this paper, we discuss the differences between QRNGs and PRNGs and the challenges involved in certifying the quality of QRNGs theoretically and testing their output experimentally. While QRNGs are often tested with standard suites of statistical tests, such tests are designed for PRNGs and only verify statistical properties of a QRNG, but are insensitive to many supposed advantages of QRNGs. We discuss the ability to test the incomputability and algorithmic complexity of QRNGs. While such properties cannot be directly verified with certainty, we show how one can construct indirect tests that may provide evidence for the incomputability of QRNGs. We use these tests to compare various PRNGs to a QRNG, based on superconducting transmon qutrits and certified by the Kochen–Specker theorem, to see whether such evidence can be found in practice. While our tests fail to observe a strong advantage of the quantum random sequences due to algorithmic properties, the results are nonetheless informative: some of the test results are ambiguous and require further study, while others highlight difficulties that can guide the development of future tests of algorithmic randomness and incomputability.
Random numbers are used to generate cryptographic keys, to run Monte Carlo simulations, and to train and sample machine learning models. Most software obtains them from deterministic pseudo-random number generators, which have good statistical properties but are predictable once their internal state is known. Quantum random number generators take their output from measurements on quantum systems, whose outcomes are not fixed by any prior state of the device. This article introduces the types of random number generators, reviews studies that compare quantum and pseudo-random numbers in numerical experiments, and lists the sources of randomness available in current computing systems. It then describes applications of quantum randomness in security, hashing, software, artificial intelligence, and public randomness. The quality of encryption is treated as depending on three factors: the algorithm, its implementation, and the randomness of keys and other security-relevant values. We give arguments for which applications benefit from quantum randomness, name further areas in which it could be tested, and outline next steps.
Even if the output of a Random Number Generator (RNG) is perfectly uniformly distributed, it may be correlated to pre-existing information and therefore be predictable. Statistical tests are thus not sufficient to guarantee that an RNG is usable for applications, e.g., in cryptography or gambling, where unpredictability is important. To enable such applications a stronger notion of randomness, termed "true randomness", is required, which includes independence from prior information. Quantum systems are particularly suitable for true randomness generation, as their unpredictability can be proved based on physical principles. Practical implementations of Quantum RNGs (QRNGs) are however always subject to noise, i.e., influences which are not fully controlled. This reduces the quality of the raw randomness generated by the device, making it necessary to post-process it. Here we provide a framework to analyse realistic QRNGs and to determine the post-processing that is necessary to turn their raw output into true randomness.
Random prime number generation is crucial for the implementation of several encryption and signature protocols in cryptographic applications. Recently, Quantum Random Number Generators (QRNGs) have emerged as a solution to obtain information-theoretically secure randomness, setting them apart from algorithmic generators. Nonetheless, their output is still prone to deterioration under a flawed implementation and thus requires continuous statistical validation. This process is uniquely challenging for prime number generators since they cannot be submitted to the traditional testing suites, which are primarily designed to test uniform pseudorandom sources. Here, we enable direct statistical testing of prime Random Number Generators (RNGs) by extending a validation framework based on an equiprobable binning of the prime distribution with a predictive machine learning model, which can independently learn correlations in the prime output. The validity of this framework is then verified through extensive cryptanalysis of a prime QRNG based on quadrature measurements of the vacuum state. The developed model successfully identifies flawed configurations of the prime QRNG for output lengths up to 128 bits. This assessment was additionally extended to a purely classical scheme derived from electronic noise measurements. Although no increase in the model’s predictive capacity is seen, our testing framework can nonetheless demonstrate that this classical source produces a conclusively biased prime distribution. In turn, the implemented QRNG remains resilient against this type of cryptanalysis.
The random number generator (RNG) plays an essential role in lots of applications such as cryptographic. Unlike classical random number generators, quantum random number generators (QRNG) can in principle generate true random numbers because it is based on the inherent uncertainty of the quantum property. However, the presence of the environmental noise or the imperfect characteristics of the device can compromise the integrity of QRNG. To judge the quality of QRNG, we propose to apply the transformer based machine learning (ML) model to quantify the randomness of quantum random numbers. Through proper training, our transformer based ML model is able to predict randomness of given quantum random number sequence very closely to the maximum guess probability of its theoretical limit. Moreover, we also do comparisons between our present transformer based model with other ML model, such as the long short term memory network (LSTM) based model. Simulation results show that our present model can not only present a higher prediction accuracy, but also cost much less time and exhibit excellent performance in work efficiency. Furthermore, we also compare our present transformer based machine learning model with the traditional randomness detection standard, NIST-test-suite, and show advantages of our method.