## Abstract

We present a random number generation scheme based on measuring the phase fluctuations of a laser with a simple experimental setup. A simple model is established to analyze the randomness and the simulation result based on this model fits well with the experiment data. After the analog to digital sampling and suitable randomness extraction integrated in the field programmable gate array, the final random bits are delivered to a PC, realizing a 5.4 Gbps real time quantum random number generation. The final random bit sequences have passed all the NIST and DIEHARD tests.

© 2016 Optical Society of America

## 1. Introduction

Random numbers are of extreme importance for a wide range of applications in both commercial and scientific fields, such as numerical simulations [1], lottery games and cryptography [2]. A significant example is the quantum key distribution (QKD), in which the true random numbers are essential for both quantum state preparation and detection to guarantee unconditional security [3–5].

Classical pseudo random number generators (PRNGs) are based on the computational algorithms and have been widely used in modern digital electronic information systems. However, due to the deterministic and thus predictable features of the algorithms, PRNGs are not suitable for certain applications where true randomness is required [4,5]. Distinct from the PRNGs, true random number generators (TRNGs) rely on the randomness of physical processes [6–12]. An important type of the TRNGs is the quantum random number generator (QRNG), which is based on the intrinsic randomness of fundamental quantum processes and can provide truly unpredictable and irreproducible random numbers [12].

Over the past two decades, various QRNG schemes have been proposed and demonstrated. For instance, one significant scheme based on the detection of single photon’s path choice after a 50:50 beam splitter has been generally studied and implemented [13–15]. Commercial products employing this scheme have already appeared on the market such as the IDQuantique with the highest random bit generation rate of 16 Mbps [16]. Another approach based on single photon detection is to measure the arrival times of photons on a photodetector, which generates more than one bit per photon and hence achieves a higher generation rate [17]. However, limited by the performance of single photon detector (SPD), especially its dead time, the room of improvements for the ultimate speed of both schemes is not much.

To achieve higher generation rate, new schemes have been proposed and demonstrated, including measuring the vacuum field fluctuations [18,19] and quantum phase fluctuations [9,20–23]. The vacuum field fluctuation is a good quantum source to extract randomness while the signal is weak and a fast short-noise limited homodyne detector is required, which is a challenge. The quantum phase fluctuation of a laser results from the spontaneous emission and is thus inherently quantum mechanical. By operating near the threshold, the spontaneous emission is enhanced and the quantum phase fluctuations will be significant enough to be detected by conventional photodetectors, which is of higher speed and lower cost compared to the SPD. Based on this scheme, QRNGs with a generation rate of 500 Mbps, 6 Gbps and 68Gbps have been proposed and demonstrated successively and respectively [20–22].

In this paper, based on the scheme of quantum phase fluctuations, we propose a 5.4 Gbps real time QRNG with a simple and cost effective implementation, which employs only one beam splitter (BS) and has the potential for compact designs and practical applications. We derive the analytical expressions of the detected signals and perform the corresponding numerical simulation. The simulation result shows considerable agreement with the experimental data. After analog to digital converter (ADC) sampling and randomness extraction in real time, which is integrated in the field programmable gate array (FPGA), the final random bit sequences have passed all the NIST and DIEHARD tests.

## 2. Experimental setup and system model

Experimental setup of the proposed QRNG is shown in Fig. 1. A DFB laser diode with a center wavelength of 1550.12nm is driven by a butterfly packaged laser diode driver to emit continuous-wave (CW) beams. The laser diode is operated around the threshold to maximize the quantum noise and thus to guarantee the randomness. The CW beams are split into two paths by a 2 × 2 50/50 polarization-maintaining beam splitter (BS). One of the output ports is directly coupled into a 1.8 GHz photo-detector (PD, MenloSystems, FPD310). The other is coupled into the delay loop, which consists of the BS and a 4m delay line (DL). The beams coupled into the delay loop will be delayed for 20ns by the 4m DL for every circulation of the loop and hence 20*N* ns after *N* circulations.

Theoretical model of the setup is established as follows. Suppose the field at port 1 of the BS is

where $A$ is the amplitude of electric field, $\omega $ is the optical center angular frequency, and $\phi (t)$ is the phase of the laser, respectively. The field at port 2 of the BS is the sum of beams that have transmitted in the delay loop for different times of circulations ranging from 1 to*N*($N\to \infty $), which includes all the components with significant values and can be calculated as

*N*-th circulation and

*N-k*-th circulation laser beam. Note that the DC component is $\frac{1}{2}{A}^{2}{\displaystyle \sum _{k=0}^{N}{\left(\frac{\beta}{2}\right)}^{k}}$, which has no contribution to the generation of random bits. $\Delta {\phi}_{N}^{k}$ is a Gaussian random variable due to spontaneous emission [24,25]. Therefore

*I*, which is a superposition of$\Delta {\phi}_{N}^{k}$, can be quantified to random bits.

To validate the proposed model, firstly a high performance DSO (Agilent, DSAV334A, 33 GHz bandwidth) is employed to acquire the experimental measured data, which maximally recovers the distribution of the raw output. Then based on the above theoretical model, the numerical simulation of the probability distribution of the output intensity is performed. In the experimental setup, the attenuation of the optical loop is 0.3dB, and the time delay $\Delta t=20ns$, the line width of the laser working around the threshold level is about $5.5MHz$and hence $\Delta \phi $ is modeled as $\Delta \phi ~N\left(0,\text{2}\pi \Delta f\Delta t\right)$ [26]. The simulation result (red line) is shown in Fig. 2, which fits well with the experimental measured data. The typical value of *N* that we employed to perform the simulation is 10, because beams that have transmitted in the fiber loop for more than 10 circulations have all been attenuated significantly and have little contribution to the simulation result.

To measure the quantum fluctuations with respect to other noise sources, we performed measurements in the frequency domain by using an RF spectrum analyzer. Three different power spectra have been acquired: (1) the spectrum of the total phase fluctuations; (2) the intensity noise spectrum acquired by connecting the laser output directly to the PD; (3) the background noise spectrum acquired by turning off the laser. The result is shown in Fig. 3.

From Fig. 3 we can see that either the intensity noise or background noise is negligible compared with total phase fluctuations (on average the gap between them is about 18dB), which means the phase fluctuations dominate the output of the PD in terms of the power and hence the randomness is guaranteed.

## 3. Randomness extraction and performance

To acquire the random bit sequence in real time and verify the randomness of the proposed QRNG, we employ a 12bit-ADC (TI, ADC12D1800, 1.8G SPS) to sample the raw output. For hardware efficiency, the bitwise exclusive OR (XOR) operation and m-least-significant-bit (m-LSB) procedure are employed for randomness extraction, which is integrated in a field programmable gate array (FPGA) for real time processing.

The XOR operation is first performed on the raw data from the ADC for every 2 samples. Then we employ the min entropy,${H}_{\mathrm{min}}=-\mathrm{log}2\left\{\mathrm{max}\left({p}_{i}\right)\right\}$, as the indicator to decide how many bits can be reserved from each sample of the data after the XOR operation, which uses the maximal probability and represents the worst-case scenario. In our experiments, the typical value of the min entropy of the data after XOR operation is 9.592885, which means we can reserve at most 9 LSBs from each sample of the data after the XOR operation. To further illustrate the randomness extraction, we calculate the normalized min entropy ${H}_{nor-\mathrm{min}}={H}_{\mathrm{min}}\left(l\right)/l$ of the random bit sequences after XOR operation and m-LSB procedure, where ${H}_{\mathrm{min}}\left(l\right)$ is the min entropy calculated with the sample length of l, shown in Fig. 4.

Since min entropy holds ${H}_{\mathrm{min}}\left(l\right)=l$ for true random bit sequences, the normalized min entropy should be unity for any *l*. It can be seen from Fig. 3 that, after XOR operation and m-LSB procedure, the normalized min entropy is very close to unity.

Besides, Fig. 3 also shows that, when *l* is less than 7, there is no obvious difference between the normalized min entropies of the data for $m=2,4,6,8$. While when *l* is 7 and 8, the normalized min entropies of the data for $m=8$ falls lower than those of the data for $m=2,4,6$. Therefore, comprehensively speaking, when *m* is 2, 4 and 6, the final random bit sequences are of better randomness. So for the balance of randomness and random bit generation rate, and also for the consideration of the throughput capacity of the hardware interface, we reserve 6 LSBs from each sample after XOR operation to generate the final random bit sequences, yielding a 5.4 Gbps quantum random bit generation rate in real time.

In order to verify the randomness, firstly the autocorrelations within 100 bit-delay are calculated, shown in Fig. 5, indicating good randomness. Then we applied two test batteries, the NIST-STS and Diehard, and the corresponding test results are shown in Fig. 6 and Fig. 7. The random bits generated by the proposed QRNG can pass all the tests.

## 4. Conclusion

In this paper, a 5.4 Gbps real time QRNG is proposed based on the scheme of quantum phase fluctuations, which only employs one BS and therefore has the potential for compact designs and practical applications. The analytical expressions of the detected signals are derived and the corresponding numerical simulation result shows considerable agreement with the experimental data. After ADC sampling and randomness extraction integrated in an FPGA, the final random bit sequences have passed all the NIST and DIEHARD tests. For further study, it will be a valuable work to develop a theoretical model for the setup to quantify the quantum fluctuations with respect to other noise sources, which remains an open question and we would like to include in the future work.

## Funding

National Natural Science Foundation of China (NSFC) (61501414 and 61602045); National Science Fund for Distinguished Young Scholars of China (61225003); State Key Project of National Natural Science Foundation of China (61531003).

## References and links

**1. **N. Metropolis and S. Ulam, “The Monte Carlo method,” J. Am. Stat. Assoc. **44**(247), 335–341 (1949). [CrossRef] [PubMed]

**2. **N. Gisin, G. Ribordy, W. Tittel, and H. Zbinden, “Quantum cryptography,” Rev. Mod. Phys. **74**(1), 145–195 (2002). [CrossRef]

**3. **A. Martin, B. Sanguinetti, C. C. W. Lim, R. Houlmann, and H. Zbinden, “Quantum random number generation for 1.25-GHz quantum key distribution systems,” J. Lightwave Technol. **33**(13), 2855–2859 (2015). [CrossRef]

**4. **H.-W. Li, Z.-Q. Yin, S. Wang, Y.-J. Qian, W. Chen, G.-C. Guo, and Z.-F. Han, “Randomness determines practical security of BB84 quantum key distribution,” Sci. Rep. **5**, 16200 (2015). [CrossRef] [PubMed]

**5. **J. Bouda, M. Pivoluska, M. Plesch, and C. Wilmott, “Weak randomness seriously limits the security of quantum key distribution,” Phys. Rev. A **86**(6), 062308 (2012). [CrossRef]

**6. **P. Li, Y. C. Wang, and J. Z. Zhang, “All-optical fast random number generator,” Opt. Express **18**(19), 20360–20369 (2010). [CrossRef] [PubMed]

**7. **X. Li, A. B. Cohen, T. E. Murphy, and R. Roy, “Scalable parallel physical random number generator based on a superluminescent LED,” Opt. Lett. **36**(6), 1020–1022 (2011). [CrossRef] [PubMed]

**8. **W. Wei, G. Xie, A. Dang, and H. Guo, “High-speed and bias-free optical random number generator,” IEEE Photonics Technol. Lett. **24**(6), 437–439 (2012). [CrossRef]

**9. **H. Zhou, X. Yuan, and X. Ma, “Randomness generation based on spontaneous emissions of lasers,” Phys. Rev. A **91**(6), 062316 (2015). [CrossRef]

**10. **P. Li, Y. Sun, X. Liu, X. Yi, J. Zhang, X. Guo, Y. Guo, and Y. Wang, “Fully photonics-based physical random bit generator,” Opt. Lett. **41**(14), 3347–3350 (2016). [CrossRef] [PubMed]

**11. **Z. Cao, H. Zhou, X. Yuan, and X. Ma, “Source-independent quantum random number generation,” Phys. Rev. X **6**(1), 011020 (2016). [CrossRef]

**12. **M. Herrero-Collantes and J. C. Garcia-Escartin, “Quantum random number generators,” arXiv:1604.03304v1, 2016.

**13. **J. Rarity, P. Owens, and P. Tapster, “Quantum random-number generation and key sharing,” J. Mod. Opt. **41**(12), 2435–2444 (1994). [CrossRef]

**14. **A. Stefanov, N. Gisin, O. Guinnard, L. Guinnard, and H. Zbinden, “Optical quantum random number generator,” J. Mod. Opt. **47**(4), 595–598 (2000).

**15. **T. Jennewein, U. Achleitner, G. Weihs, H. Weinfurter, and A. Zeilinger, “A fast and compact quantum random number generator,” Rev. Sci. Instrum. **71**(4), 1675–1680 (2000). [CrossRef]

**16. **http://www.idquantique.com.

**17. **H. Q. Ma, Y. Xie, and L. A. Wu, “Random number generation based on the time of arrival of single photons,” Appl. Opt. **44**(36), 7760–7763 (2005). [CrossRef] [PubMed]

**18. **C. Gabriel, C. Wittmann, D. Sych, R. Dong, W. Mauerer, U. L. Andersen, C. Marquardt, and G. Leuchs, “A generator for unique quantum random numbers based on vacuum states,” Nat. Photonics **4**(10), 711–715 (2010). [CrossRef]

**19. **M. Jofre, M. Curty, F. Steinlechner, G. Anzolin, J. P. Torres, M. W. Mitchell, and V. Pruneri, “True random numbers from amplified quantum vacuum,” Opt. Express **19**(21), 20665–20672 (2011). [CrossRef] [PubMed]

**20. **B. Qi, Y.-M. Chi, H.-K. Lo, and L. Qian, “High-speed quantum random number generation by measuring phase noise of a single-mode laser,” Opt. Lett. **35**(3), 312–314 (2010). [CrossRef] [PubMed]

**21. **F. Xu, B. Qi, X. Ma, H. Xu, H. Zheng, and H.-K. Lo, “Ultrafast quantum random number generation based on quantum phase fluctuations,” Opt. Express **20**(11), 12366–12377 (2012). [CrossRef] [PubMed]

**22. **X. G. Zhang, Y. Q. Nie, H. Zhou, H. Liang, X. Ma, J. Zhang, and J. W. Pan, “68 Gbps quantum random number generation by measuring laser phase fluctuations,” Rev. Sci. Instrum. **86**(6), 063105 (2015). [CrossRef] [PubMed]

**23. **X. G. Zhang, Y. Q. Nie, H. Zhou, H. Liang, X. Ma, J. Zhang, and J. W. Pan, “Fully integrated 3.2Gbps quantum random number generator with real-time extraction,” Rev. Sci. Instrum. **87**(7), 076102 (2016). [CrossRef]

**24. **C. Henry, “Theory of the linewidth of semiconductor lasers,” IEEE J. Quantum Electron. **18**(2), 259–264 (1982). [CrossRef]

**25. **K. Vahala and A. Yariv, “Occupation fluctuation noise: A fundamental source of linewidth broadening in semiconductor lasers,” Appl. Phys. Lett. **43**(2), 140 (1983). [CrossRef]

**26. **A. Yariv and P. Yeh, *Photonics: Optical Electronics in Modern Communications*, 6th ed. (Oxford University Press, 2007).