The generation of good random numbers impacts basic research and applications beyond pure academic interests: random numbers are required for countless applications, such as cryptography and simulations. For most applications, it is of outmost importance to know if a set of numbers is truly random, pseudo-random or contains some residual correlations. Tensor networks are powerful data structures that spring from quantum many-body physics and are now increasingly applied to machine learning applications. This thesis plans to explore the intersection between these two fields, applying quantum-inspired machine learning to random number generation. We aim to perform and characterise novel statistical checks comparing and characterising the statistical quality of different number sets: correlated, pseudo-random, and quantum-random.
The generation of good random numbers impacts basic research and applications beyond pure academic interests: random numbers are required for countless applications, such as cryptography and simulations. For most applications, it is of outmost importance to know if a set of numbers is truly random, pseudo-random or contains some residual correlations. Tensor networks are powerful data structures that spring from quantum many-body physics and are now increasingly applied to machine learning applications. This thesis plans to explore the intersection between these two fields, applying quantum-inspired machine learning to random number generation. We aim to perform and characterise novel statistical checks comparing and characterising the statistical quality of different number sets: correlated, pseudo-random, and quantum-random.
Statistical random number testing is a well studied field focusing on pseudo-random number generators, that is to say algorithms that produce random-looking sequences of numbers. These generators tend to have certain kinds of flaws, which have been exploited through rigorous testing. Such testing has led to advancements, and today pseudo random number generators are both very high-speed and produce seemingly random numbers. Recent advancements in quantum physics have opened up new doors, where products called quantum random number generators that produce acclaimed true randomness have emerged. Of course, scientists want to test such randomness, and turn to the old tests used for pseudo random number generators to do this. The main question this thesis seeks to answer is if publicly available such tests are good enough to evaluate a quantum random number generator. We also seek to compare sequences from such generators with those produced by state of the art pseudo random number generators, in an attempt to compare their quality. Another potential problem with quantum random number generators is the possibility of them breaking without the user knowing. Such a breakdown could have dire consequences. For example, if such a generator were to control the output of a slot machine, an malfunction could cause the machine to generate double earnings for a player compared to what was planned. Thus, we look at the possibilities to implement live tests to quantum random number generators, and propose such tests. Our study has covered six commonly available tools for random number testing, and we show that in particular one of these stands out in that it has a series of tests that fail our quantum random number generator as not random enough, despite passing an pseudo random number generator. This implies that the quantum random number generator behave differently from the pseudo random number ones, and that we need to think carefully about how we test, what we expect from an random sequence and what we want to use it for.
Random number generators (RNGs) that are crucial for cryptographic applications have been the subject of adversarial attacks. These attacks exploit environmental information to predict generated random numbers that are supposed to be truly random and unpredictable. Though quantum random number generators (QRNGs) are based on the intrinsic indeterministic nature of quantum properties, the presence of classical noise in the measurement process compromises the integrity of a QRNG. In this paper, we develop a predictive machine learning (ML) analysis to investigate the impact of deterministic classical noise in different stages of an optical continuous variable QRNG. Our ML model successfully detects inherent correlations when the deterministic noise sources are prominent. After appropriate filtering and randomness extraction processes are introduced, our QRNG system, in turn, demonstrates its robustness against ML. We further demonstrate the robustness of our ML approach by applying it to uniformly distributed random numbers from the QRNG and a congruential RNG. Hence, our result shows that ML has potentials in benchmarking the quality of RNG devices.
Randomness is crucial for our understanding of nature and indispensable in information processing tasks. In practical applications, assessing the quality of random numbers is crucial—particularly in cryptographic applications, where random numbers must exhibit statistical uniformity. Various statistical estimation methods have been developed to test the statistical characteristics of generated random numbers, enabling comprehensive evaluation of their statistical uniformity from multiple perspectives. Despite recent advances in quantum information providing physically well-characterized models for randomness quantification, distinction between different types of random numbers (including quantum random numbers) remains a challenging task, and statistical uniformity is rarely directly applicable to such discrimination scenarios. With the development of artificial intelligence technologies, the problem of random number discrimination is expected to draw on the paradigm of image classification in computer vision. This research proposes a machine learning-based randomness discrimination method, specifically addressing the challenge of quantum random number identification. Specifically, we design an image-based convolutional neural network (CNN) approach: one-dimensional random number sequences are converted into two-dimensional grayscale images, and binary classification of these images is achieved by capturing high-dimensional latent features that are undetectable via traditional statistical tests, thereby enabling effective random number discrimination. Experimental results demonstrate that, for the selected quantum random numbers, the proposed discrimination method successfully achieves two key distinctions: (1) between raw quantum random numbers and classical random numbers; and (2) between raw quantum random numbers and post-processed quantum random numbers—additionally revealing the role of statistical uniformity in these discrimination tasks. This achievement provides significant support for the design of randomness extraction protocols and the security assessment of quantum random number generators.
Random Number Generators (RNGs) are used in various applications, including cryptography, scientific simulations, gaming, and virtual reality. The quality of these random numbers is crucial, especially for computational approaches that rely on unpredictability to produce accurate results. In this thesis, we perform a comprehensive assessment of the quality of a novel Quantum Random Number Generator (QRNG) based on single photon. QRNGs leverage quantum mechanical properties to produce truly random numbers. This ensures high entropy, unpredictability, and security, making QRNGs particularly useful in fields that require high-quality randomness.We evaluate the statistical properties of strings generated by our QRNG and then its practical application by comparing it to traditional Pseudo-Random Number Generators (PRNGs) in Monte Carlo Integration (MCI), a technique that estimates integrals using random sampling. In particular, we use two statistical randomness test suits, namely NIST and Dieharder, to assess the statistical properties of our QRNG. All tests within these tests were passed, confirming that the corresponding QRNG achieves true randomness with sufficient high entropy. Next, we use our QRNG-generated numbers to seed Monte Carlo Integration (MCI) and compare it against results obtained using classical PRNG. The QRNG-based MCI demonstrated more accurate and stable numerical estimates, showing lower error rates and improved convergence compared to PRNG-based simulations.These findings highlight the advantages of QRNGs in enhancing numerical accuracy and computational security. While QRNGs may have slower generation rates than PRNGs, their superior randomness quality allows for more reliable Monte Carlo-based simulations, suggesting that fewer samples may be needed to achieve the same level of accuracy compared to classical PRNGs. This research underscores the potential of QRNG-powered numerical methods, paving the way for their integration into more advanced applications, including scientific computing, financial modeling, and cryptographic security.
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.
The generation of random numbers and the study of its properties have been an elusive field for a fair portion of the century. The application of random numbers is employed in many use cases such as cryptography, neural networks, numerical simulation, and gambling. The performance of each of these use cases is profoundly impacted by the employed random numbers; henceforth, the quality of randomness is of critical importance when it comes to their usage. A poorly generated random number can make a security system vulnerable, or any numerical or statistical evaluation misleading. Although various modes of classical random number generators exist and still function to provide strong cryptographic properties, emergence of quantum mechanical randomness has shed light on a novel path of generating certified randomness which supersedes the classical counterpart in terms of security. Harnessing quantum mechanical phenomena enables generation of true random numbers which can be certified and further implemented to elevate the net quality of the specific use cases. In this work, we generate and analyze random numbers from three different sources — 50: 50 beam splitter (BS), quantum key distribution (QKD) setup with classical post-processing scheme, and a commercially available quantum random number generator (QRNG) (ID Quantique (IDQ)). The quality of the generated random numbers from the various sources is checked in statistical tests and compared. Further on, we have developed a system which implements the QRNG-based random numbers to facilitate message authentication code (MAC) and one time password (OTP) protocols, demonstrating a communication network application. In this manner we discuss about a network which integrates quantum mechanics to the current classical networking approaches to enhance certain aspects of the networking protocol — in this case, the security.