Statistics of the Optical Phase of a Gain-Switched Semiconductor Laser for Fast Quantum Randomness Generation

: The statistics of the optical phase of the light emitted by a semiconductor laser diode when subject to periodic modulation of the applied bias current are theoretically analyzed. Numerical simulations of the stochastic rate equations describing the previous system are performed to describe the temporal dependence of the phase statistics. These simulations are performed by considering two cases corresponding to random and deterministic initial conditions. In contrast to the Gaussian character of the phase that has been assumed in previous works, we show that the phase is not distributed as a Gaussian during the initial stages of evolution. We characterize the time it takes the phase to become Gaussian by calculating the dynamical evolution of the kurtosis coefﬁcient of the phase. We show that, under the typical gain-switching with square-wave modulation used for quantum random number generation, quantity is in the ns time scale; that corresponds to the time it takes the system to lose the memory of the distribution of the initial conditions. We compare the standard deviation of the phase obtained with random and deterministic initial conditions to show that their differences become more important as the modulation speed is increased.


Introduction
Experimental and theoretical understanding of the fluctuations of laser light began shortly after the invention of the laser [1][2][3][4][5]. Special attention has been devoted to fluctuations of the light emitted by semiconductor lasers [6][7][8][9][10] due to their vast variety of applications. The best available theoretical description of these fluctuations is based on the Fokker-Planck equation, or alternativelly on Langevin's stochastic rate equations [3,[6][7][8]11]. The phase of the laser electrical field is a random quantity, mainly due to the effect of the spontaneous emission noise. The random character of this phase is precisely the basis of some of the available methods for quantum random number generation (QRNG).
Random numbers are a vital resource for numerous applications including cryptography, statistical analysis, stochastic simulations, decission making in engineering processes, quantitative finance, gambling, massive data processing, etc. [12,13]. Random number generators (RNG) use software algorithms (pseudorandom number generators) or hardware physical devices. Typical physical processes used to generate random numbers are radioactive decay, Johnson or Zener's noise, chaos noise [13,14] and quantum phenomena [12,13]. QRNGs are a particular case of physical RNGs that can generate truly random numbers from the fundamentally probabilistic nature of quantum events [13]. The advantage of using QRNGs relies on its unpredictibility, which can be proven to be based on quantum physics laws. Typical QRNGs are based on quantum optics [13]. These generators can be divided in (i) generators that use single-photon sources, and (ii) generators that use multi-photon sources, typically semiconductor lasers or LEDs. QRNGs based on singlephoton detection methods include: Branching path generators [15], generators measuring the time of arrival of photons [16], photon counting generators [17], and attenuated pulse generators [18]. These methods have been experimentally compared in [19]. Multi-photon QRNGs include: Generators based on quantum vacuum fluctuations [20], on amplified spontaneous emission (ASE) signals [21,22], and on phase noise in continuous wave [23][24][25] and in pulsed laser diodes [26][27][28][29][30][31].
Spontaneous emission is a useful mechanism to generate quantum fluctuations, as it can be ascribed to the vacuum fluctuations of the optical field [26]. Randomness due to spontaneous emission is the basis of QRNGs based on pulsed single-mode laser diodes [26][27][28]30,31]. These generators have several advantages. They are made of commercially available components: For instance, standard photodetectors can be used due to the high signal levels. They are simple, low-cost, robust, and fast: Generation rates up to 43 Gbps quantum random bit generation have been experimentally demonstrated [27]. In these QRNGs the laser diode is periodically modulated from below to above threshold in such a way that gain-switching operation is obtained, typically at Gbps rates. While the laser is below threshold the optical phase becomes random due to the spontaneous emission noise. Gain-switching operation produces a periodic train of laser pulses with random phases. Phase fluctuations are then converted into amplitude fluctuations by using interferometric setups [27,31]. Detection and filtering of the amplitude fluctuations provides the generation of random values with an almost uniform distribution.
The applications of QRNGs, for instance in cryptography [31,32], require that the physical processes underlying their operation must be properly understood and described. For QRNGs based on pulsed semiconductor lasers, it is essential an accurate description of the phase diffusion process, that is, laser phase fluctuations must be qualitatively and quantitatively characterized. Modelling of these fluctuations has been performed by numerical integration of the laser stochastic rate equations [27,30,31,[33][34][35][36]. Good quantitative agreement between experiments and theory is achieved when the complete set of parameters of the rate equations is known for the specific laser diode. Good agreement between experimental and theoretical phase fluctuations has been recently reported for a discrete mode laser (DML) [36] for which a complete extraction of the intrinsic parameters was performed [35,37]. This permits a quantitative description of the dependence of phase diffusion on the laser and modulation parameters. On the qualitative side, statistics of optical phase has been described as Gaussian in numerical simulations [27,33,34] since spontaneous emission noise has also Gaussian distribution. However, in these generators the bias current is periodically modulated in such a way that the evolution is mainly in a transient regime, specially when operating at fast bit rates. It is then expected that the choice of initial conditions in the simulations must have impact on the statistics of the optical phase and on the time it takes the phase to be distributed as a Gaussian. This is in fact the main objective of this work: The investigation of the conditions for which the phase becomes distributed as a Gaussian.
In this paper we report a theoretical study of the phase diffusion in gain-switched semiconductor lasers. This is done by performing numerical simulations of the stochastic rate equations for the complex electrical field and carrier number. In our modelling we use the set of parameters recently extracted for a DML device. With these parameters we first analyze the impact of the carrier noise on the phase statistics. In the rest of the paper we focus on the calculation of the temporal dependence of the statistical moments and distribution of the phase. We first consider random initial conditions that contrast to previous analysis in which deterministic fixed initial conditions were chosen [34]. We compare the phase statistics obtained for both types of initial conditions. For both cases we show that the phase is not distributed as a Gaussian because of the non-Gaussianity of the initial conditions. This contrasts to the Gaussian character of the phase that has been assumed in previous works [27,33,34]. We characterize the time it takes the phase becomes approximately Gaussian by calculating the temporal evolution of the kurtosis coefficient of the phase. Our calculations indicate that under the typical gain-switching with squarewave modulation used for QRNG, the time it takes to the phase to become Gaussian is in the ns scale. These are the typical times for which the memory of the distribution of the initial conditions is lost. The comparison between the variance of the phase obtained with random and fixed initial conditions show that their differences become more important as the modulation speed is increased.
Our paper is organized as follows. In Section 2, we present our theoretical model. Section 3 is devoted to analyze the dynamical evolution of the relevant variables. In Section 4, we study the temporal evolution of the phase statistics. Finally, in Section 5 we discuss and summarize our results.

Theoretical Model
Gain-switched single-mode semiconductor laser dynamics can be modelled by using a set of stochastic rate-equations that read (in Ito's sense) [6,37,38] where P(t) is the number of photons inside the laser, φ(t) is the optical phase, and N(t) is the number of carriers in the active region. The parameters appearing in these equations are the following: G N is the differential gain, N t is the number of carriers at transparency, is the non-linear gain coefficient, τ p is the photon lifetime, α is the linewidth enhancement factor, e is the electron charge, and A, B and C are the non-radiative, spontaneous, and Auger recombination coefficients, respectively. In these equations we consider a temporal dependence of the injected current, I(t), and a rate of the spontaneous emission given by R sp (N) = βBN 2 where β is the fraction of spontaneous emission coupled into the lasing mode. The Langevin terms F P (t) and F φ (t) in Equations (1) and (2), represent fluctuations due to spontaneous emission, with the following correlation properties, is the Dirac delta function and δ ij the Kronecker delta function with the subindexes i and j referring to the variables P and φ. QRNG systems based on gain-switching of single-mode laser diodes are such that a large signal modulation of the bias current is applied to the device. We consider an injected current following a square-wave modulation of period T with I(t) = I on during T/2, and I(t) = I o f f during the rest of the period. This modulation is such that I o f f < I th , where I th is the threshold current of the laser, for obtaining a random evolution of the optical phase induced by the spontaneous emission noise. Numerical integration of the previous stochastic rate equations by usual Euler-Maruyama [3,39] or Heun's predictor-corrector algorithms [37] present instabilities when the photon number is very small, a situation always present in this type of QRNGs: some spontaneous noise events cause negative values of P that lead to numerical instabilities due to the square root factor multipliying the noise term in Equations (1) and (2). Very recently a set of rate equations for the complex electrical field, E(t), instead of equations for P and φ has been proposed to solve this problem [35]. These equations are the following: where E(t) = E 1 (t) + iE 2 (t) is the complex electrical field and ξ(t) = ξ 1 (t) + iξ 2 (t) is the complex Gaussian white noise with zero average and correlation given by < ξ(t)ξ * (t ) >= δ(t − t ) that represents the spontaneous emission noise, and where we have considered that R sp (N) = βBN 2 . These equations exactly correspond to our initial model because the application of the rules for the change of variables in the Ito's calculus [11] to P =| E | 2 = E 2 1 + E 2 2 and φ = arctan (E 2 /E 1 ) in Equations (4) and (5) gives Equations (1)-(3). Instabilities do not appear because P is not inside the square root factor that multiplies the noise term.
Up to now we have considered an equation for N that has not any noise term. Carrier noise can also be important for describing statistics in semiconductor laser dynamics [6]. These fluctuations can be taken into account if we substitute Equation (5) by where ξ N is a real Gaussian white noise of zero average and correlation given by and statistically independent of ξ(t) [6,10,37,40]. In this work we will numerically solve Equations (4) and (6) by using the Euler-Maruyama algorithm [3,39] with an integration time step of 0.001 ps. We will use the numerical values of the parameters that have been extracted for a discrete mode laser (DML) [35,37]. This device is a single longitudinal mode semiconductor laser emitting close to 1550 nm wavelength and I th = 14.14 mA at a temperature of 25 • C. The values of the parameters are [35,37]. Simulation and experimental results have shown not only qualitative but also a remarkable quantitative agreement for a very wide range of gain-switching conditions [35,37,41].

Analysis of the Dynamics
We first analyze the dynamical evolution of relevant variables when the laser is modulated with I on = 30 mA, I o f f = 7 mA, and T = 1 ns. The laser is switched-off with a current close to I th /2, for obtaining a significant effect of the spontaneous emission noise on the randomness of the phase. Figure 1a-c show the photon number, carrier number, and optical phase, respectively, as a function of time. We integrate the equations for consecutive bias current pulses in such a way that the initial conditions for one period correspond to the final values of the variables at the end of the previous period. Figure 1a shows P for three consecutive pulses. The laser is switched-on with I on at t = 1 ns. After this time P begins to build-up from very small random values determined by the spontaneous emission noise events. After the emission of the pulse with the corresponding relaxation oscillations, P begins to decrease at t = 1.5 ns (when I o f f is applied), reaching the small random values at which spontaneous emission noise dominates the device dynamics. N begins at t = 1 ns from a value well below the threshold carrier number, N th = N t + 1/(G N τ p ) = 5.045 × 10 7 , as it can be seen in Figure 1b. The characteristics relaxation oscillations of N associated to the pulse emission are followed by a monotonous decrease from t = 1.5 ns to 2 ns due to the value below threshold of I o f f .
The optical phase is calculated at each integration step from E 1 and E 2 in such a way that it is a continuous function of t. The dynamical evolution of φ is shown in Figure 1c. When P is large (small) the noise term in Equation (2) is much smaller (larger) than the other term in that equation and φ mainly evolves in a deterministic (random) way. The deterministic decrease of φ is due to the value below threshold of the current when switching-off the laser: G N (N − N t ) − 1 τ p < 0 because N < N th , and therefore φ decreases (see Equation (2)). Visualization of different random trajectories and calculation of statistical moments of the phase, specially its standard deviation, σ φ (t), have been usually done by overlaying them in a temporal window with a duration of a few periods [33][34][35]. For instance just one period is considered in references [34,35] to calculate the value of σ φ (t) = To obtain well defined averages, < φ > (t) and < φ 2 > (t), it is necessary to make a choice of the initial conditions at the beginning of each period because φ is an unbounded quantity, as shown in Figure 1. One choice is to take P(0) =< P(0) >, N(0) =< N(0) >, and φ(0) =< φ(0) > [34], that is fixed initial conditions. A second choice is to take random initial conditions [35]. Photon and carrier numbers at t = 0 are those obtained at the end of the previous period, like in Figure 1. The change with respect to Figure 1 is related to the phase and it is based on the cyclic nature of angles: We consider that φ at the beginning of the period, φ(0), is that corresponding to φ at the end of the previous period, φ(T), but converted into the [0, 2π) range, that is we 2π 2π. Figure 2 shows the temporal evolution of P, N and φ, plotted in a window of duration T, corresponding to the three consecutive pulses of Figure 1 and using the previous choice of random initial conditions. Figure 2a,c show that laser pulses that have a larger switch-on time, defined as the time at which P crosses a fixed level, have also a larger value of the maximum of N and P [9]. Figure 2b shows that φ takes values in a range of several multiples of 2π during one period. Figure 2b also shows, in a more clear way than in Figure 1, that the phase fluctuations are more important at the beginning and at the end of the pulse. Comparison between Figure 2a,b shows that pulses with a similar evolution of P can have a very different phase evolution (see black and red realizations). In the next section we will focus on the description of the temporal evolution of the phase statistics.

Analysis of the Phase Statistics
The dynamical evolution of the variance of the phase, σ 2 φ , is shown in Figure 2d for the case of random initial conditions and a temporal window of duration T = 1 ns. σ 2 φ (t) has been calculated by averaging over 2 × 10 4 temporal windows. σ 2 φ (0) > 0 because of our choice of random initial conditions. Large increases of σ 2 φ (t) occur while P is small and dominated by the spontaneous emission noise, that is at the beginning and at the end of the period. While the evolutions of P and φ are deterministic and I > I th (0.15 ns < t < 0.5 ns) σ 2 φ (t) oscillates with the frequency of the relaxation oscillations around a value that increases linearly with time, similarly to what was observed by Henry [8]. These oscillations and the linear increase are barely seen in Figure 2d because of the vertical scale determined by the large values of the variance when the laser is switched-off. From 0.5 ns < t < 0.65 ns, while φ still has a deterministic evolution, there is a slight decrease of σ 2 φ (t). After that time, both φ and P become determined by the spontaneous emission noise. In this way the linear increase of σ 2 φ (t) with t, characteristic of phase diffusion, is observed until the end of the period, as it is seen in Figure 2d.
We now analyze the effect of carrier noise on the statistics of the phase. Figure 3 shows the probability density function (pdf) of φ at three different times when the carrier noise is considered (that is, integrating Equation (6)) and when it is neglected (considering instead Equation (5)). This figure has been obtained using the same conditions of Figure 2. Figure 3 shows that the effect of carrier noise on the statistics of φ is very small. In fact, it has been shown that the consideration of noise in the carrier equation is not important during transient regimes [9,33], being only essential in the stationary regime for calculating quantities like the relative intensity noise [6]. Figure 3 also shows the Gaussian distributions of average and standard deviation given by the simulation with carrier noise. It is clear that the Gaussian distribution does not describe well the phase satististics, specially for short times (t = 0.1 and t = 0.5 ns). The Gaussian approximation becomes better at longer times (t = 0.9 ns). A way of quantifying if the Gaussian distribution is suitable for describing the phase statistics is by calculating moments of φ of order higher than 2. Asymmetry and kurtosis coefficient of the simulated data are shown in Figure 4 as a function of time. Both coefficients must vanish if the distribution is Gaussian. Figure 4a shows with black lines the asymmetry, γ r , and kurtosis, κ r , coefficients obtained under the same conditions of Figure 2, that is with random initial conditions. While the phase distribution is symmetric (γ r ∼ 0), κ r is significantly larger than zero. κ r decreases fast until it develops a small peak close to the time at which the first relaxation oscillation appears. After that peak it reaches a plateau that finishes when P reaches the spontaneous emission noise level (around t = 0.7 ns). From that time φ diffuses and κ r monotonously decreases reaching values that are closer to zero at the end of the period (κ r = 0.65 at t = 0.9 ns). Figure 4b shows γ r and κ r when T = 2 ns. In this case φ has more time to diffuse when the laser is switched-off and then the Gaussian approximation is better at the end of the period (κ r = 0.14 at t = 2 ns). The reason why φ is not Gaussian can be understood by plotting the pdf of φ at t = 0. Figure 5 shows that distribution for the case of T = 1 ns. The distribution corresponds to a uniform random variable in [0, 2π). This is because of the way random initial conditions are chosen: Doing the operation φ(0) = φ(T) − int φ(T) 2π 2π from a broad nearly Gaussian distribution for φ(T) makes φ(0) a uniform random variable, U(0, 2π). The kurtosis of U(0, 2π) is 354/5 ∼ 70.8. Diffusion of φ at the beginning of the period (see Figure 2) makes κ r to decrease quickly, but not enough for becoming strictly Gaussian, even at the end of the period. Of course these results depend on the way initial conditions are chosen. Another way of choosing these values is by considering fixed initial values for E(0), and N(0). Figure 4 shows, with red lines, asymmetry and kurtosis coefficients, γ f and κ f , when fixed initial conditions are used. We choose these values in the following way. We first integrate Equations (4) and (6) from arbitrary initial conditions corresponding to below threshold operation in order to find the averaged < P(t) >, < N(t) >, and < φ(t) > for 0 ≤ t ≤ T. Then we choose N(0) =< N(T) >, and E(0) = < P(T) >(cos < φ(T) > +i sin < φ(T) >). This election is similar to that considered in [34]. Figure 4 shows that the evolution of γ f and κ f is very similar to that of γ r and κ r , respectively. κ f > κ r because the initial delta-like distribution of φ(0) produce larger values of the kurtosis. These differences decrease with t, specially when spontaneous emission dominates the phase evolution: In Figure 4a,b when t > 0.7 ns (t > 1.2 ns).
The choice of initial conditions also impacts on the values of the standard deviation as a function of t. In Figure 6a the dynamical evolution of σ φ for both, random and fixed initial conditions, is shown when T = 1 ns. Again both standard deviations have similar trends but the value for random initial conditions is larger than that obtained for the fixed ones. This is due to the non-zero value of σ φ (0) obtained with the uniform distribution of φ(0) in contrast to the zero value obtained for fixed initial conditions. Relative differences between both quantities enhance if the speed of QRNG increases as it can be seen in Figure 6b where results obtained for T = 0.4 ns have been plotted. For instance, σ φ at 0.2 ns is around 20 % smaller for the case of fixed initial conditions. The dependence of the phase statistics on the way initial conditions are chosen suggests that averages must be done in a different way in order to lose the memory of those initial conditions. We have been considering averages performed in a temporal window with the same duration than the period of the current, T. From now on we will consider longer temporal windows for calculating statistical averages. Figure 7 illustrates the situation found when averages are calculated over a window of duration 2T. Random initial conditions are considered such that 2π. Averages have been done over 2 × 10 4 2T-windows, where T = 1 ns, in order to compare with situations illustrated in previous figures. Figure 7a shows the averaged phase vs t. The drift towards decreasing values of the phase is similar to that shown in Figure 1c. Standard deviation and variance of the phase are shown in Figure 7b,c, respectively. < φ(t) >, σ φ (t) and σ 2 φ (t) during the second half of the 2T-window are basically replicas of what was found in the first half. The continuity of φ along the 2T-window makes that σ φ (t) and σ 2 φ (t) monotonously increase. However the situation is different when considering the kurtosis coefficient as Figure 7d shows. In this case, during the second half of the window κ r keeps on decreasing towards the zero value. This means that the distribution of the phase keeps on approaching to the Gaussian shape. In fact κ r = 0.22 when t = 2 ns. That approach can be illustrated by plotting the phase pdf at two different times. Figure 8 shows those distributions at times t = 0 and t = 1.1 ns. The phase at t = 0 is a U(0, 2π) random variable, similarly to Figure 5. The phase at t = 1.1 ns is approximately Gaussian as it can be seen when comparing with the Gaussian of average and standard deviation obtained from simulations. The kurtosis coefficient in Figure 8b is 0.4. Figure 8b can also be compared with the pdf obtained at t = 0.1 ns in Figure 3b because both distributions correspond to 0.1 ns after switching-on the bias current. The pdf in Figure 3b is not Gaussian while the pdf in Figure 8c is approximately Gaussian. This indicates that in order to have a phase distributed as a Gaussian it is necessary to calculate and average the phase in windows with durations of several modulation periods. In this way the memory of the initial conditions and their distribution is lost.

Discussion and Summary
In our study we have considered two types of initial conditions, corresponding to deterministic and random values of the variables. Fixed initial conditions have been considered because they have been used in previous studies of QRNG. They are not the best choice for simulation of these systems because the spontaneous emission noise, that is always present in the system, causes fluctuations in the variables of the system at all times. These include the times at which each period begins, and so initial conditions must be also random, as it is also expected in an experimental realization of the system. We have chosen these random initial values by calculating the phase angle in the [0, 2π) range that corresponds to the final value in the previous averaging window. Note that the conversion to the [0, 2π) range is necessary if a calculation of well defined statistical moments of the phase is required. If no conversion is done, not even < φ(t) > could be calculated because φ decreases in each averaging window in a magnitude of more than several 2π, as illustrated for instance in Figure 1c.
Deterministic initial conditions and phase averages over windows of T-duration have been recently used for describing the phase statistics [34]. While these conditions can give an approximation to the phase distribution and their statistical moments, our results show that it is necessary to consider averages over windows of several T-duration and random initial conditions for obtaining Gaussian statistics for the phase at the end of the averaging period.
We now briefly discuss the effect of two laser parameters, the non-linear gain and the Auger coefficients, on the standard deviation of the phase. The number of relaxation oscillation peaks increases when the non-linear gain coefficient decreases. The standard deviation of the phase at the end of the modulation period oscillates when changing I on [35]. The number of these oscillations is directly related to the number of relaxation oscillation peaks that are excited. In this way, the main effect of having a small nonlinear gain coefficient is to observe more oscillations of the standard deviation of the phase as a function of I on . The effect of the Auger coefficient is also important for describing the standard deviation of the phase. In fact we have shown that the Auger term must be considered in the carrier recombination term for achieving good agreement between experiments and theory [36].
Summarizing, we have theoretically analyzed the phase diffusion in gain-switched semiconductor lasers by performing numerical simulations of the corresponding stochastic rate equations. We have focused on the calculation of the temporal dependence of the statistical moments and distribution of the phase. We have considered several types of initial conditions for the phase. By using the temporal dependence of the kurtosis coefficient we have shown that the phase pdf becomes Gaussian only after the memory of the statistical distribution of the initial conditions is lost. We show that under the typical gain-switching with square-wave modulation used in QRNGs, the time it takes for the phase to become Gaussian is in the ns scale. We finally compared the variance of the phase obtained with random and fixed initial conditions to show that their differences are more important as the modulation speed is increased. This is precisely the situation in which faster generation bit rates are achieved when using QRNGs based on gain-switched laser diodes.

Conflicts of Interest:
The author declares no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: QRNG Quantum random number generation DML Discrete mode laser PDF Probability density function ASE Amplified spontaneous emission RNG Random number generation LED Light emitting diode