Random number generation by coherent detection of quantum phase noise

In 2010 Qi et al. [Opt. Lett. 35(3), 312 (2010)] demonstrated a random number generator based on the drift of the phase of a laser due to spontaneous emission, The out-of-the-lab implementation of this scheme presents two main drawbacks: it requires a long and highly unbalanced interferometer to generate a random phase with uniform probability distribution, or alternatively, a shorter and slightly unbalanced interferometer that notwithstanding requires active stabilization and does not generate a uniform probability distribution without randomness extraction. Here we demonstrate that making use of the random nature of the phase difference between two independent laser sources and two coherent detectors we can overcome these limitations. The two main advantages of the system demonstrated are: i) it generates a probability distribution of quantum origin which is intrinsically uniform and thus in principle needs no randomness extraction for obtaining a uniform distribution, and ii) the phase is measured with telecom equipment routinely used for high capacity coherent optical communications. The speed of random bit generation is determined by the photodetector bandwidth and the linewidth of the lasers. As a by-product of our method, we have obtained images of how phase noise develops with time in a laser. This provides a highly visual alternative way of measuring the coherence time of a laser. © 2020 Optical Society of America under the terms of the OSA Open Access Publishing Agreement


Introduction
Random numbers are routinely needed in many branches of science and technology. They are a key element in the development of secure communications channels, since random keys can provide unbreakable encryption systems [1]. They are used in banking, which uses the RSA algorithm that relies on the generation of random numbers [2]. They are important in gambling, where excellent random number generators are needed to guarantee the fairness of used machines. Governments are implementing technical standards on the usage of random number generators [3]. In scientific applications, Random Number Generators are behind powerful simulation methods such as Monte Carlo [4].
Random numbers are generated in many different ways. There are algorithms that generate streams of numbers (Pseudo-Random Number generators, PRNGs) that, in spite of not being truly random, can faithfully simulate true random sequences in many scenarios. There exist also methods which are based on deterministic processes, but for which our ignorance of the many variables involved make the possible outcomes random. This is the case of Random Number Generators (RNGs) based on the behavior of chaotic systems [5], certain geological events such as earthquakes, astronomical events, motion of computer mice, and interactions in social media [6][7][8].
Randomness sources based on the principles of quantum mechanics can provide true randomness which stems from fundamental physical phenomena [9]. In principle, the generated random keys are intrinsically random, as opposed to other random number generators based on different physical principles which might contain biases due to phenomena which are deterministic, yet unknown to an experimenter. Due to this, there is a lot of interest in the generation of random numbers based on the intrinsic and fundamental random character of quantum phenomena.
One particular phenomena that can be considered for Quantum Random Number Generation (QRNG) is the temporal drift of the phase of any laser source. Spontaneous emission of radiation, a quantum phenomena whose presence is inevitable in any lasing process, is responsible for such a phase drift. To be truly of quantum origin, we should use lasers where the drift of the phase comes from spontaneous emission and not from other sources of noise that can be termed as technical noise, changes in the conditions of the lasing operation. Phase noise based QRNGs, in combination with the use of pulsed lasers, have achieved speeds of the order of 43 Gbit/s [10]. These phase noise-based QRNGs have been a key element to close certain loopholes existing in Bell's inequalities tests [11].
In 2010, Qi et al. [12] demonstrated a phase noise based random number generator by passing the signal of a laser by an unbalanced Mach-Zehnder interferometer. The idea behind this experiment is interfering the laser signal at two different times so that the phase difference between these two signals is known to evolve randomly. The experimental setup for this situation is shown in Fig. 1(a).x If τ coh is the coherence time of the laser, T det is the response time of the photodetectors, and cT delay is the path difference between the two arms of the interferometer, two conditions should be fulfilled for Random Number Generation: 1. T delay τ coh to guarantee that the phases of the signals traversing both arms of the interferometer are uncorrelated and the random phase difference obeys a uniform probability distribution.

T det
τ coh to ensure that we detect a fixed phase difference and we are not indeed integrating over a temporally-changing phase difference.
These conditions pose limitations on experimental realizations of this QRNG, as time delays of the order of τ c imply very long path delays. Such delays are usually implemented using optical fiber cables. As an example, a coherence time of 0.01 milliseconds (a linewidth of 100 kHz), would require 3 additional kilometers of fiber in one of the arms of the interferometer.
The presence of long delays pose challenges due to the losses that fibres present, especially in non-telecom wavelengths, as well as their difficulty for possible integration in chips. One way to circumvent this drawback is using a slightly unbalanced interferometer that would generate a random phase with a non-uniform Gaussian-like probability distribution [12]. However, this calls for randomness extraction for obtaining a uniform probability distribution and the active stabilization of the interferometer that increases the technical difficulty of the implementation of the system.
Here we put forward and demonstrate a scheme where the quantum origin of the phase noise can be exploited for the generation of random number sequences without the need of using a highly unbalanced interferometer with long delays or phase stabilization in a slightly unbalanced interferometer. We use a second laser and measure the interference of the two laser sources with a pair of coherent detectors (for homodyne detection) that measure the phase variation directly. The method presented here builds up on works which have used the interference of two lasers to create RNGs [13][14][15], but the measurement of two orthogonal quadratures readily exposes the random behavior of the phase and requires a minimal amount of post-processing of the measured signal, since the probability distribution that obeys the random phase is uniform if samples are taken at intervals longer than the coherence time of the lasers.
Homodyne detection of optical signals is routinely done in optical communications laboratories with the help of optical hybrids. In optical communications, one is interested in extracting the real and imaginary part of a signal, which carries the information, with the help of a local oscillator that acts as reference signal. For random number generation, we are interested in extracting the phase difference between two signals.
In particular, we perform balanced coherent detection of two narrowband laser signals in the telecom band generated with external cavity lasers. By using fast sampling of the signal, of the order of ∼ 100 Msamples/s, we are able to characterize the random walk performed by their phase difference, and determine their coherence times, i.e., the time over which the phases of the two lasers can be considered constant. When using slow sampling, of the order of ∼ 100 kSamples/s, we are able to generate random numbers which do not require any sort of randomness extraction for obtaining a uniform probability distribution from a non-uniform one. We will show that without randomness extraction we can pass almost all of the standard statistical tests aimed at benchmarking RNGs. This is a feature that can be used for future, faster QRNGs, as we are able to provide true randomness with keys that are fast enough to feed randomness extractors with nonuniform distributions of quantum origin.

Theory
The source of randomness comes from the random phase difference between the signals coming from two different lasers. To measure such phases we make both signals to interfere with the help of balanced coherent detectors as shown in Figs. 1(b) and 1(c). These are optical arrangements which involve the use of phase delays and beam splitters. The signal of interest comes from the subtraction of the photocurrents measured by optical detectors at the two output ports of the beam splitter. The use of two balanced detectors with different phase delays makes it possible to recover the complex information of the interfering waves, in a configuration that is called a coherent detector. QRNGs using coherent detectors and the interference of the vacuum field with coherent fields have been described theoretically [16] and demonstrated experimentally [17].
Using a balanced detector with a phase delay φ, it is possible to measure the mean value of the quadraturex (φ) of the interference between two lasers with frequencies ω 1/2 and intensities I 1/2 . This gives rise to a Skellam probability distribution for the measurement of the quadraturex (φ) [16], which can be approximated as a normal probability distribution with mean √ I 1 I 2 cos (∆ ω t + φ) and variance 2 ( As the phase changes in time due to spontaneous emission events occurring in the laser cavities, the signal measured by a balanced detector with a phase delay φ can be written as: (1) ξ (t) is a normally distributed phase with zero mean and a variance that becomes broader as time progresses [14]: where τ c,1/2 are the coherence times of the input lasers, defined as the inverse of their linewidths.
Since ξ (t) can only take values on the range [−π, π], phases are wrapped around this range and are distributed according to a von Mises distribution [18]: where I 0 (x) is the zeroth-order modified Bessel function of the first kind [19].
If the values of the phase are digitalized, the probability distribution of the phase can be made arbitrarily similar to a uniform distribution by measuring at times which are much longer than the coherence time. In other words, one can generate a uniform probability distribution for the random phase difference by decreasing the sampling rate at which the phase difference is measured. In particular, the measured values will follow a probability distribution of the form: where δ = 2π 2 k , with k being the bit depth of the possible values in which θ can be discretized, and i ∈ 0, 2 k − 1 . With t/τ c > 2 and k = 8, the maximum difference between p i and u i , the value of a uniform distribution, does not exceed 10 −5 , i.e., it would take on average 10 5 values to observe a difference between the observed value and a uniform distribution, as shown in Fig. 2.

Experimental setup and results
We performed experiments with two external cavity lasers (HP 8168A and Agilent 8164A) with central wavelengths around 1550nm, i.e., central frequencies around ν 0 ≈ 193.4THz. Central frequencies can typically vary 100 MHz per hour. In the experiments we measured typical central frequency differences between lasers of ∼ 1GHz, maintaining a stable beating interference for more than 20 hours. Both laser linewidths are approximately 100kHz, thus providing coherence times of τ c ≈ 20µs. The laser powers are P = 0.1mW at the photodetector end, corresponding to a mean photon flux numbers of Φ = (P/hν 0 ) ≈ 7.8 × 10 14 photons/s. Signals coming from the two lasers are sent to an optical hybrid (Kylia COH28) which provides the beam splitters and phase shifts that generate the two orthogonal quadrature readings of x (φ) with φ = 0, π/2. This optical hybrid reduces classical noise stemming from the fluctuation of the path lengths and phase shifters, being practically athermal, with phase variations of less than 17.5mrad for a change of ambient temperature of 90 • C. Therefore we can safely neglect phase variations due to the interferometers during the time of detection [14].
The light exiting the optical hybrid is then fed to two balanced detectors (Thorlabs PDB480C-AC) with 1.6 GHz Bandwidth (T det = 625ps). With this response time, detectors are able to measure ≈ 4.9 × 10 5 photons per sample, generating a voltage with an amplitude of approximately 280 mV. In contrast, when no lasers are input, the electrical classical noise read by the detectors is normally distributed around 0 with a standard deviation of less than 7.5 mV. These values of signal and electrical noise are comparable in magnitude to those reported in [14]. With such values of photon numbers, high signal and low noise, it is possible to measure clean sinusoidal signals for the quadratures I and Q when they are sampled at rates on the order of GHz, as illustrated in Fig. 3(a). This is in contrast to experiments in which the vacuum field is one of the signals considered, in which case the shot noise is the determinant origin of randomness [16,17,20]. Finally, the readout is digitalized with an oscilloscope (Tektronix MSO 70804C) at sample rates ranging from 156.25kSamples/s to 25GSamples/s.
With measurements in two complementary quadratures, i.e. by measuring I ≡ x (0) and Q ≡ x (π/2) , two signals whose amplitudes depend on the intensity fluctuations of both lasers, it is possible have access to the complete phase dynamics of ξ (t) directly. I and Q follow probability distributions which are correlated and complementary. Having an additional quadrature provides additional information on the value of the phase in the unit circle instead of just one projection onto the axis, which has been the customary technique for developing phase noise QRNGs which utilize randomness extraction [10,14,21]. With this additional information, it is possible to retrieve a distribution which can be made arbitrarily similar to a Uniform distribution stemming from spontaneous emission. With the information provided by the signals I and Q and the unwrapping of the phase, we can reconstruct the phase behavior of the laser interference, compensating the classical drifts in intensity from both lasers: It is possible to eliminate the main, possibly classical frequency variation ∆ ω t, to obtain a phase variation which describes a random walk whose origin are the spontaneous emission kicks inside of the laser cavities. This is done by differentiating, subtracting the offset, and integrating again, i.e.: The random values are obtained by further differentiating this phase (dξ/dt), wrapping it to the range ]−π, π] and discretizing the possible outcomes to 8 bits. With this processing technique it is possible to recover the kicks in the phase distribution, following Eq. (3). The measurement of such phase distributions is shown in Fig. 4. With this technique in the measured experimental data, we are also able to recover directly the particular and different random trajectories of the phase.
As predicted by Eq. (3) and shown in Fig. 4, random phases start becoming uniformly distributed as time progresses. This can be seen on the histograms, which widen and flatten as the time between successive measurements becomes larger and thus converge to uniform distributions of uncorrelated data sets. The autocorrelation coefficient of a string of numbers Θ and Q (continuous) as they are read out. It is noticeable that these two measurements are offset by π/2, and indeed they draw a circle when plotted against one another, as can be seen in (b). (b) also shows a two-dimensional representation of the measured electrical noise, normalized to the maximum amplitude of the quadrature signals. Both I and Q are digitalized to 8 bits of depth, and are measured over several cycles, resulting in a thicker unit circle. A phase random walk is obtained by following the method of Eqs. 5 and 6. (d) Normalized histogram of measurements of the quadrature signal I = x (0) after detection. Blue: arcsine distribution corresponding to the interference of the signals from the lasers. Orange: electrical noise, which corresponds to a narrow (typical deviation of 7.5 mV) normal distribution. The signal I and noise are normalized to the maximum value of the signal (285 mV). The standard deviation of the electrical noise accounts for less than 3 % of the measured signal amplitude. (e) Here we show the histogram of the different phase kicks that are recovered from the phase random walk in (c).
for a lag d [22], defined as never exceeds 2 × 10 −3 , and the autocorrelation for up to 2.5 × 10 6 samples is shown in Fig. 5. The autocorrelation for lag 0, which is by definition 1, is not shown. The measurement of this autocorrelation coefficients is shown as measured directly from the experiment, without any post-procesing apart from the one explained to retrieve the phase values. The autocorrelations with d > 0 are normally distributed with a mean zero and a standard deviation of 3.87 × 10 −4 . For random number generation, the measurements of I and Q are performed at 156.25 kSamples/s and digitalized at an 8-bit depth. Values of θ are saved as 8-bit values to reach a random number generator speed of 1.25MBits/s. We have tested the generation of uniform random numbers in a binary file of 21.21 Gbytes of data (≈ 2 37.3 bits), corresponding to 2.12 × 10 10 measurements (as every measurement provides one byte) gathered in the experimental setup shown in Fig. 1(d). We have used three statistical suites generated for the verification of Random Number Generators: Robert G. Brown's dieharder [23], United States' National Institute of Standards and Technology (NIST)'s Statistical Testing Suite [24], and Pierre L'Ecuyer's TestU01's Alphabit testing battery, specifically designed for the testing of hardware Random  The results of the dieharder statistical tests are presented in Table 1. A possible application for such a generator is the provision of true, quantum random data to feed the extraction of faster generators. Faster sources could be achieved by larger laser bandwidths, but this is a problem to be addressed in future work, as the wavelength stability of broader sources results in a loss of the beating which allows us to recover the phase noise.

Conclusions
We have demonstrated a quantum random number generator based on the extraction of the random phase difference between two laser beams. The simplicity of the processing techniques used and the availability and sturdiness of the components in telecom laboratories makes it easy to produce trusted random numbers for cryptographic purposes.
At slow speeds with high photon numbers, the phase noise is the dominant contribution to the random character of the interference of two lasers signals. The value of the phase is obtained by measuring two quadratures of the electric field of the two interfering lasers with a coherent detector. This randomness can be exploited to produce random numbers which do not require randomness extraction to obtain a uniform probability distribution from a non-uniform one, passing almost all of the standard statistical tests aimed at benchmarking Random Number Generators. We achieved a value of the autocorrelation coefficient of the random sequence of ∼ 4 × 10 −4 . It thus provides a reliable source of true randomness that can be used for further calibration of faster randomness extractors.
The speed of random number generation can be further improved by measuring the randomness of the phase with broader sources, such as Distributed Feedback (DFB) lasers with a linewidth of 100MHz linewidth. Other RNGs using two lasers [14] consider CW lasers with coherence times of nearly τ c ∼ 500 ps, which corresponds to a bandwidth of some ∼ 17 pm in wavelength. The theoretical limit for random number generation speed (without considering randomness extraction and sources of classical noise) is thus ∼ 1/τ c = 2 GHz. After randomness extraction and using a higher sampling rate to ensure a uniform probability distribution and a low value of the autocorrelation coefficient of the random sequence (∼ 8 × 10 −3 ), a random number generation speed of 80 Mbit/s was achieved. In our particular case, although our generation speed only achieves approximately 1.25 Mbit/s, we could increase the RNG speed by decreasing the power of the laser, since it is well known that the bandwidth due to spontaneous emission is inversely proportional to the power generated in the lasing process [26,27]. However, this increase in speed might come at the expense of other considerations: the response time of photodetectors should be faster, and some sources of classical noise as photodetector noise might become relevant. Moreover, increasing the linewidths of the lasers and using more unstable sources might result in drifts of the laser beating.
The usage of narrowband sources such as the ones considered in this paper are a drawback to the speed of the key generation. However, it is important to remark that even though certain applications might require high-speed random number generation, in excess of a few Gbit/s, this is not a restrictive requisite in all possible applications. In important cases, the use of mature and easily accessible technology, the robustness or even the availability of the components needed for random number generation can be far more important considerations to take into account than the RNG speed [7]. In particular, the speed of the Random Number Generator here presented can be rapidly increased, but the laser sources used, although being very stable -thus allowing a beat note to be maintained over several hours-, are also narrow in linewidth, allowing for long coherence times. The lasers used are located on the regime where it is possible to observe how the phase distribution uniformizes.