# Secure Quantum Communication Technologies and Systems: From Labs to Markets
## 3 Devices for QKD Systems
### Quantum Random Number Generators  
Random numbers play a crucial role in diverse applications, such as secure communications [69; 81; 82; 83; 84], stochastic modelling [85], gambling [86], Monte Carlo simulations [87], and extensive data processing [88]. Unlike pseudo-random numbers that are generated through computational algorithms, true random numbers are generated through physical processes. Randomness is considered \"true\" if it is provable by information theory [89]. Physical random number generators rely on physical processes that are believed to be random, such as electronic and thermal noise [90], amplified spontaneous emission [91], and chaotic semiconductor lasers [92]. Quantum random number generators (QRNG) are a subset of physical random number generators that derive randomness from quantum mechanical processes and events [93]. The probabilistic nature of quantum mechanics makes QRNG a preferred source for generating true random numbers. A QRNG is expected to produce uncorrelated and uniformly distributed streams of random data and typically consists of a quantum entropy source block and a post-processing block. The entropy source is a physical system that generates random physical variables, referred to as raw data, and reads them through measurement and detection equipment. In the entropy source, a quantum state is prepared to ensure true randomness and measured to generate the raw random data. In the post-processing stage, an assessment of the degree of randomness of the raw data is made through autocorrelation and estimation of the minimum entropy, which is a measure of the extractable randomness of the raw data. The estimated minimum entropy acts as an input to randomness extractor algorithms and hardware that output nearly true random numbers. The extracted true random numbers are subjected to randomness tests, such as the ones defined by the National Institute of Standards and Technology (NIST); the so called DIEHARD tests, which refer to a widely used suite of methods of assembling and combining uniform random numbers, and then performing statistical tests; and TestU01, a software library, implemented in the ANSI C language, offering utilities for the statistical testing of random number generators. Optical QRNG implementations have been investigated using different quantum processes, such as entropy sources, including two-path splitting of single photons [94], photon arrival time [95], amplified spontaneous emission [93; 94; 95; 96], detection of vacuum field [97], and phase diffusion and phase noise in laser diodes [98; 99; 100; 101; 102; 103; 104]. The physical principle behind branching path generators is path superposition and subsequent state measurement. The source of randomness is the splitting of weak light beams realized by optical beam splitters or polarization beam splitters (PBS) and detectors. A quantum state with one photon is sent by a weak light source to a balanced beam splitter or a PBS, and detected by the relevant detector. The output path taken by the photon is random and the probability of detection at each detector is the same. The detection on one detector (D0) can be considered as a \"0\" bit, whereas detection at the other detector (D1) can be considered as a \"1\" bit, thus generating a random sequence. This type of generator can achieve a rate in the order of Mbit/s. The performance is mainly limited by the detector dead time, which can be improved by using detectors with faster recovery times [94; 105]. QRNGs based on photon arrival time exploit randomness in photon detection times (i.e., time of arrival statistics). These QRNGs have timing circuitry in addition to weak photon sources and detectors to keep precise track of each individual detection event or number of clicks in a fixed time window. Within a short time window, photons arriving at the detector from a weak source follow an exponential distribution in time \(\lambda\)e\({}^{-\lambda t}\), where \(\lambda\) is the average number of photons per second.