Quantum random number generators promise perfectly unpredictable random numbers. A popular approach to quantum random number generation is homodyne measurements of the vacuum state, the ground state of the electro-magnetic field. Here we experimentally implement such a quantum random number generator, and derive a security proof that considers quantum side-information instead of classical side-information only. Based on the assumptions of Gaussianity and stationarity of noise processes, our security analysis furthermore includes correlations between consecutive measurement outcomes due to finite detection bandwidth, as well as analog-to-digital converter imperfections. We characterize our experimental realization by bounding measured parameters of the stochastic model determining the min-entropy of the system’s measurement outcomes, and we demonstrate a real-time generation rate of 2.9 Gbit/s. Our generator follows a trusted, device-dependent, approach. By treating side-information quantum mechanically an important restriction on adversaries is removed, which usually was reserved to semi-device-independent and device-independent schemes.
Security analyses for trusted quantum random number generators usually consider only classical side-information. Here, the authors fill this gap by fully characterising the experimental apparatus of a homodyne-based QRNG, assuming that the vacuum fluctuations and noise are stationary and Gaussian.
Random numbers are ubiquitous in modern society1. They are used in numerous applications ranging from cryptography, simulations, and gambling, to fundamental tests of physics. For most of these applications, the quality of the random numbers is of utmost importance. If, for instance, cryptographic keys originating from random numbers are predictable, it will have severe consequences for the security of the internet. To ensure the security of cryptographic encryption, the random numbers used to generate the secret encryption key must be completely unpredictable, private, and their randomness must be certified.
True unpredictability and privacy of the generated numbers can be attained through a quantum measurement process: by performing a projective measurement on a pure quantum state, and ensuring that the state is not an eigenstate of the measurement projector, the outcome is unpredictable and thus true random numbers can be generated2. Moreover, the generated numbers can be private since a pure state cannot be correlated to any other state in the universe.
Numerous different types of quantum random number generators (QRNGs) have been devised exploiting the quantum uncertainty in photon counting measurements, phase measurements, or quadrature measurements3–5. One particular approach of increasing interest due to its high practicality is the optical quadrature measurements of the vacuum state by means of a simple homodyne detection6–8. This approach combines simplicity, cost-effectiveness, chip integrability, and high generation speed.
State-of-the art security proofs for such QRNGs assumed that the information available in the environment about the measurement outcomes, so-called side information, is of classical nature8. Recently, quantum side information was taken into account for a source-independent QRNG9–12, which however requires a more complex measurement apparatus.
Furthermore, it has been assumed in the security proof that subsequent measurement outcomes of QRNGs based on homodyning of vacuum states are uncorrelated in time. Therefore, experiments dealt with the unavoidable correlations caused by the finite bandwidth of the detection system by exploiting aliasing in the sampling procedure or by using suitable post-processing algorithms6–8,11,13–20. Such measures usually throttle the overall rate considerably or remove the correlations only partially.
A rigorous characterization of the system is of utmost importance as any parameter uncertainty introduces a non-zero probability for system failure, i.e., the probability that the actual device does not follow the stochastic model describing the underlying physical random number generation process. Knowing the failure probability for the system is critical to its certification. Previously this metrology-grade approach was used for phase fluctuation QRNGs21. This includes that imperfect analog-to-digital conversion is taken into account.
Real-time field-programmable-gate-array (FPGA) implementations of randomness extraction with Gbit/s-speed using an information theoretically secure Toeplitz randomness extractor have been demonstrated recently12,18–20,22. Previously reported QRNG implementations achieved only moderate speeds or did not extract random numbers in real time6–8,11,13–17.
Here we devise a security analysis for QRNGs based on quadrature measurements of the (trusted) vacuum state that takes quantum side information into account. Our security analysis is based on the assumptions of stationarity and Gaussianity of the involved noise processes. We include correlations of measurement outcomes in the security proof as well as the imperfections of analog-to-digital conversion. We experimentally implement the QRNG and use a conservative and rigorous approach to characterize the parameters of the stochastic model that determines the amount of randomness. To establish a conservative bound with confidence intervals on the amount of vacuum fluctuations, we devise an experimental procedure based on a measurement of the transfer function (TF) of the measuring device. Using real-time Toeplitz randomness extraction implemented in an FPGA, we achieve a rate of 2.9 Gbit/s.
A schematic of our QRNG is shown in Fig. 1. An arbitrary quadrature of the vacuum state is measured using a balanced homodyne detector comprising a bright reference beam, a nominal symmetric beam splitter, and two photo diodes23. The measurement outcomes ideally are random with a Gaussian distribution associated with the Gaussian Wigner function of the vacuum state24. The measured distribution, however, contains two additional independent noise sources: excess optical noise and electronic noise, thereby contributing two side channels. These must be accounted for in estimating the min-entropy of the source.


Schematic of the quantum random number generator.
A 1.6 mW 1550 nm laser beam was split into two by a 3 dB fiber coupler and detected by a home-made homodyne detector based on an MAR-6 microwave amplifier from Minicircuits and two 120 μm indium–gallium–arsenide photo diodes (PD). The output of the detector was amplified with another microwave amplifier, low pass filtered at 400 MHz, and digitized with a 16 bit 1-GSample/s analog-to-digital converter (ADC). The ADC output was read by a Xilinx Kintex UltraScale field-programmable gate array (FPGA). The ADC and FPGA were hosted by a PCI Express card from 4DSP (Abaco). The FPGA was used for real-time randomness extraction based on Toeplitz hashing. Random access memory (RAM) was used to store the output.
The amount of quantum randomness that can be extracted from the homodyne measurement of vacuum fluctuations is given by the leftover hash lemma against quantum side information25,26

The theoretical analysis of the security of the QRNG is made under the following assumptions:
A0 The predictions of quantum mechanics are reliable.
A1 The measurement performs homodyne detection on a single-mode and the measurement outcome is linear in the quadratures.
A2 The quantum state that is measured is a single mode thermal state with stationary mean photon number.
The analysis of the QRNG follows a device-dependent approach, which assumes that the system (and therefore the min-entropy of the source) does not change after system characterization (A2). The quantum side information comprises all information that can be extracted from the environment of the QRNG, i.e., from the rest of the universe. Therefore, under assumptions A0–A2, the bits extracted by the QRNG are random with respect to all (quantum and classical) side channels. Following A2, homodyne detection is performed on a single optical mode in a thermal state, which at a given time is characterized by the field quadratures
The physical model of our device is derived in “Methods.” There we show that our device performs the measurement

In the following, we first present a theoretical analysis of a source emitting i.i.d. (independent and identically distributed) quantum states, i.e., a source of infinite bandwidth, and an ideal analog-to-digital converter (ADC). We then extend the security analysis to imperfect ADCs. Finally, we extend to a source with finite bandwidth that emits correlated (non-i.i.d.) quantum states at different times.
Under ideal conditions, homodyne detection would allow us to measure the quadrature of a target optical mode, which in our setting is in the vacuum state. However, as discussed in detail in “Methods,” because of experimental imperfections, this vacuum signal is mixed with noise. Therefore, the non-ideal homodyne detector measures the quadrature
We require the random numbers to be statistically independent of any quantum or classical side information. Therefore, we need to analyze the correlations between the measured system S and its environment E. Following A0, the joint state of S and E is necessarily a pure state, ψSE, as the combined system SE is by definition isolated27. There exist infinitely many purifications ψSE of the thermal state ρS. However, these purifications are all equivalent up to local unitary transformations in the environment E, and thus they all have the same information content27. To perform our theoretical analysis, it is therefore sufficient to consider any of these purifications. We choose the two-mode squeezed vacuum (TMSV), which is a two-mode Gaussian state that purifies the thermal state24. The environment E is thus described by a single bosonic mode.
The outcome X of homodyne detection on a thermal state with mean photon number n is a continuous real-valued variable, whose probability density distribution is


In our QRNG, the continuous variable X is mapped into a discrete and bounded variable

The correlations between the discretized outcome


We will now quantify the rate of the QRNG in terms of the conditional min-entropy with quantum side information. Given the state

In “Methods,” we compute a lower bound on this quantity following a particular choice for γE. The final result (which includes an optimization over the gain g—see “Methods” for the unoptimized result) is



The above result assumed an ADC without digitization errors and noise. However, those imperfections reduce the extractable min-entropy. Given the true digitization outcome j, the noise replaces it with a different, possibly random, output f. For any given f, we count up to M possible true values j that map into f. In “Methods,” we show that this reduces the min-entropy by at most

We now consider the more realistic scenario of finite bandwidth. In the experimental implementation, the finite detection bandwidth, described by the impulse response of the detector, defines the temporal mode of the measured quantum state. Correlations arise due to the temporal overlap of the different modes. The process is still stationary and Gaussian (A2), however, not i.i.d. Here we use theoretical tools from information theory29 and signal processing30 to analyze this stationary Gaussian process. We first obtain a virtual i.i.d. model for the non-i.i.d. process. Then we apply the results of the previous section to compute a lower bound on the min-entropy with quantum side information of said virtual i.i.d. model.
The analysis deals with two stochastic processes. One is the outcome X of the homodyne measurement. The second stochastic process, denoted as U, describes the excess noise, i.e., all fluctuations in the measurement that are not purely vacuum fluctuations, including electronic noise of the detector and intensity noise of the local oscillator laser. Both X and U are stationary and Gaussian processes (A2). When a measurement is performed at a given time t, the homodyne outcome is denoted as Xt. Similarly, we denote as Ut the excess noise at time t.
The homodyne measurement outcome Xt comprises several components. Part of it comes from pure vacuum fluctuations and part comes from the excess noise. However, because of the finite bandwidth, Xt also contains a component that is determined by past measurement outcomes, denoted as X<t. The component from past measurement outcomes is considered as side information.
We write the variance of Xt as
Let us first consider the stochastic process X. Given the time series of measured values




Because of the finite bandwidth of the measuring apparatus, both the homodyne outcome Xt and excess noise Ut, at a given time t, are correlated with their values at previous times. To filter out the effects of these correlations, we consider the probability density distribution of Xt, conditioned on all past homodyne measurement outcomes,



In summary, we have defined an effective i.i.d. model for the non-i.i.d. signal. The i.i.d. model is characterized by the parameters n and g in Eq. (18). To determine these parameters, we need a second equation in addition to Eq. (18). Such a second equation is obtained through the conditional variance of the excess noise.
For the excess noise Ut, we can similarly write the probability density distribution conditioned on past values, i.e.,


By inverting Eqs. (18) and (21), we obtain the parameters n and g of the i.i.d. model of the non-i.i.d. process,



In conclusion, we use this virtual i.i.d. model to compute a lower bound for the min-entropy of the non-i.i.d. process, where the values for g and n in Eq. (3) are given in Eq. (22) and (24), respectively. In turn, this allows us to estimate the min-entropy rate using Eq. (9) (see also Eqs. (62) and (67) in “Methods”). This is plotted in Fig. 2 for varying excess noise, ADC resolution, and temporal correlations. The x-axis of the plot is the ratio of the conditional variance of the vacuum fluctuations and the excess noise, i.e., the quantum noise to excess noise ratio of the virtual i.i.d. process. If, as assumed for the plot in Fig. 2, the homodyne measurement outcomes and the excess noise have similar temporal correlations, this ratio is independent of the amount of correlations. The amount of correlations present in the system is instead characterized by the ratio


Min-entropy versus the conditional quantum signal-to-noise ratio.
Min-entropy for 8-, 12-, and 16-bit analog-to-digital converter (ADC) resolution versus the ratio of conditional variance of the vacuum fluctuations and the conditional variance of the excess noise,
Similar to the result for classical side information8, we show that random numbers can in principle be generated for noise treated as quantum side information as well and even in the large excess noise regime. This is due to the fact that relatively small vacuum fluctuations can give a substantial contribution to the entropy if the ADC resolution is sufficiently high. This property is preserved even when a large amount of temporal correlations is present in the recorded data (lower traces in Fig. 2). However, as discussed below, increasing the precision may not necessarily lead to an increase in the min-entropy in the presence of digitization errors.
To be able to apply the theoretical result obtained above to our experimental implementation, we need to provide evidence that our implementation indeed fulfills the assumptions. This is in fact a difficult task and a detailed discussion can be found in “Methods.”
We are now in a position to estimate the min-entropy through characterization of our set-up. According to the theoretical analysis, the min-entropy can be found by determining the variance σ2 as well as the conditional variances of the homodyne measurement outcomes
The first two parameters σ2 and
To establish a lower bound on fvac(λ), we basically consider the homodyne detector as a box (see Fig. 3a) with a quantum state input and an input–output relation given by Eq. (2) with unknown parameters. Our strategy is thus to measure the TF of the box by probing it with known quantum states and to use this result to conservatively calibrate the PSD of the vacuum fluctuations. This method allows us to establish a lower bound on the vacuum fluctuations under all experimental conditions, in particular where other noise sources couple into the detector, e.g., intensity noise of the laser due to imperfect common-mode rejection or stray light coupling into the signal port—likely to be an issue with integrated photonic chips.


Characterization of the transfer function of the detection system to obtain the vacuum fluctuation noise level.
a Experimental set-up for the characterization. VATT variable optical attenuator, PD photo diode, ADC analog-to-digital converter, FPGA field-programmable gate array, RAM random access memory. b Power spectrum from a typical measurement. The transfer function is determined by the amplitude of the beat note. c Transfer function of the homodyne detector and the electronics including the analog-to-digital converter. Inset: transfer function with linear frequency scale.
The TF of the box is measured by injecting a coherent state in the form of a second laser beam (independent of the local oscillator laser) with low power Psig into the signal port of the beam splitter as displayed in Fig. 3a. A typical beat signal is shown in Fig. 3b obtained by computing an averaged periodogram from the sampled signal. We record the TF(ν) by scanning the frequency of the signal laser. At each difference frequency ν, we determine the power of the beat signal and normalize it to Psig. At high signal-to-noise ratio, the root-mean-square power of the beat signal is purely a function of the coherent state amplitude (determined by the signal laser power). It is independent of the noise of the detector, since the second term in Eq. (2), the noise term, can be neglected. The first term depending on the quadrature operator
Since the vacuum noise was amplified to optimally fill the range of the ADC, we used a 20-dB electrical attenuator with flat attenuation over the frequency band of interest to avoid saturation, see Fig. 3a. The result of the TF characterization, normalized to a maximum gain of 1, is shown in Fig. 3c.
Given the linearity of the detector (A1), we obtain the PSD of the vacuum fluctuations by multiplying the TF(ν) with the shot noise energy
The conservatively estimated PSD of the vacuum fluctuations is shown in Fig. 4a together with the actually measured PSD of the signal. The spectra are clearly colored which indicates that the data samples are correlated and therefore non-i.i.d. This is further corroborated in Fig. 4b, where the autocorrelation of the homodyne measurement outcomes is plotted. It justifies the importance of using the min-entropy relation associated with non-i.i.d. samples.


Experimental results.
a The figure shows the power spectral densities (PSDs) of the measurement outcomes, the calibrated vacuum fluctuations (obtained by the system characterization), and the excess noise (obtained by subtracting the PSD of the vacuum fluctuations from the PSD of the measurement outcomes). b Autocorrelation coefficients calculated from the measured samples and averaged 1000 times. The inset shows a zoom. c Relative frequency of the digitization error of the analog-to-digital converter (ADC) with respect to the digitization results. The non-linearity and digitization noise of the ADC leads to a large reduction of the min-entropy.
From the PSDs, we calculate the three parameters for obtaining the min-entropy, which are summarized in Table 1. By minimizing the min-entropy over the confidence set of the estimated parameters, we obtain 10.74 bit per 16-bit sample with a failure probability of ϵPE = 10−10 (i.e., the probability that the actual parameters are outside the confidence intervals) under the assumption of an ideal ADC.

| Parameter | Value |
|---|---|
| σ2 | 3.96 × 107 ± 0.09 × 107 |
| 3.29 × 107 ± 0.07 × 107 | |
| 2.49 × 107 ± 0.06 × 107 | |
| Conditional quantum to excess noise ratio | −4.9 dB |
| Temporal correlations | 0.83 |
| Min-entropy, ideal ADC | 10.74 bit |
| Reduction due to ADC digitization error | 7.23 bit |
| Min-entropy | 3.51 bit |
| Calculated secure length | 1027 bit |
| Extracted length | 1024 bit |
Finally, we characterized the digitization error of our ADC, which is shown in Fig. 4c. The measurement protocol is described in Supplementary Note 3. The reduction of the min-entropy due to the digitization error is 7.23 bit with a confidence of 2 × 10−6 as 500,000 measurements have been used to construct the histogram for each digitization result. Thus this yields a total min-entropy of 3.51 bit. This relatively large reduction is due to the fact that our ADC is four-way interleaved and has a large analog bandwidth.
We have demonstrated a QRNG based on the measurement of vacuum fluctuations with real-time extraction at a rate of 2.9 Gbit/s and security against quantum side information. Our QRNG has a strong security guarantee with a failure probability of
We chose ϵhash = 10−32 to keep
Due to the choice of a very small ϵhash, the real-time speed of our QRNG was limited to 2.9 Gbit/s by the input size of the Toeplitz extractor required by our FPGA implementation. Without limitations to the matrix size, a speed of 3.5 Gbit/s could be reached. The main limitation to the available min-entropy is the ADC digitization error.
Our QRNG is suited for use in high-speed QKD links, for instance, in GHz clocked discrete variable33 as well as in high-speed continuous-variable QKD (CVQKD)34. For Gaussian-modulated CVQKD, the uniform random number distribution has to be converted to a Gaussian distribution, which requires a larger random number generation rate. Furthermore, QKD requires composable security and a guarantee of privacy of the random numbers as provided by our system.
Further developments to guarantee reliable operation over a long time and to fulfill requirements by certification authorities would need to include power-on self-tests and online testing of the parameters in the security analysis as well as the generated random numbers. Finally, the removal of the Gaussianity and stationarity assumptions in the security analysis, which are in practise difficult to verify, would further strengthen the security of the QRNG.
Here we will develop a physical model of the QRNG using a description of optical modes by annihilation and creation operators in the Heisenberg picture35. A schematic of our detector depicting the involved modes and parameters is shown in Fig. 5. Mode operators


Physical model of the QRNG showing the involved modes.
The local oscillator described by the mode
The local oscillator laser mode
The modes that are detected by photo detection are given by


After subtraction and amplification, we obtain










The homodyne detection circuit implements a high-pass filter that removes the first term, which is constant. For an ideal homodyne detector, with Δ = 0 and η1 = η2 = 1, the output current of the detector reduces to


The finite bandwidth of the detector can be modeled by its impulse response hamp, which is the Fourier transform of its frequency response. The output voltage is then given by

In our calibration method, described in the main text, we replace the vacuum state in the signal mode
Consider a single optical mode characterized by the quadrature operators



As discussed above, the measured state ρS is purified into a TMSV. Thereby the second optical mode of this TMSV state, characterized by the field quadratures


The correlations between the outcome X of ideal homodyne detection and the quantum side information in its environment are described by the CQ state



The continuous variable X is mapped into a discrete and bounded variable




In terms of the discrete variable


We are now ready to quantify the rate of the QRNG in terms of the conditional min-entropy. Given the state

Since a direct computation of the min-entropy is not feasible, as it requires an optimization over all density operators γE in an infinite-dimensional Hilbert space, we instead focus on finding a computable lower bound. A first lower bound on the min-entropy is obtained by computing



A second lower bound is obtained by applying the triangular inequality,



Since

To simplify the notation, we define





We hence obtain



Let us define the function


In conclusion, the best lower bound on the conditional min-entropy is

ADCs are not ideal devices and are subject to digitization error. We model the digitization error by introducing:
A classical noise variable N, with associated probability distribution pN;
A function f that describes how the noise variable i combines with the noiseless output value j to produce the noisy output f = f(j, i).
Using this model, the quantum side information about the output of the noisy ADC is described by the CQ state

We want to ensure that the randomness extracted is also independent on the noise variable N, therefore, we compute the min-entropy conditioned on EN,



Putting


It is difficult to estimate Sf∣i without making further assumptions on the noise underlying the ADC. However, we can experimentally estimate the cardinality ∣Jf∣ of the set Jf. Note that Jf contains Sf∣i for all i. We can then write a computable bound in terms of ∣Jf∣:





In conclusion, when compared with an ideal noiseless ADC, the randomness is reduced by at most b bits, with
An integral part is the verification that our implementation indeed fulfills the assumptions made in the theoretical analysis of the QRNG.
The physical model above verifies that our detector indeed performs homodyne detection.
The condition of the measurement of a single mode are given due to the following arguments: The local oscillator laser has a side-mode suppression of >70 dB and therefore operates in a single frequency mode. The local oscillator furthermore defines the polarization and the spatial properties (given by the single mode fiber) of the measured mode. The temporal properties are given by the impulse response of the homodyne detector and the following electronic circuits.
The linearity of our detector has been tested by connecting the output to an electrical spectrum analyzer instead of the ADC. Varying the power of the signal laser in the TF calibration set-up, see Fig. 3, we verified its linear operation. We note that the linearity of the output of the homodyne detection circuit before it is sampled by the ADC is the important figure of merit. Nonlinearities introduced by the ADC are taken into account separately by the ADC characterization.
The excess noise in the thermal state stems from relative intensity noise of the laser and the electronic noise of the homodyne circuit. Both are independent of the phase between local oscillator and the measured quantum state and can therefore be modeled as phase invariant state.
Having established the phase invariance of the measured state, we verify the Gaussianity of the measured signal. This can only be shown approximately and is displayed in Fig. 6a where we show the probability quantiles of the measured samples and compared those to the theoretical quantiles of a Gaussian distribution. This completes the verification of the assumption in the security proof that a thermal state is measured.


Verification of assumption A2.
a Quantile–quantile plot indicating the Gaussianity of the measured samples. The variance of the samples has been normalized to 1. The limited analog-to-digital converter range truncates the tails of the Gaussian distribution, which results in slight deviations from the theoretical quantiles toward the ends. b Overlapped Allan deviation of vacuum state measurements. The stationarity condition is fulfilled when the experimental points follow the theory curve, which is the case until about 1000 s where it starts to deviate.
We are left with that the mean photon number of the thermal state shall be stationary. Also this can only be proven approximately. We computed the overlapped Allan deviation of the measurement outcomes, which is shown in Fig. 6b. It is clearly visible that in the short term the noise processes are stationary. Over longer times, some fluctuations become evident, which could lead to a lower min-entropy at times than estimated. A power stabilization of the local oscillator laser could improve this figure of merit. We, however, leave this investigation for future work.
Having calculated the min-entropy, the next step is to extract random numbers. This is done by using a strong extractor based on a Toeplitz matrix hashing algorithm in which the seed can be reused38. We chose matrix dimensions of n = 5632 bits and m = 1024 bits, which corresponds to 352 input samples with a depth of 16 bit and an output length m < l, chosen such that Eq. (1) was fulfilled with
Further information on research design is available in the Nature Research Reporting Summary linked to this article.
Supplementary information is available for this paper at 10.1038/s41467-020-20813-w.
The authors acknowledge support from the Innovation Fund Denmark through the Quantum Innovation Center, Qubiz. T.G., A.K., D.S.N., N.J., and U.L.A. acknowledge support from the Danish National Research Foundation, Center for Macroscopic Quantum States (bigQ, DNRF142). T.G., N.J., S.P., and U.L.A. acknowledge the EU project CiViQ (grant agreement no. 820466). C.L. was also supported by the EPSRC Quantum Communications Hub, grant no. EP/M013472/1. The authors thank Alberto Nannarelli for valuable discussions.
T.G., T.B.P., and U.L.A. conceived the idea. T.G. and U.L.A. supervised the project. C.L. and S.P. performed the security analysis with input from T.G. and A.K. T.G., A.K., and N.J. conceived and implemented the experiment. T.G. acquired the final data and performed data analysis. D.S.N. and T.R. implemented the randomness extraction algorithm on FPGA under the supervision of T.G. T.B.P. was responsible for the implementation of the NIST randomness tests.
All experimental data are available from the authors upon reasonable request.
All codes are available from the authors upon reasonable request.
The authors declare no competing interests.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.