Generation of True Quantum Random Numbers with On-Demand Probability Distributions via Single-Photon Quantum Walks
††journal: opticajournal††articletype: Research Article{abstract*}Random numbers are at the heart of diverse fields, ranging from simulations of stochastic processes to classical and quantum cryptography. The requirement for true randomness in these applications has motivated various proposals for generating random numbers based on the inherent randomness of quantum systems. The generation of true random numbers with arbitrarily defined probability distributions is highly desirable for applications, but it is very challenging. Here we show that single-photon quantum walks can generate multi-bit random numbers with on-demand probability distributions, when the required “coin” parameters are found with the gradient descent (GD) algorithm. Our theoretical and experimental results exhibit high fidelity for various selected distributions. This GD-enhanced single-photon system provides a convenient way for building flexible and reliable quantum random number generators. Multi-bit random numbers are a necessary resource for high-dimensional quantum key distribution.
1 Introduction
Random numbers are important for science research and engineering applications, such as Monte-Carlo simulations [1, 2], cryptography [3, 4] and tests of fundamental physics [5, 6]. For example, quantum key distribution (QKD) technology highly relies on the availability of true random numbers to protect its communication security [7, 8, 9, 10]. Theoretically, pseudo-random number generators, due to their deterministic and predictable nature, cannot satisfy the requirement for building perfectly secure communication systems. Therefore, the inherent randomness of a quantum system makes it a promising platform for generating faithful random numbers. This is known as quantum random number generator (RNG)[11].
Practical quantum RNGs using various sources of randomness have been demonstrated. Discrete generators can use branching paths[12, 13, 14], arrival times[15, 16, 17, 18], photon counting[19, 20, 21, 22], and attenuated pulse[23, 24]; whereas continuous approaches exploit quantum vacuum fluctuations[25, 26, 27], phase noise of lasers[28, 29, 30], amplified spontaneous emission[10, 31], and Raman scattering[32]. Among these schemes, quantum RNG based on quantum walks promise a convenient and fast way to generate true random numbers[33].
The applications of a RNG strongly rely on the probability distribution used. Different distributions are indispensable in various fields. Uniformly distributed random numbers are most desirable and particularly useful in practical applications [11] because these avoid inherent bias. A Gaussian distributed RNG is of most significance in the modulation of coherent states in continuous-variable QKD systems [34, 35, 36], simulations of communication channels, and stochastic processes (e.g. noise) [37].
It is highly valuable to develop a quantum RNG with an on-demand probability distribution. Based on quantum walks, significant efforts have been made for this task [33, 38]. However, it is challenging to find the proper parameter numbers for a complex system to generate true random numbers with a given distribution. In contrast, the gradient descent (GD) algorithm, as a highly adaptive optimization algorithm that has been widely utilized in many fields [39, 40, 41, 42], can provide a more general and efficient way to accomplish this challenging task.
In this work, we propose a GD-enhanced quantum walk for realizing quantum RNG with, in principle, an on-demand probability distribution. Our GD-based scheme can be implemented by using a linear optical system without the need of time-bin encoding and dynamical modulation. We further experimentally demonstrate the generation of true random numbers with various selected probability distributions by using quantum walks of heralded single photons.
2 System and model
In quantum walks, the walker is located in the Hilbert space , where is position space and is the coin space. The coin space contains two basis vectors , which represent the eigenstate of the coin. Therefore, the definite position and classical coins are both replaced by position states and coin operators in a quantum walk system.
In a one-dimensional (1D) discrete-time quantum walk system, the quantum walker’s state can be described by a product state , where is the coin state and is the position state. Each walking step consists of a unitary operator , where is the conditional shift operator and is the coin operator. The coin operator rotates the coin state and its most general form can be expressed as
(1) |
where and are the parameters of the rotation and fixes the global phase. The conditional shift operator moves the walker either to the left or right depending on the coin state and has the form
(2) |
It leads to the conditional shift operation and . In the following, we fix the parameters and , so that we obtain the coin determined by one parameter . If , the coin then becomes the Hadamard coin : .
After walking steps, the state of a quantum walk system becomes . The quantum walker remains in a superposition of many positions until the final measurement is performed. The measured probability for the walker being at after walking steps can be written as
(3) |
The probability distribution is determined by the choice of coin parameter set in each walking step. It is difficult to adjust the coin parameters to obtain desired probability distributions because the number of coin parameters grows rapidly when increasing the walking steps. In this work, we exploit the gradient descent algorithm to solve this challenging problem.
3 Algorithm
Generally, a GD algorithm consists of three elements [43]: a system function , system parameters , and a loss function . The system function defines the input-output relation of the system and is parameterized by the parameters . The loss function evaluates the system output and compares it to the target. Here, we write the system function as , where and are the input and output of the system, respectively. Hereafter we use the mean square error function as the loss function, where is the target. Therefore, the loss function is also parameterized by and can be written as . Essentially, the gradient descent method minimizes the loss function by updating in the opposite direction of the gradient of the loss function. In each iteration of the gradient descent method, the parameters are updated according to [43], where is the learning rate.
A 1D discrete-time quantum walk process is depicted in Fig. 1 (a). The blue circles denote different position states, and the red arrows indicate the directions of the walk starting from different position states in each walking step. Without loss of generality, we assume the coin bias ratio can be adjusted for every coin operation at different position states in different walking steps. This assumption can be experimentally realized in a linear optical system [44].
The specific description of quantum state transfer in a quantum walk system is shown in Fig. 1(b). The letters and represent the complex amplitude and coin bias ratio, respectively. The notation () represents the complex amplitude of the coin state () at the position in the -th walking step; while is the coin bias ratio of the -th walking step starting from position , and is the measured probability at the detector located at position . The coin bias ratio is defined as . Thus, the state transformation with coin bias ratio can be modeled as , and . Then the measured probability becomes
(4) |
where and are the real and imaginary components of , respectively.
According to the GD algorithm, the updated value of with respect to is
(5) |
where here the loss function becomes , and is the target probability at position . Then the overall updated value of is obtained by summing Eq. (5),
(6) |
The details of the derivation are presented in the supplemental document. Therefore, during each iteration of our algorithm, updates according to the following relation
(7) |
The training finishes when the simulated quantum walk probability distribution reaches the target distribution. After the training is completed, the theoretical values of the coin bias ratios for generating the desired probability distribution are obtained.
4 Experimental setup
Quantum walks lay the natural foundation for studying plenty of novel quantum phenomena and can be realized in various systems[45, 46, 47, 48, 49, 50]. Among these, linear-optics-based quantum walks have advantages in convenience of implementation and compatibility. Therefore, we use this platform for our GD-based quantum RNG scheme.
In linear optical implementations of quantum walks, we use single photons as the quantum walker that moves in both directions in every position. The polarization states are introduced to represent two orthogonal coin states , respectively. We use single-photon spatial modes to represent the position of the walker .
The schematic of our experimental setup is shown in Fig. 2(a). Pairs of single photons are created via type-II spontaneous parametric down-conversion in a periodically poled potassium titanyl phosphate (PPKTP) crystal. This crystal is pumped by a diode laser centered at \unit\milli and emits orthogonally polarized photon pairs (i.e., horizontal and vertical polarized, or left- and right-circularly polarized) with a wavelength of 795 \unit\nano and a FWHM bandwidth of 0.3 \unit\nano. The photon pairs are separated by a polarized beam splitter. One photon from each pair served as a trigger while the other photon is launched into the quantum walk system.
The position states of the quantum walk are represented by spatial modes of the single photons. The shift operator acting on these modes is implemented by a 37.7 \unit\milli long, birefringent calcite beam displacer. The optical axis of each calcite prism is cut so that vertically polarized light was directly transmitted, and horizontal light underwent a 4 \unit\milli lateral displacement into a neighboring spatial mode. Here, we place the half wave plates in front of each beam displacer to adjust the coin bias ratio in the quantum walk. The aperture diameter of our half wave plate is small so that each half wave plate can change the polarization state of one beam of light without affecting adjacent beams. Therefore, we can adjust the coin bias ratio at different positions during each walking step.
The details of the first two quantum walk steps are depicted in Fig. 2(b). The spatial modes after step are recombined interferometrically in step . Repetition of these steps then forms an interferometric network as in Fig. 2(a). The lattice sites are labeled so that there are odd sites at odd walking steps, and even sites at even steps. After an -step quantum walk, the photons output in () spatial modes are coupled into an optical fiber and subsequently detected by a single-photon photodiode, in coincidence with the trigger photon. We measure the final probability distribution of the quantum walk by manually moving the fiber coupler between individual output spatial modes.
For a four-step quantum walk with an unbiased coin (), the measured probability distribution at given sites is shown in Fig. 2(c). Here we choose four initial polarization states to verify our experimental system: horizontal polarization, vertical polarization, right-circular polarization, and left-circular polarization. The experimental data (bars with colors) are in excellent agreement with theoretical simulations (red dashes). To characterize the single-photon purity in the experiment, we also measure the second-order correlation function for our single-photon source, as depicted in Fig. 2(d).
5 Results
5.1 Uniform distribution
Quantum RNGs with a uniform distribution [20, 51] are of importance for applications without inherent bias, such as quantum secure communication [52, 11]. Therefore, we first evaluate the performance of our algorithm for generating a uniform distribution in a four-step quantum walk system. Here we use the fidelity , defined to evaluate the similarity between the output (simulated or measured output) and the target probability distribution,
(8) |
where is the system output, is the target distribution, and represents the position.
For generating a uniform probability distribution, the fidelity curve during the training of our GD algorithm is shown in Fig. 3(a). The “iterations" represent the accumulating time step when the training progresses. From Fig. 3(a) we can see that the fidelity increases rapidly as the training process goes on. It exceeds after iterations and finally approaches unity within iterations. The learning rate of the training process is set as . The convergence rate of the training can be further improved by appropriately choosing the learning rate .
When the training is completed, we obtain the values of the coin bias ratio for generating a uniform probability distribution in the quantum walk. The values are shown in Fig. 3(b). Obviously, these values are unlikely to be found manually, while our algorithm can find proper values to obtain a high fidelity. According to these values, we adjust in the quantum walk experimental setup by rotating the half-wave plates in front of the BDs. The minimal adjustable angle of our half-wave plate is degree, which leads to a slight deviation between the actual coin bias ratio in the experiment and the theoretical values. But this does not affect the performance of our experiment because our system has strong robustness (See supplemental document for details of the experimental system robustness analysis). We perform experiments with right-circular and left-circular polarized single photons, respectively. The measured probability distributions for detecting the photon at given positions are shown in Fig. 3(c). It is clear that the measured probability distributions are in good agreement with the target distribution. The fidelities of the experimental results are for right-circular polarized photons and for left-circular polarized photons.
5.2 Gaussian distribution
Gaussian RNGs, as another important RNG, also have diverse useful applications, including Monte Carlo simulation of Gaussian noises. Specific to quantum information, this type of RNGs provide Gaussian distributed randomness for coherent states modulation in continuous-variable quantum key distribution systems [34, 35, 36]. In the following, we show that our GD algorithm can find the parameter set for the quantum walk based RNG to generate Gaussian distributed single-photon outputs.
We set the Gaussian distribution as the target probability distribution for the GD algorithm. The fidelity change during the training process is shown in Fig. 4(a). It can be seen that the fidelity rapidly increases to at the th iteration. The coin bias ratios can be found in Fig. 4(b). Figure 4(c) presents the measured probability distribution of single photons in a quantum walk with GD-optimized coin bias ratios. Right- and left-circularly polarized photons are chosen as input photons to perform the quantum walk experiment. The experimentally measured probability distribution is again in good agreement with the target distribution. The fidelities of the experiment results are and for the right- and left-circular polarized input photons, respectively. These results show that our algorithm can be utilized to adjust a quantum walk system to generate single photons with desired distributions. This allows one to build an effective quantum RNG that conforms to arbitrary probability distributions.
6 Conclusion
We have reported a GD-enhanced quantum RNG based on quantum walks of single photons in a linear optical system. Our multi-bit quantum RNG can generate true random numbers with an arbitrarily defined probability distribution with nearly unitary fidelity. The promised faithful randomness of our quantum RNG can determine the random measurement basis in high-dimensional quantum communications [53, 54, 55, 56]. We note that quantum walks with a uniform distribution can be used to generate quantum random numbers [57]. In comparison with this method, our GD-enhanced quantum walk can generate quantum random numbers with flexible probability distribution.
Funding National Key R&D Program of China (Grant No. 2019YFA0308700), the National Natural Science Foundation of China (Grant No.11890704), the Program for Innovative Talents and Teams in Jiangsu (Grant No. JSSCTD202138), Nippon Telegraph and Telephone Corporation (NTT) Research, the Japan Science and Technology Agency (JST) (via the Quantum Leap Flagship Program (Q-LEAP), and the Moonshot R&D Grant Number JPMJMS2061), the Asian Office of Aerospace Research and Development (AOARD) (Grant No. FA2386-20-1-4069), and the Foundational Questions Institute Fund (FQXi) (Grant No. FQXi-IAF19-06).
Acknowledgements The authors thank Lijian Zhang and Ben Wang for helpful discussions. We thank the High Performance Computing Center of Nanjing University for allowing the numerical calculations on its blade cluster system.
Disclosures The authors declare that there are no conflicts of interest related to this article.
Supplemental document See Supplement 1 for supporting content.
References
- [1] N. Metropolis and S. Ulam, “The Monte Carlo method,” \JournalTitleJ. Am. Statist. Assoc. 44, 335–341 (1949).
- [2] H. Niederreiter, “Quasi-Monte Carlo methods and pseudo-random numbers,” \JournalTitleBull. Amer. Math. Soc. 84, 957–1041 (1978).
- [3] C. E. Shannon, “Communication theory of secrecy systems,” \JournalTitleBell Syst. Tech. J. 28, 656–715 (1949).
- [4] R. Gennaro, “Randomness in cryptography,” \JournalTitleIEEE Secur. Priv. 4, 64–67 (2006).
- [5] J. S. Bell, “On the Einstein-Podolsky-Rosen paradox,” \JournalTitlePhysica 1, 195 (1964).
- [6] P. Shadbolt, J. C. F. Mathews, A. Laing, and J. L. O’Brien, “Testing foundations of quantum mechanics with photons,” \JournalTitleNat. Phys. 10, 278–286 (2014).
- [7] N. Gisin, G. Ribordy, W. Tittel, and H. Zbinden, “Quantum cryptography,” \JournalTitleRev. Mod. Phys. 74, 145–195 (2002).
- [8] V. Scarani, H. Bechmann-Pasquinucci, N. J. Cerf, et al., “The security of practical quantum key distribution,” \JournalTitleRev. Mod. Phys. 81, 1301–1350 (2009).
- [9] H.-K. Lo, M. Curty, and K. Tamaki, “Secure quantum key distribution,” \JournalTitleNat. Photonics 8, 595–604 (2014).
- [10] A. Martin, B. Sanguinetti, C. C. W. Lim, et al., “Quantum random number generation for 1.25-GHz quantum key distribution systems,” \JournalTitleJ. Lightwave Technol. 33, 2855–2859 (2015).
- [11] M. Herrero-Collantes and J. C. Garcia-Escartin, “Quantum random number generators,” \JournalTitleRev. Mod. Phys. 89, 015004 (2017).
- [12] J. G. Rarity, P. C. M. Owens, and P. R. Tapster, “Quantum random-number generation and key sharing,” \JournalTitleJ. Mod. Opt. 41, 2435–2444 (1994).
- [13] T. Jennewein, U. Achleitner, G. Weihs, et al., “A fast and compact quantum random number generator,” \JournalTitleRev. Sci. Instrum. 71, 1675–1680 (2000).
- [14] A. Stefanov, N. Gisin, O. Guinnard, et al., “Optical quantum random number generator,” \JournalTitleJ. Mod. Opt. 47, 595–598 (2000).
- [15] H.-Q. Ma, Y. Xie, and L.-A. Wu, “Random number generation based on the time of arrival of single photons,” \JournalTitleAppl. Opt. 44, 7760–7763 (2005).
- [16] M. Stipčević and B. M. Rogina, “Quantum random number generator based on photonic emission in semiconductors,” \JournalTitleRev. Sci. Instrum. 78, 045104 (2007).
- [17] J. F. Dynes, Z. L. Yuan, A. W. Sharpe, and A. J. Shields, “A high speed, postprocessing free, quantum random number generator,” \JournalTitleAppl. Phys. Lett. 93, 031109 (2008).
- [18] M. A. Wayne, E. R. Jeffrey, G. M. Akselrod, and P. G. Kwiat, “Photon arrival time quantum random number generation,” \JournalTitleJ. Mod. Opt. 56, 516–522 (2009).
- [19] H. Fürst, H. Weier, S. Nauerth, et al., “High speed optical quantum random number generation,” \JournalTitleOpt. Express 18, 13029–13037 (2010).
- [20] M. Ren, E. Wu, Y. Liang, et al., “Quantum random-number generator based on a photon-number-resolving detector,” \JournalTitlePhys. Rev. A 83, 023820 (2011).
- [21] Y. Jian, M. Ren, E. Wu, et al., “Two-bit quantum random number generator based on photon-number-resolving detection,” \JournalTitleRev. Sci. Instrum. 82, 073109 (2011).
- [22] S. Tisa, F. Villa, A. Giudice, et al., “High-speed quantum random number generation using CMOS photon counting detectors,” \JournalTitleIEEE J. Sel. Top. Quantum Electron. 21, 23–29 (2015).
- [23] W. Wei and H. Guo, “Bias-free true random-number generator,” \JournalTitleOpt. Lett. 34, 1876–1878 (2009).
- [24] Z. Bisadi, A. Meneghetti, G. Fontana, et al., “Quantum random number generator based on silicon nanocrystals LED,” in Integrated Photonics: Materials, Devices, and Applications III, vol. 9520 J.-M. Fédéli, ed. (2015), p. 952004.
- [25] Y. Shen, L. Tian, and H. Zou, “Practical quantum random number generator based on measuring the shot noise of vacuum states,” \JournalTitlePhys. Rev. A 81, 063814 (2010).
- [26] C. Gabriel, C. Wittmann, D. Sych, et al., ‘‘A generator for unique quantum random numbers based on vacuum states,” \JournalTitleNat. Photonics 4, 711–715 (2010).
- [27] Y. Zhu, G. He, and G. Zeng, “Unbiased quantum random number generation based on squeezed vacuum state,” \JournalTitleInt. J. Quantum Inf. 10, 1250012 (2012).
- [28] H. Guo, W. Tang, Y. Liu, and W. Wei, “Truly random number generation based on measurement of phase noise of a laser,” \JournalTitlePhys. Rev. E 81, 051137 (2010).
- [29] 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,” \JournalTitleOpt. Lett. 35, 312–314 (2010).
- [30] Y.-Q. Nie, L. Huang, Y. Liu, et al., “The generation of 68 Gbps quantum random number by measuring laser phase fluctuations,” \JournalTitleRev. Sci. Instrum. 86, 063105 (2015).
- [31] C. R. S. Williams, J. C. Salevan, X. Li, et al., ‘‘Fast physical random number generator using amplified spontaneous emission,” \JournalTitleOpt. Express 18, 23584–23597 (2010).
- [32] P. J. Bustard, D. Moffatt, R. Lausten, et al., “Quantum random bit generation using stimulated Raman scattering,” \JournalTitleOpt. Express 19, 25173–25180 (2011).
- [33] A. Sarkar and C. M. Chandrashekar, “Multi-bit quantum random number generation from a single qubit quantum walk,” \JournalTitleSci. Rep. 9, 12323 (2019).
- [34] Y. Zhang, Z. Li, Z. Chen, et al., “Continuous-variable QKD over 50 km commercial fiber,” \JournalTitleQuantum Sci. Technol. 4, 035006 (2019).
- [35] Y. Zhang, Z. Chen, S. Pirandola, et al., “Long-distance continuous-variable quantum key distribution over 202.81 km of fiber,” \JournalTitlePhys. Rev. Lett. 125, 010502 (2020).
- [36] M. Huang, Z. Chen, Y. Zhang, and H. Guo, ‘‘A Gaussian-distributed quantum random number generator using vacuum shot noise,” \JournalTitleEntropy 22 (2020).
- [37] D. B. Thomas, W. Luk, P. H. Leong, and J. D. Villasenor, “Gaussian random number generators,” \JournalTitleACM Comput. Surv. 39, 11–49 (2007).
- [38] R. Zhang, R. Yang, J. Guo, et al., “Arbitrary coherent distributions in a programmable quantum walk,” \JournalTitlePhys. Rev. Res. 4, 023042 (2022).
- [39] J. Biamonte, P. Wittek, N. Pancotti, et al., “Quantum machine learning,” \JournalTitleNature 549, 195–202 (2017).
- [40] P. Palittapongarnpim, P. Wittek, E. Zahedinejad, et al., “Learning in quantum control: High-dimensional global optimization for noisy quantum dynamics,” \JournalTitleNeurocomputing 268, 116–126 (2017).
- [41] I. Kerenidis and A. Prakash, ‘‘Quantum gradient descent for linear systems and least squares,” \JournalTitlePhys. Rev. A 101, 022316 (2020).
- [42] M. Cai, Y. Lu, M. Xiao, and K. Xia, “Optimizing single-photon generation and storage with machine learning,” \JournalTitlePhys. Rev. A 104, 053707 (2021).
- [43] S. Ruder, “An overview of gradient descent optimization algorithms,” \JournalTitlearXiv: 1609, 04747 (2016).
- [44] H. Jeong, M. Paternostro, and M. S. Kim, “Simulation of quantum random walks using the interference of a classical field,” \JournalTitlePhys. Rev. A 69, 012310 (2004).
- [45] H. B. Perets, Y. Lahini, F. Pozzi, et al., “Realization of quantum walks with negligible decoherence in waveguide lattices,” \JournalTitlePhys. Rev. Lett. 100, 170506 (2008).
- [46] A. Peruzzo, M. Lobino, J. C. F. Matthews, et al., “Quantum walks of correlated photons,” \JournalTitleScience 329, 1500–1503 (2010).
- [47] H. Tang, C. Di Franco, Z.-Y. Shi, et al., “Experimental quantum fast hitting on hexagonal graphs,” \JournalTitleNat. Photonics 12, 754–758 (2018).
- [48] Q.-P. Su, Y. Zhang, L. Yu, et al., “Experimental demonstration of quantum walks with initial superposition states,” \JournalTitlenpj Quantum Inf. 5, 40 (2019).
- [49] Z. Yan, Y.-R. Zhang, M. Gong, et al., “Strongly correlated quantum walks with a 12-qubit superconducting processor,” \JournalTitleScience 364, 753–756 (2019).
- [50] Q.-P. Su, S.-C. Wang, Y. Chi, et al., “Implementing quantum walks with a single qubit,” \JournalTitlearXiv: 2206, 03642 (2022).
- [51] M. Eaton, A. Hossameldin, R. J. Birrittella, et al., “Resolution of 100 photons and quantum generation of unbiased random numbers,” \JournalTitleNat. Photonics 17, 106–111 (2022).
- [52] Z. Tang, Z. Liao, F. Xu, et al., “Experimental demonstration of polarization encoding measurement-device-independent quantum key distribution,” \JournalTitlePhys. Rev. Lett. 112, 190503 (2014).
- [53] A. Vaziri, J.-W. Pan, T. Jennewein, et al., “Concentration of higher dimensional entanglement: Qutrits of photon orbital angular momentum,” \JournalTitlePhys. Rev. Lett. 91, 227902 (2003).
- [54] X.-L. Wang, Y.-H. Luo, H.-L. Huang, et al., “18-qubit entanglement with six photons’ three degrees of freedom,” \JournalTitlePhys. Rev. Lett. 120, 260502 (2018).
- [55] Z.-F. Liu, C. Chen, J.-M. Xu, et al., “Hong-Ou-Mandel interference between two hyperentangled photons enables observation of symmetric and antisymmetric particle exchange phases,” \JournalTitlePhys. Rev. Lett. 129, 263602 (2022).
- [56] Z.-X. Li, D. Zhu, P.-C. Lin, et al., “High-dimensional entanglement generation based on a Pancharatnam-Berry phase metasurface,” \JournalTitlePhotonics Res. 10, 2702–2707 (2022).
- [57] M. Grafe, R. Heilmann, A. Perez-Leija, et al., “On-chip generation of high-order single-photon W-states,” \JournalTitleNat. Photonics 8, 791–795 (2014).