quantum random number genaration based on - upcommons
TRANSCRIPT
universitat polit
`
ecnica de catalunya
and
institut de ci
`
encies fot
`
oniques de catalunya
degree thesis
Quantum Random NumberGeneration Based On Vacuum Field
Fluctuations
Author:
Carlos abellan
Supervisor:
Prof. Antonio acin
Cosupervisors:
Prof. Valerio pruneri
Prof. Morgan mitchell
Ph.D. Waldimar amaya
Ph.D. Marc jofre
A thesis submitted in fulfillment of the requirements
for the degree of Telecommunication Engineering
in the
Universitat Politecnica de Catalunya
ETSETB
September 2013
ii
universitat polit
`
ecnica de catalunya
Abstract
Quantum information theory group
Optoelectronic group
ICFO
institut de ci
`
encies fot
`
oniques de catalunya
Telecommunication Engineering
Quantum Random Number Generation Based On Vacuum Field
Fluctuations
by Carlos abellan
Random numbers are extensively used in a broad range of applications. Never-
theless, there are two main markets from a commercial point of view: (i) secure
communications and (ii) stochastic simulation. According to the generation rate
and quality of the random numbers required, di↵erent approaches have been used
so far, most of them based on pseudo-random number generation. However, these
type of generators have already started showing weakness both in the quality and
the generation rate. Thus, novel techniques based on physical processes are being
studied and used nowadays.
In this work an ultra-fast random number generator based on quantum vacuum
fluctuations is demonstrated. Not only assuring the intrinsic randomness of quan-
tum mechanics, but also being compliant with the speed needs of current appli-
cations. Employing a DFB laser diode in gain-switched mode and interferometry,
the random phase generated in spontaneous emission events is translated into ran-
dom amplitudes easily measurable using o↵-the-shelf components, i.e. measuring
a quantum phenomena in a macroscopic way. Thus, using established models of
semiconductor lasers, we predict a regime of high-visibility interference and nearly
complete vacuum-fluctuation-induced phase di↵usion between pulses. These predic-
tions are confirmed by measurement of pulse amplitude statistics at the exit of the
interferometer.
Keywords: phase di↵usion, semiconductor lasers, quantum random number
generation, quantum key distribution, stochastic simulations, phase noise,
randomness extraction
universitat polit
`
ecnica de catalunya
Resum
Quantum information theory group
Optoelectronic group
ICFO
institut de ci
`
encies fot
`
oniques de catalunya
Enginyeria en telecomunicacions
Generacio de nombres aleatoris basat en fluctuacions del buit quantic
per Carlos abellan
Tot i que els nombres aleatoris son necessaris en un gran nombre d’aplicacions, hi
ha dos grans sectors on son fonamentals: (i) comunicacions segures i (ii) simulacions
estocastiques. Durant els anys, i dependent de la qualitat i la tasa de generacio
requirides, diferents tecniques s’han anat fent servir, la majoria d’elles basades en
generadors pseudo-aleatoris. Malauradament, alguns d’aquests generadors ja estan
comencant a mostrar patrons. Degut a aixo, la millora que es proposa es substi-
tuir els codis informatics que generen els nombres aleatoris per magnituds fısiques
intriınsecament aleatories.
En aquest treball es presenta un generador de nombres aleatoris basat en les fluctua-
cions del buit quantic. Aquest generador, a part de la aleatorietat que ens asegura
el principi quantic en el que esta basat, tambe satisfa les necesitats de velocitat de
qualsevol aplicacio actual. La proposta es basa en mesurar la incertesa de les fluc-
tuacions del buit quantic d’un mode macroscopic, i que per tant, permet un diseny
senzill fent servir dispositius comercials de telecomunicacions. Usant un diode laser
semiconductor DFB en mode gain-switching i interferometria, les fases aleatories
generades per emissio espontanea es converteixen en amplituds aleatories facilment
detectables. Regims de gran visibilitat, aixı com una difussio de la fase gairebe com-
plerta, son predits usan models establerts. Aquestes prediccions son confirmades
amb mesures a la sortida de l’interferometre.
Paraules clau: Di↵usio de la fase, lasers semiconductors, generacio quantica de
nombres aleatoris, distribucio de clau quantica, simulacions estocastiques, soroll de
fase, extraccio d’aleatorietat
universitat polit
`
ecnica de catalunya
Resumen
Quantum information theory group
Optoelectronic group
ICFO
institut de ci
`
encies fot
`
oniques de catalunya
Ingenierıa en telecomunicaciones
Generacion de numeros aleatorios basado en fluctuaciones del vacıo
cuantico
por Carlos abellan
A pesar de que hay un sinfın de aplicaciones que requieren de numero aleatorios,
hay dos sectores donde son imprescindibles: (i) comunicaciones seguras y (ii) sim-
ulaciones estocasticas. Con el paso del tiempo, y dependiendo de la calidad y la
tasa de generacios necesitada, varias tecnicas se han ido usando, la mayorıa de ellas
basadas en generadores pseudo-aleatorios. Desafortunadamente, algunos de estos
generadores estan empezando a mostrar patrones predecibles. Consecuentemente,
la mejora que se propone es substitutir los codigos informaticos que generan numeros
aleatorios por magnitudes fısicas intrınsecamente aleatorias.
En este trabajo se presenta un generador de numeros aleatorios basado en las fluc-
tuaciones del vacıo cuantico. Estos generadores, ademas de la aleatoriedad que nos
asegura el principio cuantico en el que esta basado, tambien satisfacen las necesi-
dades de velocidad de cualquier aplicacion actual. La propuesta se basa en medir la
incertidumbre de las fluctuaciones del vacıo cuantico de un modo macroscopico, y
que por tanto, permite un diseno sencillo usando dispositivos comerciales de teleco-
municaciones. Usando un diodo laser semiconductor DFB en modo gain-switching i
interferometria, las fases aleatorias generadas por emision espontanea se convierten
en amplitudes aleatorias macroscopicamente detectables. Regimenes de gran visibil-
idad, ası como una difusion de la fase casi completa son previstos usando modelos
establecidos. Estas predicciones se confirman con medidas a la salida del inter-
ferometro.
v
Palabras clave: Difusion de fase, lasers semiconductores, generacion cuantica de
numeros aleatorios, distribucion de clave cuantica, simulaciones estocasticas, ruido
de fase, extraccion de aleatoriedad.
Acknowledgements
I would like to thank everyone who helped me and contributed in this project.
Without their help, it would have never been fulfilled. I am merrily indebted to
them.
First of all, I must thank my supervisors Prof. Antonio Acin, Prof. Valerio Pruneri
and Prof. Morgan Mitchell for helping me in every stage of this thesis. Specially,
to Prof. Antonio Acin for giving me the opportunity to carry out my project at
ICFO and his support in pursuing my own ideas, to Prof. Valerio Pruneri for giving
me responsibilities and trusting me for the journey to Japan and to Prof. Morgan
Mitchell for his permanent support in all aspects of the project and his ability to let
you learn by your own. Furthermore, I am also deeply indebted with Ph.D. Waldimar
Amaya, whom I have had the pleasure to work with daily, learning priceless tips on
experimental issues, and with Ph.D. Marc Jofre for transferring me all his knowledge
on quantum random number generation.
In addition, working at ICFO surrounded for researchers in such a di↵erent fields,
makes the work much simpler when drawbacks come up. Thus, I would like to thank
the electronic workshop, the mechanical workshop and the IT team, as well as all
colleagues at ICFO who have contributed with their work to the accomplishment of
this project. Also, I cannot forget to mention Prof. Jose Capmany, who let us use
his laboratories for all high-speed measurements.
Moreover, I have an special thanks for all those exceptional, not only researchers,
but also friends, who have strongly contributed in kidding me and making work
more bearable.
Last, but no least, these words go to my family and life-friends, whose support during
these last 23 years have been extremely decisive for the accomplishment not only of
this project but also the degree.
vi
Contents
Abstract, Resum, Resumen i
Acknowledgements vi
List of Figures ix
1 Introduction 1
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 State-of-the-art . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Main results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Theoretical background 4
2.1 Laser Physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.1 Principal mechanisms of radiative transistions . . . . . . . . . 4
2.1.2 Gain and stimulated emission for a Fabry-Perot type laser . . 6
2.1.3 Distributed feedback laser diode . . . . . . . . . . . . . . . . 8
2.2 Theory of linewidth of semiconductor lasers. Henry’s enhancementfactor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.1 Experimental determination of the linewidth enhancement pa-rameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.2 Spontaneous emission enhancement factor. Petermann’s Kfactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3 Interference and visibility . . . . . . . . . . . . . . . . . . . . . . . . 15
2.4 Randomness extractors . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.4.1 Min-entropy and extraction . . . . . . . . . . . . . . . . . . . 18
2.4.2 Hash function as an extractor . . . . . . . . . . . . . . . . . . 18
3 Quantum random number generation from vacuum field amplifica-tion 20
3.1 Randomness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2 Measurements at the UPV . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3 System configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
vii
Contents viii
3.4 Theoretical background . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.5 Characterization of the coherence of the optical pulses . . . . . . . . 24
3.6 Raw data analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.7 Quantum entropy quantification and min-entropy calculation . . . . 27
3.7.1 Randomness extraction . . . . . . . . . . . . . . . . . . . . . 29
3.8 NIST tests - statistical analysis . . . . . . . . . . . . . . . . . . . . . 30
3.9 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4 Field demonstration. 34
4.1 Prototype at 127 MHz . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.1.1 Digitizer card. Agilent U1084A . . . . . . . . . . . . . . . . . 35
4.1.2 Field demonstration at NIFS . . . . . . . . . . . . . . . . . . 37
4.1.3 Fortran/C++ compatibility . . . . . . . . . . . . . . . . . . . 38
4.1.4 Measurements and results . . . . . . . . . . . . . . . . . . . . 38
4.2 Alternative pulse generation using step recovery diodes. Prototype at1 GHz. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.3 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5 Conclusions 42
A Estimators. Errors on quantities due to finite sequence size. 44
B Detailed data analysis 47
C Parities. The simplest randomness extractor. 53
D Quantum entropy quantification. 56
E Algorithm to compute the correlation of discontinuous sets of data 63
Bibliography 65
List of Figures
2.1 Fabry-Perot spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 DFB periodic structure . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 DFB laser diode spectrum. Interal extra phase shift e↵ect. . . . . . . 10
2.4 Phase and intensity fluctuations due to spontaneous emission events 11
2.5 Phase variance and non linearities e↵ects . . . . . . . . . . . . . . . 14
2.6 Randomness extractors. . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.1 Setup at the UPV . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Electrical and optical pulses . . . . . . . . . . . . . . . . . . . . . . . 22
3.3 Experiment setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.4 It is shown the setup depicted in the schematic of Fig. (3.3. Randomamplitudes at the output of the DFB laser diode are photo-detectedand sampled using a high-bandwidth sampling oscilloscope. . . . . . 23
3.5 Slow phase fluctuations introduced by the MZI. . . . . . . . . . . . . 25
3.6 Raw data statistics. Histogram and correlation. . . . . . . . . . . . . 27
3.7 Notes on measurements. Using the same dynamic range. . . . . . . . 29
3.8 Hashed autocorrelation functions . . . . . . . . . . . . . . . . . . . . 30
3.9 Results of applying the NIST test battery . . . . . . . . . . . . . . . 32
4.1 Prototype scheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.2 Digitizer. Agilent U1084A. . . . . . . . . . . . . . . . . . . . . . . . 36
4.3 Asynchronism between trigger and sampling clock . . . . . . . . . . 36
4.4 Prototype for Japan . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.5 Output histogram in a real time execution . . . . . . . . . . . . . . . 38
4.6 The step recovery setup . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.7 Pulse generation using an step recovery diode . . . . . . . . . . . . . 40
4.8 Prototype at 1 GHz . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
B.1 Correlation before compensation. . . . . . . . . . . . . . . . . . . . . 48
B.2 Correlation before compensation. Linear. . . . . . . . . . . . . . . . 49
B.3 Window-dependent oscillatory correlation function. Period: 100 sam-ples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
B.4 Window-dependent oscillatory correlation function. Period: 50 samples. 49
B.5 Acquisition procedure. Time window e↵ect. . . . . . . . . . . . . . . 49
B.6 Linear decrease dependence with position within the file . . . . . . . 50
B.7 Comparison between compensated and non-compensated correlation. 50
B.8 Comparison between compensated and non-compensated correlation. 50
B.9 Correlation after randomness extraction. . . . . . . . . . . . . . . . . 51
ix
List of Figures x
B.10 Correlation after randomness extraction. Linear axis. . . . . . . . . . 51
B.11 Correlation with amplitude compensation and no samples mixture. . 51
B.12 Correlation with amplitude compensation and no samples mixture.Linear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
C.1 1-bit parity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
C.2 2-bit parity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
C.3 4-bit parity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
D.1 Algorithm to recover the distribution of the phase. . . . . . . . . . . 60
D.2 E↵ect of the standard deviation of a gaussian distribution x on thedistribution of cosx . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
To my family and to Albert
for showing me what fight
actually means.
The reality we can put into words
is never reality itself.
Werner Heisenberg
Chapter 1
Introduction
1.1 Motivation
Random numbers are extensively used in a broad range of applications. There are
two main markets from a commercial point of view: (i) secure communications [1, 2]
and (ii) stochastic simulation [3]. According to generation rate and quality of random
numbers, di↵erent approaches have been used so far, most of them based on pseudo-
random number generation. However, these type of generators have already started
showing weakness both in the quality and the generation rate. Thus, novel techniques
based on physical processes are being studied and used nowadays.
In this work, and following recent research activities, an ultra-fast random number
generator based on quantum vacuum fluctuations is demonstrated.
1.2 State-of-the-art
Random number generators (RNG) have been extensively studied by di↵erent groups
because of the wide spectrum of its applications: secure communications [1], stochas-
tic simulation [3] and gambling [4], among others.
The First RNG were based in algorithms and number theory and are known as
pseudo RNG (PRNG). The main drawback of PRNGs is that, sooner or later, they
show repetitions patterns. In order to improve PRNGs, di↵erent techniques based
in taking as input some physical property, thought to be random by itself, have
been proposed. These RNGs are known as true RNGs (TRNG). Some examples
of physical properties already used are: electronic and thermal noise [5], chaotic
1
Introduction 2
semiconductor lasers [6] or from amplified spontaneous emission signals [7]. There
is a third type of RNG, known as quantum RNG (QRNG). In QRNG, the phys-
ical property used is a quantum phenomenon. For instance, the measurements of
radioactive decay [8], two-path splitting of single photons [9], photon number path
entanglement [10], measurement of the phase noise of a laser [11, 12, 13], or genera-
tion time or photons counting [14]. All of them are reliable sources of randomness,
nevertheless, they have some impairments: low bit rate [11, 15], inability to separate
true randomness from classical noise introduced by measurement devices [7], non-
telecom wavelengths where optical components are not o↵-the-shelf and thus more
expensive [6], or truly certified quantum randomness but at the cost of complex-
ity [16].
Using a quantum e↵ect as the randomness source not only provides truly random
numbers, also assures the impossibility of finding a model for the physical process
generating the signal. While TRNG based on classical e↵ects are founded in compu-
tational limitations or physical principles not modelled yet, as thermal noise, QRNG
o↵ers unconditional random generation.
Recently, [12] and [13] reported quantum random number generation using fluctu-
ations of vacuum field. In [12] a QRNG rate up to 1.1 Gbps was demonstrated
and in [13], 6 Gbps QRNG rate. The main di↵erence is that Jofre et al. strongly
modulate the laser diode macroscopically measuring phase changes, and Xu et al.
directly detect phase fluctuations in an above-threshold continuous wave working
regime. The phase of the electric field must di↵use completely between subsequent
samples, therefore, as the phase di↵usion process is much faster in below threshold
working regime, we choose the first method because, theoretically, higher bit rates
could be achieved.
In this paper, using Jofre et al. scheme, we improve the speed up to 40 Gbps by
using a higher bandwidth laser diode and a faster modulating system. Also, we
propose a new technique to extract the quantum contribution to the randomness
from a U-like probability distribution function.
1.3 Outline
In Chapter 2, it is summarized the theory to understand quantum random number
generation is summarized. Mainly, introduction to atomic transitions, brief study of
the DFB laser diode and detailed explanation of the theory of the linewidth enhance-
ment in semiconductor lasers, which is the fundamental theory to understand the
Theoretical background 3
process. Furthermore, randomness extraction and min-entropy are also introduced.
In Chapter 3, it is described a quantum random number generator. All results
are submitted to optics express. All calculations and extended explanations of the
results in this chapter are detailed in the Appendices. In Chapter 4 is presented a
prototype which was tested at the National Institute For Fusion Sciences in Japan.
All quality requirements were achieved and the generator was successfully tested.
Finally, in Chapter 5 several conclusions on the project are withdrawn and future
work is presented.
1.4 Main results
The main contributions of this project on the topic of quantum random number
generation based on vacuum field amplification are:
• Detailed physical analysis of the phase di↵usion process. We have demon-
strated that bit rates up to 200 Gbps could be achieved using our approach,
i.e. using gain switching techniques.
• An experimental demonstration at 40 Gbps.
• Statistical analysis of the process. Quantification of the randomness arising
from the phase produced by fluctuations of vacuum field.
• An algorithm to compute the correlation of discontinuous sets of data. Also
valid to compute long correlations in a cheap computational way.
• A working prototype at 500 MHz.
Chapter 2
Theoretical background
2.1 Laser Physics
Laser diodes represents a key element for all electro-optical current technologies, for
instance optical communications or ultra-precise sensors, among others. ’Laser’ is
an acronym that stands for ’Ligth Amplifications by Stimulated Emission of Radia-
tion’. Its theory have been developed during the second half of 20th century and its
applications are being daily shown to be fundamental in a wide range of applications,
for example quantum random number generation, as demonstrated in this work. In
this chapter are briefly explained some properties of the laser diode required for
the random number generation, particularly for under-threshold biased single-mode
distributed feedback (DFB) laser diodes.
2.1.1 Principal mechanisms of radiative transistions
This section is based on [17, 18, 19]
In this section are detailed the principal mechanisms of radiative transitions in a
direct semiconductor using the two-level atom approximation. The high energy level
or excited state is known as conduction band and the low energy level or ground
state is labeled as valence band. The energies are EC and EV respectively being
Egap = EC � EV the bandgap of the semiconductor. Assuming that the energy
must hold, atom transitions between the excited and the ground state give rise to
or absorb a photon with energy ~! = Egap.
4
Theoretical background 5
Taking into account the atom-field interaction of an specific oscillating state, three
kinds of transitions occur: (i) Spontaneous emission, (ii) Absorption and (iii) Stim-
ulated emission. Transition probabilities between atomic levels depends on the elec-
tron population in each level and the Einstein coe�cients.
Spontaneous emission is the decay of an atom from the excited state to the ground
state resulting in the emission of a photon with an energy E2 - E1. This natural
decay was predicted by Einstein and repeatedly studied during years by di↵erent
authors and from di↵erent approaches. The main results extracted from all these
works [19] is that spontaneous emission is a consequence of the interaction between
atoms and the so-called vacuum field 1.
Then, imagine a system with N2 atoms prepared in the excited state and no external
field interacting with them. After a certain time, atoms will start randomly decaying
to the ground state emitting incoherent photons. The evolution of the number of
atoms in the excited state can thus be described by
N2(t) = �A21N2(t), (2.1)
where A21 is the Einstein coe�cient for the spontaneous emission. The Einstein A21
coe�cient depends on the properties of the material and is inversely proportional to
the average atom decaying time.
On the other hand, the process of absorption is the promotion of an atom from
the ground to the excited state by absorbing the energy from an incoming photon.
This absorbed energy must be su�cient to jump to the excited state, as postulates
the photoelectric e↵ect, therefore, not all the incident photons will be absorbed, just
the part of the spectrum above the bandgap of the material. The rate of absorption
transitions per unit time can be written as
N1(t) = �B!12N1(t)u(!), (2.2)
where N1(t) is the number of atoms in the ground state at time t, B!12 is the Einstein
B coe�cient for the transition, which depends on the radiation, and u(!) is the
spectral energy density of the incident radiation.
These pair of transitions are quite intuitive, but Einstein realized that the analysis
was incomplete, so he introduced the stimulated emission, which describe the process
in which an electron in the excited state decays to the ground state induced by an
1The vacuum field is described by a continuous of modes in an infinite cavity and interact withmatter even in vacuum conditions.
Theoretical background 6
incoming photon of angular frequency !. The generated photon due to the electron
that decays has the same frequency ! as the incident photon. In analogy with Eq.
(2.2) we can write for the stimulated emission rate
N2(t) = �B!21N2(t)u(!). (2.3)
Taking all the processes into account, it turns out that,
N2(t) = �A21N2(t)�B!21N2(t)u(!) +B!
12N1(t)u(!). (2.4)
In thermal equilibrium, i.e. N2(t) = 0, the rate of upward transitions due to absorp-
tion exactly balance the rate of downward transitions due to spontaneous emission
as well as stimulated emission. In order to light amplification to occur, this thermal
equilibrium must be altered. This process is known as population inversion and
is normally achieved by pumping energy into the medium to excite atoms. The main
idea is to achieve a higher concentration of excited atoms per unit volume Eq. (2.5),
and this is only achieved in non-equilibrium conditions.
N2 �g2g1
N1, (2.5)
where N1, N2 are the number of atoms in the ground and the excited state respec-
tively, and g1, g2 its degeneracy levels.
2.1.2 Gain and stimulated emission for a Fabry-Perot type laser
This section is based on [17, 20].
Although the theory of this chapter is focused on DFB type lasers, the concept
of threshold gain and stimulated emission conditions is more understandable for
Fabry-Perot (FP) type lasers and, as we will see, the results obtained here can be
extrapolated to the DFB type case. A FP is a resonant optical cavity composed by an
active region with a certain frequency dependent gain � and losses ⇠ confined between
two high-reflective mirrors with reflectivity r1 and r2. The optical amplification
necessary for the lasing e↵ect is achieved by ”pumping” atoms to the higher atomic
level, population inversion as mentioned earlier. The threshold value of this gain,
i.e. the gain value that makes the laser oscillate, is rather a complicated calculation,
Theoretical background 7
therefore the simplistic analysis below is only valid for a uniform gain medium in
the weak-saturation limit 2.
The following oscillation condition can be derived taking into account the features
of the LD cavity and the parameters of the semiconductor material,
1 = r1r2⇠e2�L, (2.6)
where L is the cavity length.
In normal operation, the gain will be proportional to the pumping rate R until
the threshold gain is reached. At this point, the gain stops growing because the
oscillation condition needs to hold, and the extra energy of the pumping source thus
goes into generating light output, which grows linearly with (R�Rth) for R > Rth.
An expression for the threshold gain �th is derived from Eq. (2.6),
�th = � 1
2Lln(r1r2)�
1
2Lln ⇠. (2.7)
On the other hand, the fact that light is repeatedly bouncing around the cavity
demand some boundary conditions to be satisfied, therefore the field inside the
cavity is a standing wave with an integer number of half wavelengths, therefore the
cavity length must satisfy,
Lcav
= m · �2= m · ⇡c
ncav
!, (2.8)
where c is the speed of light in vacuum, m is an integer, � and ! the wavelength and
the angular frequency of the field and ncav
is the average refractive index inside the
cavity. Rearrengin terms of Eq. (2.8), the discrete number of allowed frequencies is
derived,
!m = m · ⇡c
ncav
Lcav
, (2.9)
where �! = ⇡c/ncav
Lcav
is the separation between modes. The spectral density of
the gain g!(!) will tune and therefore determine which modes will be amplified, as
shown in Fig. 2.1. For instance, in Fig. 2.1(d), the width of the gain spectral density
amplifies various modes resulting in a multimode like behavior, while in Fig. 2.1(e),
there is just one mode which is amplified. This second case is known as single-mode
like behavior and has prominent importance in many applications, particularly in
2In the weak saturation limit the e↵ective area of a gaussian beam is larger than what it isexpected. In physical terms, the outer wings of the gaussian beam (where much of the power iscarried) are at low intensity, and thus do not saturate the laser medium [20].
Theoretical background 8
(d) Multi-mode (e) Single-mode
Figure 2.1: The trade-o↵ between the emitted modes and the width of the gainspectral density is clearly shown in this figure. In (a) a multi-mode-like behavioris shown, i.e. various modes are oscillating while in (b) just one mode is doing so,
single-mode-like behavior.
the development of this work, where interferometric techniques are employed and
having a unique mode is fundamental.
2.1.3 Distributed feedback laser diode
This section is based on [21, 18].
The most common laser diode (LD) structure is an optical cavity, ended with two
high reflective mirrors, and a gain medium inside the resonator, these are the Fabry-
Perot type lasers. The gain medium amplifies the ligth and the mirrors allows the
feedback necessary to oscillate. Obtaining single-mode operation using this struc-
ture is not easy, so the mirrors are broadband and many modes propagate inside
the resonator. An improvement in single-mode LD designs was the invention of
the distributed feedback (DFB) LD, mirrorless LD where the feedback is provided
by backward Bragg scattering from a periodic spatial variation of the gain medium
refractive index [22]. These LDs are very compact and stable as the feedback mech-
anism is distributed throughout and integrated with the gain medium. Due to the
grating-like nature, the device provides a natural filter mechanism which restricts
the oscillation to a narrow spectral range.
As earlier mentioned, within the grating region of a DFB LD, both the refractive
index and the gain varies periodically, as shown in Fig. 2.2 and Eq. 2.10.
n(z) = n0 +�n cos(2�0z + ⌦), (2.10a)
↵z = ↵0 +�↵ cos(2�0z + ⌦+ ✓), (2.10b)
where n0 and ↵0 are the steady-state values of the refractive index and the amplitude
gain, �n and �↵ the amplitude of the modulation, ⌦ is the non-zero residue phase
Theoretical background 9
at the z-axis origin , �0 is the propagation constant and ✓ takes into account phase
di↵erence between perturbations of the refractive index and the gain.
Figure 2.2: DFB periodic structure
In order to form a self-sustained resonant cavity, the propagation constant of Eq.
(2.10) must satisfy the Bragg condition
2�0⇤ = 2m⇡, (2.11)
where ⇤ is the period of the grating and m is the Brag di↵raction order (m = 1 will
be assumed from now on).
Rearranging terms of Eq. (2.11), the following relations can be written
�0 ⌘2⇡n0
�B⌘ n02⇡⌫B
c=
⇡
⇤, (2.12)
where �B, ⌫B are the Bragg wavelength and the Bragg frequency. From Eq. (2.12)
it is clear that the Bragg propagation constant is related to the period of the grating,
namely, the wave propagation can be tuned by modifying the grating period.
Using a small signal analysis, i.e. n0 � �n and ↵0 � �g, the wave propagation
constant can be written as
k2 ⇡ �2 + 2j�↵0 + 4� cos(2�0z + ⌦), (2.13)
where � = k0n0 being k0 the free-space propagation constant, n0 the steady-state
value of the refractive index and is the coupling coe�cient defined as
=⇡�n
�+ j
�↵
2= i + jg, (2.14)
where i includes all contributions from the refractive index perturbations while g
covers all contributions from the gain perturbation. A possible solution of the wave
Theoretical background 10
(a) Non-phase correction (b) Phase correction
Figure 2.3: Calculated sub-threshold spectra of DFB LD. Figure from [18]
equation using the propagation constant defined in Eq. (2.13) is the superposition
of two opposite traveling waves.
The spectrum of a DFB LD biased below threshold is shown in Fig. 2.3. The
parameter �L corresponds to the deviation of the optical frequency ⌫ from the Bragg
frequency ⌫B according to
�L = (� � �0)L =2⇡n0L
c(⌫ � ⌫B). (2.15)
As seen in Fig. 2.3(a), the emitted intensity is minimum at the Bragg frequency
and two lasing modes appear at a certain �L of ⌫B. In order to solve so, namely
achieve a single mode behavior, an additional phase shift of ±⇡ is required. The
most common way to solve this problem is by introducing the phase shift in the
center of the DFB region by introducing a phase-adjustment region �� of length
L�. Accordingly, the ±⇡ phase change required is obtained for �� · L� = ⇡/2.
Using this approach, both waves propagating along the +z- and �z-directions su↵er
a ⇡/2-phase shift, thus such DFB LD are known as ⇡/2-phase shifted lasers and a
single-mode lasing spectrum is achieved at the Bragg frequency ⌫B.
The above analysis reflects the phase condition for the modes of a DFB structure.
On the other hand, a minimum amount of pumping is needed also to oscillate, i.e.
a minimum gain. This threshold gain �th depends on the coupling strength of the
grating L and may be expressed as
�th = ↵m + ↵s, (2.16)
Theoretical background 11
where ↵s are the scattering losses and ↵m the so-called cavity losses, which may be
calculated from numerical analysis.
The threshold gain for a Fabry-Perot LD defined in Eq. (2.16) is �th�FP = �(1/2L) ln(r1r2)�(1/2L) ln ⇠. Comparing this expression with Eq. (2.16), the cavity loss of DFB LD
↵m may be related to the second term of the FP threshold gain, i.e. that losses
related to the mirrors reflectivity, while ↵s is related also to losses in the semicon-
ductor, as scattering. Therefore, the analysis for the FP type laser is consistent with
the DFB type.
2.2 Theory of linewidth of semiconductor lasers. Henry’s
enhancement factor.
C. Henry presented in 1982 a self-contained theory of the line broadening in semi-
conductor lasers [23]. Its work first explained the non understood experimental
results reported by Fleming and Mooradian in the measurement of laser linewidth.
Basically, he discovered that individual spontaneous emission events alter both the
intensity and the phase of the field. These fluctuations alters the gain and the re-
fractive index of the laser media producing an enhancement in the laser linewidth,
see Fig. (2.4.
Figure 2.4: Instantaneous phase changes of the phase � and intensity I of the op-tical field due to the ith spontaneous emission event. The field amplitude variation
is known, while the phase ✓i
is random.
Theoretical background 12
During the ’80s, several authors analyzed this problem. Mainly C.Henry [23, 24, 25]
and G.P. Agrawal [26, 27]. In this lattest article, Agrawal reviewed the theory devel-
oped in all previous publications and also included the e↵ect of gain and refractive
index non linearities.
Firstly, C.Henry introduced that the linewidth broadening in semiconductor lasers
arises from spontaneous emission events. Each time an atom spontaneously decays
to a lower energy value, a change both in the real and the imaginary part of the
refractive index occurs, producing a change in the gain �g(t) = (�2!/c)�n00(t),
where �n00(t) is the deviation of the imaginary part of the refractive index. This
change in the imaginary part of the refractive index n00 also alter the real part n0
with a ratio ↵ = �n0
�n00 . Then, with the rate equations in mind, these changes in the
gain also a↵ects to the number of carriers, the number of photons and the phase of
the field.
Following [27] to study the phase variance h��2i, or equivalently the laser linewidth
�⌫ = ddth��2i, the stochastic rate equations are defined
P = (GL/p
1 + p� �)P +Rsp
+ FP (t) (2.17)
� =↵0
2(GL � �)� �
2
GLp
1 +p1 + p
+ F�(t) (2.18)
N = I/q � �eN �GLP/p
1 + p+ FN (t) (2.19)
where GL = GN (N �N0), being GN the gain per carrier and N0 the transparency
level, p = P (out)/P (out)S , being P (out)
S the saturation output power, Rsp
the spon-
taneous emission rate, ↵0 the linewidth enhancement factor, � = 1/⌧p bein ⌧p the
photon lifetime, � is related to the slope of the linear gain, I the injection current, q
the elementary charge, �e = 1/⌧e, bein ⌧e the carrier lifetime and FP,�,N (t) random
noise Langevin variables.
These Langevin forces are responsible for the linewidth broadening, and therefore
are also responsible for the phase variance of the field. They are assumed to have
zero mean and taken to be delta-correlated in the marko�an approximation, i.e.
assuming the variation of P,� and N much slower than the variation of FP,�,N (t).
hFi(t)Fj(t0)i = 2Dij�(t� t0), (2.20)
Theoretical background 13
where i = P,�, N and the di↵usion coe�cient Dij are given by
DPP = Rsp
P, D�� = Rsp
/4P, DP� = 0 (2.21)
DNN = Rsp
P + �eN, DPN = �Rsp
P, DN� = 0. (2.22)
Using all these equations and some standard methodology, the phase variance h��2iand the laser linewidth �⌫, defined as the FWHM (full width half maximum) of the
central peak can be written as3
h��2i = Rsp
4⇡Pic(1 + ↵2
eff )t (2.23)
d
dth��2i = �⌫ =
Rsp
4⇡Pic(1 + ↵2
eff ), (2.24)
where Pic is the intracavity power and ↵eff , the e↵ective linewidth factor given by
↵eff = ↵p
1 + p+ �p(1 + p)/(2 + p). (2.25)
Defining �⌫0 as the expected linewidth enhancement when non linearities are not
considered, the proportion �⌫/�⌫0 gives the extra enhancement introduced by non
linear e↵ects, see Fig. (2.5(b)).
�⌫0 =R
sp
4⇡Pic(1 + ↵2
0), (2.26)
In fact, phase di↵usion has an oscillatory dependence with the relaxation oscillations,
see Fig. (2.5(a)). Fortunately, we are interested in the maximum phase variance and
therefore the linear approximation written in Eq. (2.23) is enough to lower bound
the amount of di↵usion.
Summarizing, interaction between atoms and the vacuum field produces sponta-
neous emission events [19]. This spontaneous decays from high to low energy levels
produces the emission of a photon and an instantaneous change in the gain and
the index of the semiconductor. This change in the gain of the semiconductor in-
fluences the rate equations and is responsible for the linewidth enhancement of the
semiconductor laser emission line.3Relaxation oscillations are known to give rise to a number of weak satellites at the multiples of
the relaxation-oscillation frequency. However, for simplicity, these satellites are neglected.
Theoretical background 14
(a) Phase variance (b) Non linearities enhancement
Figure 2.5: 2.5(a) Phase variance with di↵erent parameters. Notice that thelinear approximation is always smaller than the oscillating approach. Therefore,if large phase di↵usion is desired, the linear approach is a lower bound. 2.5(b)Variation of the laser linewidth with normalized output power P/P
S
for threevalues of �. Dashed line shows the expected behavior in the absence of gain and
index nonlinearities.
This theory was mainly developed in the framework of optical communications. In
this field, the narrower the line, the better to send information. Contrary, in our
scenario, the wider the line, the more phase di↵usion.
2.2.1 Experimental determination of the linewidth enhancement
parameter
There is an easy method to measure the linewidth enhancement factor based on
calculating the power and the spectrum far below and far above threshold. At
these limits, the linewidth tends to the Schawlow-Townes formula, allowing us to
experimentally find the ↵ parameter [24, 28].
�!below th =Rsp
I, (2.27a)
�!above th =Rsp
2I(1 + ↵2), (2.27b)
where Rsp is the average spontaneous emission rate and I the number of photons.
Hence, using an optical spectrum analyzer and a power meter we can derive Rsp
from Eq. (2.27a) and use this value to calculate ↵ from Eq. (2.27b).
Theoretical background 15
2.2.2 Spontaneous emission enhancement factor. Petermann’s K
factor
Although the analysis in the previous section is derived for FB type laser, it also holds
for index-guided DFB type lasers. On the other hand, in gain-guided lasers, maxi-
mum gain is found along the center of the active layer. Due to the fact that phase
fronts of gain-guided lasers are curved, a larger amount of spontaneous emission is
expected to be captured. Such an enhancement in a transversely single-mode-gain-
guided laser was first proposed by Petermann [18]:
Ktr =
�
�
�
�
�
R R
|�2t |dxdy
R R
�2t dxdy
�
�
�
�
�
2
, (2.28)
where �t is the transverse electric field distribution of the lasing mode. For index-
guided lasers, the transverse field is real and thus Ktr becomes unity. It was also
shown that the spontaneous emission coupled to the lasing mode is enhanced by the
output coupling.
Kz =�
�
�
R L0 |�2
z |dzR L0 �2
zdz
�
�
�
, (2.29)
where �z is the longitudinal electric field distribution of the lasing field and L the
laser diode cavity length.
Due to these enhancements, the linewidth could be written as:
�f =v2gh⌫gnsp↵m(1 + ↵2
H)
8⇡P0KtrKz. (2.30)
2.3 Interference and visibility
This section is based on [29].
The principle of superposition of waves, known as interference when interfering waves
are of the same frequency, states that when at least two electromagnetic waves are
incident on the same point, the resultant wave is the vectorial sum of the interfering
waves. Consequently, interferometry techniques uses this property to smartly extract
information of the input waves, typically phases.
Being E1(t) and E2(t) the complex amplitudes of the interfering electromagnetic
fields and defining the field intensity u as the squared field average
u = hEi(t)E⇤i (t)i, (2.31)
Theoretical background 16
where ⇤ denotes complex conjugate and hi 4 denotes a time-averaging process, the
output field intensity can be written as
uout(t) = hE(out)E⇤(out)i
= h⇥
E1(t+ ⌧) + E2(t)⇤⇥
E⇤1(t+ ⌧) + E⇤
2(t)⇤
i
= hE1(t+ ⌧)E⇤1(t+ ⌧)i+ hE2(t)E
⇤2(t)i
+hE1(t+ ⌧)E⇤2(t)i+ hE⇤
1(t+ ⌧)E2(t)i (2.32)
Equation (2.32) could be also defined in terms of the first order coherence function
�12(⌧ 0) = hE1(t+ ⌧ 0)E⇤2(t)i, where ⌧ 0 denotes the time di↵erence between the fields.
Using this notation, the first two terms of Eq. (2.32) can be written as
hE1(t+ ⌧)E⇤1(t+ ⌧)i ⌘ �11(0) = IB1
1 ,
hE2(t)E⇤2(t)i ⌘ �22(0) = IB2
2 ,
being �11 and �22 the autocorrelation function of E1 and E2. On the other hand,
the last two terms of Eq. (2.32) can be expressed as
hE1(t)E⇤2(t+ ⌧)i+ hE1(t)E
⇤2(t+ ⌧)i ⌘ 2<(�12(⌧)),
being ⌧ the time path di↵erence introduced by the interferometer and �12 represents
the ⌧ -shifted cross-correlation function. Using these definitions, Eq. (2.32) can be
easily rewritten as
u(out) = IB11 + IB2
2 + 2<(�12(⌧)). (2.33)
Before proceeding, to enable coherence to be specified independently of the input
amplitudes, we define the normalized cross-correlation function �12(⌧) as follows
�12(⌧) =�12(⌧)p�11
p�22
. (2.34)
�12(⌧) is sometimes known as phase coherence factor. To deeply understand its
meaning, it is useful to decompose the complex number into a modulo and a phase,
namely �12(⌧) = |�12|ei�12(⌧), being �12 the phase di↵erence between the electromag-
netic fields, namely the di↵erence phase introduced by the interferometer as well as
4The time-average of a function f(t) taken over an interval T is given by
hf(t)i = 1
T
Z
T
dt0f(t0)
Theoretical background 17
other possible phases. Accordingly, the real part of �12 is simply
<(�12) = |�12| cos�12. (2.35)
Substituting Eq. (2.34) and Eq. (2.35) into Eq. (2.33), we can finally derive a
general expression for the interference between two electromagnetic fields.
u(out)(t) = IB11 + IB2
2 + 2q
IB11 IB2
2 cos(�12). (2.36)
Finally, after some calculations, the expression for the visibility V12 can be written
in terms of the degree of mutual coherence |�12| 5,
V12 = 2|�12|
q
IB11
q
IB22
IB11 + IB2
2
. (2.37)
Note that for IB11 = IB2
2 , V12 = |�12|. However, from an experimental point of view,
the easiest way to calculate the visibility is:
V12 =Imax � Imin
Imax + Imin, (2.38)
where Imax and Imin are the maximum and minimum measured intensities.
2.4 Randomness extractors
Randomness extraction involves the process of extracting almost-uniformly dis-
tributed bits from randomness sources with arbitrary probability distribution func-
tions (Fig. 2.6). Also, an extractor permits the removal of partially correlated
information E, even quantum side information [30], from a given randomness source
X.
P(x) P(z)
x z
ext
Figure 2.6: Randomness extractors are functions that, at the cost of losing bits,convert non-uniform distributions into uniform distributions.
5For further details, for instance [29]
Theoretical background 18
According to the mentioned properties of randomness extractors, some true random
number generator schemes introduced its usage to uniform the sequence of sampled
bits [12, 13]. The fact that physical randomness sources do not usually produce
uniformly distributed strings of values makes randomness extractors a fundamental
process for true random number generators.
2.4.1 Min-entropy and extraction
In order to quantify how much extractable randomness is there in a source, the con-
cept of smooth conditional min-entropy H1 must be introduced. This min-entropy
upper bounds the amount of almost-uniform randomness that can be extracted from
a source. Defining PR(X = x) as the probability of ⇠ = x, H1(X) is defined as:
H1(X) = � log2
⇣
max8 xi
Pr[X = xi]⌘
. (2.39)
An extractor Ext: {0, 1}n⇥{0, 1}d ! {0, 1}m is a function which takes a randomness
source X with Hmin(X) = k and a uniformly random seed Y to produce an m-
bit output Z = Ext(X,Y). During this work, and following [31], we deal with the
concept of strong extractors, which basically means that the quasi-uniform output
distribution Z is independent of the seed Y . Particularly, a (k, ✏)-strong extractor
satisfies:�
�PExt(X,Y )Y � PUZ · PUY
�
� ✏, (2.40)
where PUi denotes the uniform distribution in the ith-space. The min-entropy of the
output variable Z is determined by
H1(Z) = m = k � log2(1/✏). (2.41)
This is result has prominent importance in the field of cryptography. The main idea
is that any probability distribution function with H1 = k can be turned into a
uniform distribution with the same min-entropy.
2.4.2 Hash function as an extractor
One of the most fundamental results of randomness extraction is the leftover-hash
lemma [32, 31, 33], which states that the randomness of a variable X, measured in
terms of the min-entropy, can be extracted by using an appropiate hash function.
Actually, in [33] is proposed an scheme based on the sample-and-hash technique,
Quantum random number generator 19
i.e. first sampling the physical magnitude and then applying a two-universal hash
function. In [34], a careful analysis is done about why simple hash functions work
as randomness extractors.
A Hash function is a function which maps a block of n bits [N] into a set ofm bits [M].
The most relevant property of these functions is that they are expected to map the
input data as evenly as possible in the output space. Hence, according to the concept
of ✏-uniformity defined in Eq. (2.40), the probability of each outcome mi after
applying a hash function over [N] is expected to be in the range: P (mi) = 1/M±✏.
Chapter 3
Quantum random number
generation from vacuum field
amplification
In this chapter is presented the design of a quantum random number generator
based on vacuum field amplification, namely that takes advantage of the random
phase produced in spontaneous emission events. This method was first proposed by
M. Jofre et al in 2010 [12] achieving a bit rate of 1.1 Gbps and hereby we propose
an improvement of the method reaching up to 40 Gbps. Basically, a distributed
feedback laser diode is biased below threshold, assuring spontaneous emission to be
the dominant atomic transition. Then, employing an strong RF direct modulation,
the optical field is periodically amplified to generate phase-randomized optical pulses.
Finally, these phase randomized optical pulses are interfered to generate random
amplitudes and photodetected.
3.1 Randomness
There are several properties a string of numbers must satisfy in order to be con-
sidered random1. The most common features are: (i) Uncorrelation, which assures
di↵erent numbers have no relationship, (2) uniformity, which accounts for the fairness
of the generation and (3) uniqueness, which assures no enemies can have information
about the generated sequence.
1Considered because it does not exist a method to fully verify if a sequence of numbers is random.In fact, an infinite string of numbers would be required for this purpose.
20
Quantum random number generator 21
In this work, uncorrelation and uniformity are studied but not uniqueness, which
implies a theoretical work in device independent theories, i.e. that any third parties
can have entangled information about the generated string. Here, entanglement
refers to the property where two spatially separated particles share instantaneous
information without needing to locally interact.
A part from these general features, there are lots of tests to analyze individual string
of numbers. These statistical tests looks for patterns and predictabilities, but even
tough, it does not exist a method which tells whether a sequence is random.
3.2 Measurements at the UPV
High-bandwidth equipment, not available at ICFO, were required for the experi-
ment. Thus, all measurements were carried out at the laboratories of the grupo de
comunicaciones opticas lead by Prof. Jose Capmany, at the Universitat Politecnica
de Valencia (UPV).
RF modulation
LD + U-MZI
Samplingoscilloscope
Figure 3.1: Setup of the experiment in the laboratory at the UPV.
3.3 System configuration
A NEL NLK5C5EBKA, a distributed feedback (DFB) laser diode (LD), is directly
modulated at 5.825 GHz with an electrical pulse train generating optical pulses of
85 ps pulse width and 7.65 mW peak power. The electrical signal has 100 ps
pulse width and 0 mA/85 mA low/high modulation level, as seen in Fig. 3.2. To
Quantum random number generator 22
avoid back reflections into the oscillator cavity, the LD has an internal 30 dB optical
isolator.
The linearly polarized optical pulses pass through an unbalanced Mach-Zender inter-
ferometer (U-MZI) composed of two 50/50 polarization maintaining couplers (PMC)
with arm-length di↵erence related to the PRF, see Fig. 3.3. The 3.55 cm path de-
lay length is designed to interfere pulses at 5.825 GHz which is the pulse repetition
frequency (PRF). Finally, the optical output is detected by a 14-bits oscilloscope
(DSA8200 with module 80C02), working at a sampling speed of 12.5 Gsps and trig-
gered by the system clock reference, took from the electrical pulse generator.
0 50 100 150 200 250 300 350 400 450
−80
−60
−40
−20
0
20
40
time [ps]
RF
curr
ent [m
A]
0
2
4
6
8
10
12
Optic
al p
ow
er
[mW
]
Optical pulsesRF pulsesThreshold current
Figure 3.2: Electrical and optical pulse trains. (Magenta, upper trace) measuredelectrical pulses with a PRF of 172 ps, (blue, lower trace) photo-detected opticalpulses of 85 ps time width and 0.9 mW peak power and (red, dashed line) 9 mA
LD current threshold.
Pulsedriver
LD
PMF
PMF
PMC PMC
PD
Figure 3.3: Unbalanced Mach-Zehnder interferometer. Phase randomized coher-ent optical pulses interfering at the output of the U-MZI produce random intensi-ties. (Pulse driver) denotes the electrical pulse generator that directly modulatesthe laser, (LD) laser diode, (PMC) polarization maintaining coupler, (PMF) po-larization maintaining fiber, (✓
0�3
) optical phases of di↵erent consecutive pulses,(✓
loop
) phase introduced by the delay line and (PD) a fast photodetector.
Quantum random number generator 23
Laser Diode
Interferometer
RF modulation
Figure 3.4: It is shown the setup depicted in the schematic of Fig. (3.3. Randomamplitudes at the output of the DFB laser diode are photo-detected and sampled
using a high-bandwidth sampling oscilloscope.
3.4 Theoretical background
Interaction between the vacuum field and atoms are responsible for spontaneous
emission events. Each time an atom spontaneously decays to a lower energy level,
both the intensity and the phase of the cavity field experience a change [23]. Par-
ticularly, the phase �(t) describes a random walk, or according to the fact that time
steps are small, by a Brownian movement. Accordingly, phase evolution can be
described by the Langevin equation:
� =↵0
2(GL � �)� �
2
GLp
1 +p1 + p
+ F�(t), (3.1)
where the physical meaning of the parameters have been defined in Sec. 2.2. By now,
the important parameters for calculating the phase variance are ↵0, the linewidth
enhancement factor, and F�(t), a Langevin noise term responsible for spontaneous
emission.
In gain-switching conditions, the field within the cavity experiences two working
regimes: above- and below- threshold. During the former, stimulated emission dom-
inates and coherent optical pulses are emitted. During the latest, the intracavity
field is strongly attenuated and significant phase di↵usion occurs. In [23, 24, 25, 27]
is studied this process and an expression for the variance h��(t)2i is derived. Unlike
them, we are interested in the maximum phase di↵usion. Hence, using the linear
Quantum random number generator 24
approximation proposed in [24], Eq. (3.2), is enough to lower bound how much
di↵usion occurs in a certain interval of time.
h��(t)2i = Rsp
2St(1 + ↵2
0)t, (3.2)
where Rsp is the average spontaneous emission rate and St the number of photons in
the cavity [23]. Rsp can be estimated as Rsp = Ktotgnspc0/n ⇡ 2.5⇥ 1012s�1 being
Ktot ⇡ 1.5 the total spontaneous emission enhancement factor [18], g ⇡ 100 cm�1
the gain of the fundamental mode, nsp = 1.5� 2.5 the inversion factor, c0 the speed
of light in vacuum and n = 3.6 the refractive index. On the other hand, the number
of photons St can also be estimated as St = nP/h⌫c↵m, where P is the optical
power, h is the Planck constant, ⌫ the optical center frequency and ↵m ⇡ 1.4/L the
cavity losses for a typical ⇡/2-phase shifted DFB laser [18], being L = 300µm the
cavity length.
To quantify how much phase di↵usion occurs on average between pulses, the time
when the output power is in the low level is pessimistically considered, i.e. neglecting
the di↵usion induced in the transients. Particularly, hPouti = 14µW during �t =
50 ps. Using typical values for the internal parameters of the DFB laser diode in
Eq. (3.2), the average phase variance is h��2i = (2.40 rad)2.
Finally, considering gain and index non-linearities [27], phase fluctuations are demon-
strated to increase by a factor larger than 10 below threshold, i.e. phase variance
can be lower bounded by h��2i � (7.60 rad)2.
Theoretically, if the vacuum field is reached, complete phase di↵usion is observed.
In practice, ifp
h��2i > ⇡, the random variable �� can be modeled as a uniform
distribution with an error < 10�4. Summarizing, random numbers are generated
from a random variable arising from a quantum phenomena.
3.5 Characterization of the coherence of the optical pulses
Despite interference has been already analyzed in section 2.3, to introduce random
phases generated by spontaneous emission in our model, i.e. a laser diode at a
certain frequency, traveling along an interferometer and having some random phase
due to spontaneous emission, a brief analysis is done. Being B1 and B2 each branch
of the U-MZI, the optical field traveling along them is:
~EB1(t) = A1 · e�j(!1t+�1+✓t=i), (3.3)
Quantum random number generator 25
~EB2(t) = A2 · e�j(!2t+�2+✓t=i+1), (3.4)
where A1, A2, !1 and !2 are the electric field amplitudes and the angular frequencies
at the input of the each branch of the U-MZI, �1 and �2 are the phases introduced by
each path due to propagation and ✓t=i and ✓t=i+1 are the random phases generated
by spontaneous emission events at t = i and t = i+ 1.
It must be noticed that di↵erent emission wavelength have been introduced in the
formulation despite a single-mode DFB LD was used. This account for the laser
wavelength drift 2 and can be analyzed by using a highly coherent LD and measuring
the variations at the output of the U-MZI. Figure 3.5 shows the worst case captured
for the power variation in a 1 s window, then assuming that the interference is carried
out with subsequent optical pulses, this stability only needs to hold in a 172 ps time
interval determined by the PRF. Accordingly, this drift variation rate produces a -66
dB power variation and 2.37 ·10�7 rad phase change on average between subsequent
pulses, far from being significant.
0 0.2 0.4 0.6 0.8 10
0.5
1
1.5
2
2.5
Time [s]
Pow
er
[mW
]
Figure 3.5: Measurement at the output of the U-MZI using a highly coherent LDemitting a 1.3 mW constant output power. Less than -66 dB output power variationand 2.37 · 10�7 rad phase change are measured on average between subsequent
pulses.
Hence, assuming not significant variations introduced for the laser wavelength drift,
from now on, !1 = !2 = !. Defining the intensities u1 ⌘R
T dt~EB1~E⇤
B1, u2 ⌘R
T dt~EB2~E⇤
B2 and ~E(out) ⌘ ~EB1 + ~EB2, the intensity at the output of the U-MZI at
t = i+ 1, u(out) ⌘R
T~E(out)~E⇤(out) is given by
2The laser wavelength drift is a frequency deviation from the central emission peak. It is usuallysolved by stabilizing the laser diode in temperature but in our case is not necessary because thedeviation rate is much smaller than the PRF, i.e. the interference is always instantaneously carriedout with pulses at the same emission frequency.
Quantum random number generator 26
u(out)(t) = u1 + u2 + 2|g(tloop)|pu1u2 cos(�� +�✓), (3.5)
where |g(tloop)| is the interference visibility, �� = �2 � �1 is the phase introduced
by the path delay, varying by the LD wavelength drift (which has been already
demonstrated not to be significant, i.e. �� can be considered constant) and �✓ =
✓t=i+1 � ✓t=i is the di↵erence between the random phases. Hence, the resultant
amplitude u(out) in Eq. (3.5) only varies due to the random phase generation arising
from quantum vacuum amplification �✓.
3.6 Raw data analysis
A RNG should produce an uncorrelated and uniform distributed string of numbers.
The uncorrelation avoids the capability to predict future numbers while the unifor-
mity ensures the same apparition probability to all of them. Sampling the interfered
field, an uncorrelated but not equally distributed sequence of numbers is achieved.
Namely, the vacuum field amplification is expected to provide the uncorrelation while
the uniformity will be achieved using a randomness extractor over the raw data.
In order to test the validity of the setup, 1.2 ⇥ 108 numbers were captured and
analyzed. Repeatability and stability are also tested capturing data during a 5 days
period.
The power of each branch at the output of the U-MZI are 0.97 mW and 0.9 mW3
on average, with an standard deviation of ⇠ 45µW . This deviation around the
mean arises from background noise and spontaneous emission events and produced
narrow distributions for the interfering pulses. In contrast, due to the interferomet-
ric process, the output power distribution is expected to broaden. The fact that
optical pulses have a predictable amplitude and true random phase implies that in-
terfering these fields, quantumly generated random input phases are converted into
macroscopic measurable random output amplitudes. This behavior is shown in Fig.
3.6(a).
On the other hand, the normalized autocorrelation function is evaluated to confirm
the intuition that the process is intrinsically uncorrelated. As seen in Fig. 3.6(b),
the non-shifted correlation values are at the 40 dB level. For a detailed explanation
about the correlation, see Appendix B.
3The sampling point was set not in the highest part of the interfered pulse, but 13 ps later. Thisis because the phase has been experimentally seen to stabilize after intensity saturation occurs.
Quantum random number generator 27
0 1 2 3 4 5
x 10−3
0
0.002
0.004
0.006
0.008
0.01
0.012
Energy [mW]
No
rma
lize
d H
isto
gra
m [
a.u
.]
0
0.05
0.1
0.15
0.2InterferenceShort path pulseLong path pulse
(a) Histograms
0 10 20 30 40 5010
−8
10−6
10−4
10−2
100
Shift d
Corr
ela
tion
Positive valuesNegative values
(b) Raw data correlation
Figure 3.6: Input power distributions (left y axis) and the resultant output powerdistribution (right y axis). The visibility achieved for the interferometer is 89.54%.The power distribution has clearly widened due to the random phase generated byASE. (2) Normalized correlation of 50 subsequent sampled pulses. The autocor-relation has been evaluated with 4 ⇥ 109 samples, but just the first 50 terms areshown. As it was expected, it follows a delta-function like behaviour indicating the
random nature of the process.
3.7 Quantum entropy quantification and min-entropy
calculation
In order to quantify how much randomness is there in a set of data, due to a quantum
phenomena only, some statistical analysis has to be done. There are several ways to
do so, but the cheapest, from a computational point of view, the better. Accordingly,
some assumptions in the shape of the probability distribution function (PDF) at the
output of the interferometer are made.
Due to the interferometric process described in Eq. (3.5), the output probability
distribution function can be described by an arcsine distribution, i.e. a distribution
with U-like shape. Unfortunately, this pdf cannot be directly measured because of
classical noisy processes. These classical e↵ects smooth the U-like shape and intro-
duce undesired randomness to the system. To infer the original U-like distribution,
and therefore to be able to know the pdf of the quantum process only, second order
statistics of the observable are used for the calculations.
In Appendix D is detailed the procedure to quantify the amount of randomness aris-
ing from vacuum amplification only. Summarizing, assuming independence between
measurable and assuming the di↵usion process the phase experience during the low
modulation level described by a gaussian distribution with an standard deviation
Quantum random number generator 28
su�ciently large, it can be shown that the visibility can be estimated using second
order statistics as:
|g(tloop)|2 =V ar[u(out)]� V ar[u1]� V ar[u2]� V ar[unoise]
2µu1µu1
. (3.6)
Particularly, we measured var(u(out)) = 1.4·10�6pW/m, var(u1) = 2.017·10�9
pW/m,
var(u2) = 2.112 · 10�9pW/m, var(unoise) = 1.45 · 10�10
pW/m, µu1 = 9.7 · 10�4,
µu2 = 8.97 · 10�4 and therefore, |g(tloop)| = 0.8954.
The min-entropy calculation is the best way to quantify the amount of randomness
of a variable. Thus, using the method proposed in Appendix D, the min entropy of
the quantum phase H1 is given by:
H1 ⇡ b
2� log2
⇣
s
4Aadc
⇡2lim0sup
⌘
, (3.7)
where Aadc
is the dynamic range of the ADC and lim0sup = 4|g(tloop)|
pu1u2. Note
that the amount of min-entropy increases linearly with half the resolution of the
histogram, i.e. the more resolution, the more min-entropy.
Note on the measurement
It is important to highlight that measurements for di↵erent variables have to be done
with the same dynamic range in the oscilloscope. Otherwise, comparison between
entropies and variances make no sense, as shown in Fig. (3.7).
time
1234
2b
Codification
(a) Signal binning
time
1234
2b
Codification
(b) Noise binning
Quantum random number generator 29
∆b amax signal
amplitudes
pro
babili
ty
∆b ∆b ∆b ∆b
(c) Signal binning
∆b amax noise
amplitudes
pro
babili
ty
∆b ∆b ∆b ∆b
(d) Noise binning
Figure 3.7: Sampling, encoding and histogram function using the binning of thesignal and the binning of the noise. This figure shows how the entropy of the noisecalculated with the binning of the sampled values is much smaller than the entropycalculated with its own binning. When the noise binning is used, noise samplesspreads over the 2b bins producing a certain entropy. On the other hand, whenthe signal binning is used, noise samples concentrates in the lower bins producing
a nearly-zero entropy.
3.7.1 Randomness extraction
Once the amount of randomness which can be extracted is estimated, a randomness
extractor is is applied to remove classical entropic contributions. For simplicity, a
hash function will be used for this purpose, but more sophisticated techniques could
be used, as the Trevisan extractor, for instance.
Being Aadc
= 5 mW, b = 14 bits, lim0sup = 3.34 mW and using Eq. (D.17), the
min entropy is 7.33. Thus, the randomness extractor must map the 14-input bits
to 7.33-output bits. Defining the reduction factor as
RF =b
H1, (3.8)
the RF to apply is 14/7.33 = 1.9.
As can be seen in Fig. 3.8, the correlation level remains at the 40 dB level. Actually,
with the amount of numbers used, the statistical noise produced by a finite sequence
size is in this 40 dB level, i.e. no smaller correlations can be measured. Furthermore,
in Fig. (3.8(b) is shown the histogram after randomness extraction and a uniform-
like distribution is obtained.
Quantum random number generator 30
0 50 100 150 20010
−8
10−6
10−4
10−2
100
Shift d
Co
rre
latio
n
Positive valuesNegative values
(a) Hashed data auto-correlation
0 20 40 60 80 100 1200
0.001
0.002
0.003
0.004
0.005
0.006
0.007
0.008
0.009
0.01
Output 7−bit numbers
No
rma
lize
d h
isto
gra
m
(b) Hashed histogram
Figure 3.8: In Fig. 3.8(a) is shown the autocorrelation of the output data, wherea 40 dB autocorrelation level is measured. In Fig. 3.8(b) is shown the output
histogram and a uniform distribution is shown.
3.8 NIST tests - statistical analysis
The NIST test suit is a set of statistical tests which analyze, from an statistical point
of view, whether a random number generator (RNG) is appropriate for cryptography
[35]. The field of cryptography demands stronger requirements in RNG than any
other application to assure secure communications, therefore passing this tests is
a good start for testing our random generation. There are an infinite number of
possible statistical tests, each assessing the presence or absence of a pattern which,
if detected, would indicate that the sequence is non-random. Because there so many
di↵erent tests, no specific finite set of tests is deemed complete.
An statistical test is formulated to test a specific null hypothesis (HO). In the
NEST test suit, the null hypothesis under test is that the sequence that is being
tested is random. On the other hand, the alternative hypothesis (Ha) is that the
sequence is not random. For each test, HO is accepted or rejected depending on the
results.
There are two ways to test randomness: (i) assuming that HO is true, i.e. the
sequence is random, and analyzing if it actually is: if HO is accepted the sequence
is said to be random and if HO is rejected it is said to produce a type I error and (ii)
assuming that Ha is true and a dual analysis is carried out, in this case producing
a type II error. The probability of type I error is known as level of significance and
denoted by ↵. This value is set a priori and indicates the probability that the test
will indicate that a sequence is not random when it really is. On the other hand,
Quantum random number generator 31
the probability of type II error is denoted with � and indicates that a sequence is
random when it is not.
Statistical tests are used to calculate a P-value that summarize the strength of the
evidence against the null hypothesis. For this tests, each P-value is the probability
that a perfect random number generator would have produced a sequence less ran-
dom than the sequence tested. If the P-value is equal to 1, the sequence appears
perfectly random while if it is 0, totally non-random. In order to accept or reject
HO, the P-value is compared with the significance level :
• If P-value � ↵, then HO is accepted, i.e. the sequence appears random.
• If P-value < ↵, then HO is rejected, i.e. the sequence appears non-random.
Typically, ↵ is chosen between 0.01...0.001. For instance, ↵ = 0.01 means that 1 each
100 sequence is expected to be rejected even a perfect random generator is used. In
our testing, ↵ = 0.01 is chosen. The results can be seen in Fig 3.9.
The 15-tests battery proposed by NIST is applied on the hashed data to asses its
randomness. The significance level (↵sl
) is set at 0.01. It means that 1 in a 100
sequences is expected to be rejected even being produced by a fair random generator.
Using suggestions in [35], the proportion of accepted/rejected sequences and the
uniformity of the P -values are computed. As shown in Fig. 3.9, all tests are passed
with a sequence of 1.5⇥ 109 numbers.
In order to evaluate the results of the tests, two statistics are calculated. On the
first hand, the accepted/rejected sequences is calculated and must fall within the
confidence interval defined by⇥
1�↵sl
±3p
(1� ↵sl
)↵sl
/m⇤
, where m = 1500 is the
number of sequences tested, see Fig. 3.9(a). On the second hand, the ✏-uniformity of
the P -values is examined. The idea is to compute PvalueT , a ’P -value of P -values’.
The procedure is as follows: for each test, (i) calculate a 10-bit histogram of P -
values, (ii) compute the �2 defined in Eq. (3.9) and (iii) calculate the incomplete
gamma statistical function igam(9/2,�2/2), which must be larger than 10�4, see
Fig. 3.9(b).
�2 =s
10
10X
i=1
⇣
Fi �s
10
⌘2, (3.9)
where s is the amount of P -values per test and Fi is the number of P -values in the
i-th bin.
Quantum random number generator 32
0.95
0.96
0.97
0.98
0.99
1
prop
ortio
n
Overla
ppin
g te
mpla
te m
atch
ings
Blo
ck frequency
Univ
ersa
l statistica
l
Linear co
mple
xity
Seria
l
Random
excu
rsion v
aria
nt
Random
excu
rsions
Appro
cimate
entro
py
Non p
erio
dic te
mpla
te m
atch
ings
Discre
te fo
urie
r transfo
rm
Frequency
Rank
Longest ru
n o
f ones
Runs
Cum
ula
tive su
ms
(a) Proportion
0
0.2
0.4
0.6
0.8
1
Pva
lue T
Overla
ppin
g te
mpla
te m
atch
ings
Blo
ck frequency
Univ
ersa
l statistica
l
Linear co
mple
xity
Seria
l
Random
excu
rsion v
aria
nt
Random
excu
rsions
Appro
cimate
entro
py
Non p
erio
dic te
mpla
te m
atch
ings
Discre
te fo
urie
r transfo
rm
Frequency R
ank
Longest ru
n o
f ones
Runs
Cum
ula
tive su
ms
(b) ✏� uniformity
Figure 3.9: Summary of the results of the NIST test suite to assess randomness.Dashed lines in Fig. 3.9(a) represents the confidence interval where the proportionof sequences accepted/rejected per test must fall in. In Fig. 3.9(b) is plot P
valueT =igam(9/2,�2/2) for each test. All P
valuet > 10�4. The smallest one is for thediscrete fourier transform test, giving a value of P
valueT = 0.0046.
3.9 Conclusions
We have demonstrated a high bit rate QRNG able to work at ⇠ 40 Gbps. Applying
strong attenuation of the cavity field followed by optical amplification allows the
measurement of a microscopical e↵ect with macroscopic measurement devices.
The interferometric process used to detect phase changes produce a U-like shape
Field demonstration 33
probability distribution function at the output of the interferometer. After statisti-
cally extracting the randomness arising from the quantum phenomena only, quantum
random numbers are provided at the output. Furthermore, using this method, the
amount of extractable quantum randomness increases linearly with b/2, being b the
resolution of the digitizer.
According to the fact that the laser diode is continuously modulated below/above
threshold, during the below threshold regime, large phase di↵usion occurs and there-
fore, higher bit rates can be achieved compared to above-threshold-CW operation
approaches. We predict, using higher detection bandwidths and noise-suppression
techniques, complete phase di↵usion could support bit rates up to 200 Gbps.
The high bit rate achieved as well as the quantum nature of its generation makes
this scheme suitable for cryptography, gambling and quantum key distribution. The
scheme is robust, low cost, compact and low power consumption.
Chapter 4
Field demonstration.
In the previous chapter, a laboratory experiment demonstrated a quantum random
number generator at a bit rate of 40 Gbps. Nevertheless, this high bit rate is un-
suitable for real life applications. Thus, in this chapter, two cost e↵ective solutions
using o↵-the-shelf components are proposed. One at 500 MHz in a plug&play con-
figuration and a prototype at 1 GHz without the digitization process, i.e. the output
is an electrical signal with random amplitudes.
The target for the prototype at 127 MHz is high-volume stochastic simulation users.
Some researchers in the field, recently found some patterns in pseudo-random number
strings based on parallel Twistter-Mersenne generators, so they want to get rid of
those old-fashioned generators. Using an 8-bit digitizer, and after the randomness
extraction process, a bit rate of 508 Mbps is potentially achieved. On the other
hand, due to the high-bit rate of the 1 GHz prototype, no digitization process is
implemented yet.
34
Field demonstration 35
4.1 Prototype at 127 MHz
Figure (4.1) shows the block diagram of the setup. Firstly, a VCO at 127 MHz is
used as the input of a pulse generator card designed at the e-workshop at ICFO,
which generates 2 ns electrical pulses. Then, a DFB Alcatel A 1095 LMI laser diode
biased below threshold is used to generate 1 ns optical pulses using gain-switching
techniques. These optical pulses are interfered using an unbalanced Mach Zender in-
terferometer (U-MZI) and photodetected using a 10 GHz bandwidth photodetector.
For the digitization process, a real time fast digitizer card (Acquiris U1084A) is used.
After digitization, an FPGA card should be used for real-time signal processing, but
as a first step, this processing is done in a current PC.
LDPMF
PMF
PMC PMC
PD
RF splitter
trigger out
Sinusoidalsignal - VCO
Pulse generator@icfo
U1084Adigitizer
PCIe bus
PC
Figure 4.1: Scheme of the prototype implementing quantum random numbergeneration using amplified vacuum field. (i) VCO is a voltatge controlled oscillatorgenerating a sinusoidal at 127 MHz, (ii) the RF splitter extracts a trigger signal fromthe VCO, (iii) electrical pulses are generated using a card designed at ICFO, (iv)a DFB LD generating optical pulses, an interferometer and a photodetector makethe optical setup, (v) the U1084A digitizer is a fast 8-bit digitizer communicating
with a current PC (Personal Computer) through a PCIe bus.
4.1.1 Digitizer card. Agilent U1084A
After programming and testing the digitizer card shown in Fig. (4.2), we realized
about some limitations these commercial cards have for our purposes. These cards
are designed to resolve very fast signals happening after an specific event occurs,
e.g. transients in the rising edge of an incoming signal. Contrary, we only need to
detect one sample per pulse, i.e. 1 sample/trigger approach, but we do not need
all samples in the middle. However, this is not possible with current digitizer cards
because of the rearming time or dead time, i.e. the time needed by the electronic
card to use a new trigger (⇡ µs).
Field demonstration 36
Figure 4.2: Agilent U1084A connected to an 8x PCIe slot.
Furthermore, the asynchronous relation between the sampling clock and the trigger
signal is also challenging. The internal sampling clock has to be thought as continu-
ous, whereas the trigger depends on the incoming signal and has nothing to do with
the card, see Fig. (4.3).
Sampling interval
trigger 1
delay timedelay time
first sample
first sample
dead time trigger 2
nbr samples nbr samples
Figure 4.3: In this picture is shown the asynchronism between the trigger arrivaltime (depending on the user) and the sampling clock (continuously running). Thedepicted parameters represent: (i) Sampling interval is 500 ps, the pulse width ofthe pulse is 1 ns, i.e. on average 2 samples/pulse, (ii) delay time is a settable timethe card waits to start acquiring after the trigger arrives, (iii) first sample is the firstsample taken before expiring the delay time, i.e. an uncertainty on average of 250ps exists on the exact point you want to sample, (iv) trigger 1 and trigger 2 are twodi↵erent time arrivals, as can be seen, in the first trigger the first sample measuredis the better one, but not in the second trigger, demonstrating the incapability ofthe system to be used in 1 sample/trigger approach, and (v) nbr Samples is the
number of samples acquired after a trigger arrives.
When the 1 sample/trigger approach was discarded, an output reference at 10 MHz
was used for synchronization purposes between the digitizer card and the prototype.
Field demonstration 37
Using this clock, the frequency deviation because of clocks mismatches are mini-
mized. Particularly, the free-running time where clocks can deviate is given by 1/10
MHz = 0.1 µs.
4.1.2 Field demonstration at NIFS
Despite the limitations due to the digitization process, a solution was found to test
the generator in a real life application. In June 2013, the quantum random number
generator developed at ICFO was tested at the simulation division of the National
Institute for Fusion Science (NIFS) in Japan.
In order to solve the asynchronous limitation explained above, enough samples after a
trigger event were captured, and using post processing, the desired one was selected.
Basically, a PRF = 127MHz gives a period of ⇡ 8 ns, therefore, as the sampling
clock is 2 Gsps, 16 samples are captured per period 1. Then, the number of samples
to be taken after the trigger (nbr Samples) is set to 16 and using post processing
the biggest one is selected whereas the remaining are discarded. After samples are
generated, the Whirlpool hash function with a 1.5 reduction factor is applied, and
6-bit output random numbers are obtained.
Note that due to the 1.6µs dead time, the current bit rate is reduced down to
1/1.6µs = 625 kbps at most.
Laser diode
Photodiodecircuitery
VCO
CLK OUT
Currentdriver
RF Stage
Figure 4.4: Prototype for the field demonstration at NIFS. It is shown the dis-tribution of the electronic components on the PCB.
1Actually, not exactly 16 but using 16, you can be sure you are sampling all possible data froma period, and maybe one extra from the following period.
Field demonstration 38
4.1.3 Fortran/C++ compatibility
Fortran is the programming language people in high-volume simulations usually
use. On the other hand, the card has to be programmed in C/C++. Hence, some
compatibility issues have to be taken into account not to mess up with the data.
Basically, five main rules were considered:
• Adding underline before the C++ function name, e.g. generatenumbers(int
*amount, int *rng).
• Case sensitivity in variable names.
• Variables have to be passed by reference, always.
• Using functions with no return value. Also, Fortran cannot directly call meth-
ods.
• Using int data type in C++ for compatibility with Integer32 data type in
Fortran.
4.1.4 Measurements and results
Once the whole setup and coding was properly working, several sets of data were
generated and statistically tested using their codes. For instance, a continuous set of
(i) 1000 sequences of 5000 numbers and (ii) 500 sequences of 5000 numbers. Results
for the histogram of a random execution can be seen in Fig. (4.5).
Figure 4.5: After generating all the data and applying the randomness extractorwith a 1.5 reduction factor, the output histogram can be calculated. The uniformdistribution obtained indicates that the randomness extraction is working properly
and therefore good quality random numbers are obtained.
Field demonstration 39
In order to analyze the quality of the generated numbers, some statistical codes
developed by themselves were applied. All of them were past.
4.2 Alternative pulse generation using step recovery diodes.
Prototype at 1 GHz.
The pulse generator developed at ICFO provides 200 MHz at most. If a faster
prototype is to be developed, a pulse generator alternative has to be designed. Par-
ticularly, there is a very cheap solution using a VCO and an step recovery diode
(SRD), see scheme in Fig. (4.6). In this section, a pulsed signal generated with SRD
at 1 GHz is reported.
RF splitter
trigger out
G
Sinusoidalsignal - VCO
SRD
5.1 nHa b
(a) Schematic
VCOSRD
CLK Out
Pulsed signal
(b) Setup
Figure 4.6: An step recovery diode is used to convert an input sinusoidal signalinto a pulsed signal at the same frequency.
The SRD stores charge during the positive half of the input sinusoidal signal, and
abruptly discharges during the negative half, see Fig. (4.7). The pulse width (PW )
achieved using this technique is determined by:
PW = ⇡pLC, (4.1)
where C = 0.2...0.4 pF is the internal SRD’s capacitance and L an external induc-
tance used to minimize the pulse width. As the circuit is frequency dependent, not
all L,C values are possible, some of them resonate. After several tries, the best
value for L = 5.1 nH. The theoretical pulse width with this inductance is 150 ps,
and the real one is measured to be 180 ps.
A prototype at 1 GHz pulse repetition frequency was built. However, the digitization
step is not included because of its di�cult implementation.
Conclusions 40
0 0.5 1 1.5 2 2.5 3−50
−40
−30
−20
−10
0
10
20
30
Time [ns]
Curr
ent [m
A]
ab
Figure 4.7: Dashed blue line shows the input sinusoidal signal and black line theoutput pulsed signal. The pulse width is 180 ps, close to the expected 150 ps value.
Figure 4.8: In this picture is shown a prototype at 1 GHz PRF. The output ofthe device is an electrical signal with random amplitudes at a frequency of 1 GHz.
An step recovery diode and a VCO are used as RF injection.
4.3 Conclusions
It is demonstrated a working prototype generating optical pulses at 127 MHz in a
real application at the simulation division of the National Institute of Fusion Sciences
in Japan. All their randomness requirements were passed in terms of quality.
Currently, the maximum throughput achievable because of the rearming time is 625
kbps, but using an external reference clock, this bit rate will be increased up to 500
MHz.
Conclusions 41
On the other hand, for the laser diode driving circuitry, an interesting technology
based on a voltage controlled oscillator and an step recovery diode is introduced as
an extremely cheap solution for direct laser diode modulation.
Chapter 5
Conclusions
Quantum random number generators exploit the intrinsic randomness of quantum
mechanics as their randomness source. These schemes are very suitable for the sim-
ulation industry, where current generators started showing patterns. Also, for the
field of quantum key distribution, a system which security is based on the laws of
quantum mechanics requires random number generators based on the same princi-
ples.
This Thesis explores a quantum random number generator based on vacuum field
fluctuations using gain switching techniques. It predicts that this is the fastest
solution using vacuum fluctuations. Also, as microscopic random phases are trans-
lated into macroscopic optical intensities, it is a cheap and easy to commercialize
technology.
In addition to the specific applications described above, this quantum random num-
ber generator has a high potential to gain market share from classical random num-
ber generators because it is simple, compact, reliable and fast. Furthermore, this
research has initiated two collaborative projects. First with the simulation division
of the National Institute for Fusion Sciences (NIFS) in Japan, to test the generator
in high volume stochastic simulations. Second with the National Institute of Stan-
dards and Technologies (NIST), in the US, to include the system in the first attempt
to build a loophole-free experiment.
42
Conclusions 43
Future work
Bit rates up to 200 Gbps are predicted using established methods of semiconduc-
tor lasers. Thus, improving electronics for the laser driver and the digitizer is an
interesting experimental work to verify this prediction. Also, from the theoretical
point of view, more complex models on semiconductor lasers based on the stochastic
rate equations, the Fokker-Plank equation and the Kramer-Moyal coe�cients may
be interesting to better understand the physics behind semiconductor lasers, mainly
in the transients in gain-switching mode. Furthermore, the work on quantifying the
randomness of the phase in an interferometric process can be extended. Particularly,
quantifying the extractable randomness from non-uniform distributions of the phase.
It is important to compare di↵erent techniques based on vacuum field fluctuations.
This will confirm our intuition that biasing the laser diode below threshold allows
faster bit rates than biasing the laser above threshold.
Appendix A
Estimators. Errors on quantities
due to finite sequence size.
Abstract - Calculations such as the mean, the variance or the correlation requires an
infinite amount of data to give an exact value. In order to solve this practical drawback,
some estimators are defined and the error made using them is quantified and found to be
sequence size dependent. In this appendix, is commented an estimator for the correlation
and the statistical noise related to the sequence size (N).
44
Appendix A. Estimators. Errors on quantities due to finite sequence size. 45
Errors on quantities due to finite sequence size
Morgan W. Mitchell
Institut de Ciencies Fotoniques, Av. Carl Friedrich Gauss, 3, 08860 Castelldefels, Barcelona, Spain.
sciences
July 20, 2013
Given a random variable z, the mean or expec-tation value is defined as:
E[z] ⌘X
z
zP (z), (A.1)
where P (z) is the probability mass function ofz. Note that E[z] is an exact number, definedin terms of the underlying distribution P, some-thing that we cannot measure, but might hy-pothesize, e.g. ”assume a perfect coin, withP (0) = P (1) = 1/2”. Nevertheless, E[z] is re-lated to observable through
E[z] = limN!+1
1
N
N
X
i=1
zi
, (A.2)
where zi
are independent realizations of z.
Of course we never measure an infinite numberof realizations, so we never can measure E[z] ex-actly. How well can we estimate E[z]? We definean estimator for the mean
z(N) ⌘ 1
N
N
X
i=1
zi
, (A.3)
where N is the number of realization (aka sam-ples) z
i
. This is called the sample mean. Notethat the sample mean is itself a random variable:if you generate a new set of realizations {z
i
} youwill compute a new z(N). Also it is an ”unbiasedestimator” (on average it gives the right value):E[z] = E[z].
We will need the second moment of z in the nextstep. This is
E[z2] = Eh 1
N2
N
X
i=1
N
X
j=1
zi
zj
i
= limN!+1
1
N2
⇣
N
X
i=1
z2i
+N
X
i 6=j
zi
zj
⌘
(A.4)
We are assuming that zi
and zj
are indepen-dent for i 6= j, so the last term in parentheses is
N(N � 1)E[z]2. Rearranging we have
E[z2] =1
N
�
E[z2]� E[x]2�
+ E[z]2�
. (A.5)
The variance of z(N) is now easy:
var(z) ⌘ E[z2]� E[z]2
⌘ 1
N
�
E[z2]� E[z]2�
⌘ 1
Nvar(z)
�
. (A.6)
This equation is just the square of the familiar”standard error of the mean” formula.
�z
=�zpN
(A.7)
Correlations
The correlation function we are most interestedin is
�d
⌘ E[xi
xi+d
]� E[xi
]E[xi+d
]. (A.8)
This express the tendency of a random variablex to fluctuate with (positive �) or against (nega-tive �), the same random variable, but d sampleslater. If we assume that the random variableis stationary, i.e. that its statistical properties(means, correlations, etc...) do not depend oni, then we have E[x
i
]E[xi+d
] = E[x]2 becauseE[x
i
] must be the same for all i. Similarly, wenote that E[x
i
xi+d
] can only depend on d, noton i. This suggests an estimator �
d
for �d
basedon N samples of x:
�d
(N) ⌘ 1
N � d
N�d
X
i=1
xi
xi+d
� E[x]2. (A.9)
By linearity of the sum, it is clear that this is anunbiased estimator.
Appendix A. Estimators. Errors on quantities due to finite sequence size. 46
We would like also to know the variance or stan-dard error of �
d
, so that we can say when we areobserving a real correlation rather than a statis-tical fluctuation. We note that Eq. (A.9) andEq. (A.3) are very similar. In fact, if we recog-nize that x
i
xi+d
is itself a random variable, theyare almost identical, the only di↵erences beingN versus N � d and the constant �E[x]2 in Eq.(A.9), but that contributes nothing to the vari-ance.
Testing for significant correlations
We can now say how much correlation we expect(including the variance) if our data are reallyrandom. If we see more correlation than this,we can call it significant. By ”really random” wemean that x has P (0) = P (1) = 1/2 and thatall the x
i
are independent. Then it is simple tocompute (e.g. �
3
= P (0)P (0)0 · 0 + P (0)P (1)0 ·1+P (1)P (0)1 · 0+P (1)P (1)1 · 1� 1
2
1
2
= 1
4
� 1
4
).
E[�d
]
⇢
1/4 d = 00 d 6= 0.
We can also compute
var{�d
}⇢
1/4 d = 03/16 d 6= 0,
Combining the above, now have the standarddeviation of �
d
for the perfectly random case:
var{�d
}⇢
1/(4N) d = 03/[16(N � d)] d 6= 0,
In summary, given a sequence of bits xi
, i =1...N , we can compute �
d
(N) and compare toq
var{�d
(N)} given above. If it is larger bymore than a factor of a few, then it is signifi-cantly di↵erent than statistical noise.
Appendix B
Detailed data analysis
Abstract - In May 2013, during a five-day period, data were gathered for post-processing
at the Universitat politecnica de Valencia UPV. In the next page, a report analyzing all
these data is presented and a measurement-procedure-dependece is found and corrected.
The correlation before and after randomness is calculated with an original sequence size of
108 numbers.
47
Appendix B. Detailed data analysis 48
MAMBO QRNG data analysis
Carlos Abellan
Institut de Ciencies Fotoniques, Av. Carl Friedrich Gauss, 3, 08860 Castelldefels, Barcelona, Spain.
sciences
August 9, 2013
Measurement procedure
To be able to measure data at a pulse repeti-tion frequency (PRF) of 5.825 GHz, a sam-pling oscilloscope with 12.5 GHz bandwidthwas used. The signal seen in the screenof a sampling oscilloscope is a reconstruc-tion of samples coming from di↵erent pulsesin time, for this reason, only periodic sig-nals can be seen with a sampling oscilloscope.Smartly using this feature, we can measuredata coming from subsequent random pulsesby setting a window and reading out sam-ples in the screen. Particularly, a window of100 samples ⇥ 80 ps/4000 samples = 2 ps wasused.
Repeating this procedure, more than 1.4⇥ 106
files were generated during a 5-day period.
Data rejection method
There were some files where data was wrongbecause of errors in detection/sampling pro-cesses. Those values were easily detectablebecause they were outside the feasible ouputinterfering range. The procedure to discardthem, in an easy coding-compliant way, wasas follows: from each 100-samples file, a vectorx = {x
1
, ..., x100
} is created. If xi
> ⇠, being⇠ a threshold related to the feasible interferingrange, the whole vector x is discarded. Afterapplying this computation to all files, 1.2⇥106
14-bit numbers were obtained.
Correlation
The correlation function of a sequence x is de-fined as:
�d
= E[xi
xi+d
]� E[xi
]E[xi+d
]. (B.1)
For a perfect random and infinite string ofnumbers, �
d
= 0 for d 6= 0. However, for a ran-dom and finite sequence, �
d
fluctuates around
0 with an statistical noise which strength de-pends on the sequence size.
Accordingly, we define an estimator �d
for thecorrelation �
d
. Being N the sequence size,
�d
=1
N � d
N�d
X
i=1
xi
xi+d
� E[x]2. (B.2)
Results
According to the measurement procedure, cal-culating the correlation mixing samples com-ing from di↵erent files is useless because theyare not subsequent in time. Thus, as the cor-relation is a local calculation, i.e. it envolvessamples spaced by d, i.e. x
i
and xi+d
, we cancalculate the correlation at a distance d 50without having to mix samples from di↵erentfiles.
0 10 20 30 40 5010
−5
10−4
10−3
10−2
10−1
100
Shift d
Corr
ela
tion
Positive valuesNegative values
Figure B.1: Autocorrelation func-tion with no samples mixture and 10
Ms size
In Fig. (B.1) and Fig. (B.2) can be seen that,despite having a correlation below 30 dB, thereis a decreasing tend which needs to be carefullyanalysed.
Appendix B. Detailed data analysis 49
0 10 20 30 40 50−1
−0.5
0
0.5
1
1.5
2
2.5
3x 10
−3
Shift d
Corr
ela
tion
Figure B.2: Same correlation thanFig. (B.1) but using linear axis. Notethat the value for d = 0 is not plot. Itlooks like the real correlation is at the20 dB level. The rising correlation forthe 100 samples per pulse case is dis-
cused further.
Forgetting about the measurementprocedure.
The autocorrelation function tells us how sim-ilar amplitudes at a distance d are. Therefore,the correlation at a distance d = 100 wouldimply the calculation of x
i
xi+100
, where xi
and xi+100
come from di↵erent files. With thephysical process in mind, this makes no sensebecause between files, at least 100 ms wherelost, i.e. more than 1 ⇥ 106 pulses. Thus, anycorrelation observed for d > 100 has nothingto do with the physical process. Nevertheless,forgetting about the measurement procedure,we can analyze the correlation of a sequence ofnumbers and see how it looks like.
0 100 200 300 400−5
0
5
10
15
20x 10
−3
Shift d
Corr
ela
tion
Figure B.3: Correlation for d > 100shows an oscillatory behavior.
In Fig. (B.3), an oscillating correlation func-tion is observed. Coincidentally, the pe-riod is 100 samples. Namely, equal to thenumber of samples per file. In order totest a measurement-dependent correlation, theamount of numbers used per file is reduced to50 and consequently, the period is also reducedto 50, see Fig. (B.4).
0 50 100 150 200−0.005
0
0.005
0.01
0.015
0.02
0.025
Shift d
Corr
ela
tion
Figure B.4: Same calculation as inFig. (B.3) but reducing the amount
of samples used per file to 50.
Thus, it come to a conclusion that the oscil-lating period is window size dependent. Toanalyze this lattest phenomena, we come backagain to the measurement procedure. As thewindow size was very small, we thought nosignificant amplitude variation would be ob-served between samples at di↵erent points. Af-ter some processing, we can see that in fact,there is a strong variation, see Fig. (B.6).
time window
1
2
3
4
Figure B.5: The average meanvalue at di↵erent positions within afile is di↵erent due to the window size.
Let’s analyze an easy example for a sequencesize N = 4. We define x = {x
1
, x2
, x3
, x4
} andx0 = {x0
1
, x02
, x03
, x04
}, two vectors from two dif-ferent files. On average, x
i
> xi+1
and x0i
>x0i+1
due to the measurement procedure, see
Appendix B. Detailed data analysis 50
Fig. (B.5). Then, we can calculate the corre-lation for di↵erent values of d. For instance, ford = 0, �
0
= x1
x1
+ ...+x04
x04
the summation ofthe squares, i.e. the largest possible value. Inparticular, let’s analyze the case d = 2, where�2
= x1
x3
+x2
x4
+x3
x01
+x4
x02
+x01
x03
+x02
x04
.Without considering the fact that less valuesare being used, the value �
2
will always be, onaverage, the smallest correlation because thebiggest samples from the vector x are multi-plied by the smallest of the subsequent vectorx0. Hence, the product is on average smaller.Generalizing, being N the amount of numbersper file, the oscillation in the correlation func-tion has a maximum at d = k ⇥N and a min-imum at d = k ⇥N/2, where k = 0, 1, 2....
Weight compensation
In order to solve the time window drawback,samples are scaled depending on its positionwithin the file. In order to see how much theaverage decreases at each part of the pulse, aset of files {f
1
, ..., f100
} is created containingsamples from each position, e.g. in f
1
is storedthe first number of every file. Being i the po-sition within a file, the average value for eachposition µ
i
is depicted in Fig. (B.6).
0 20 40 60 80 1001900
1950
2000
2050
2100
Position within the file
Mean
Figure B.6: Mean value for eachposition within the file. It decreases
almost linearly.
Thus, data at the i-th position is compensatedby multiplying by a correction factor ↵
i
definedby:
↵i
=µ1
µi
. (B.3)
After compensation, the histogram and thecorrelation function are calculated again.
From the correlation point of view, a veryimportant improvement is achieved, see Fig.(B.7). Before compensating, a band histogramstructure was observed. After compensating,this is not observed.
0 1000 2000 3000 4000 5000 60000
1
2
3
4
5
6
7x 10
4
BinsC
ounts
Non−compensated Compensated
Figure B.7: The band-structureseen before is overcome with ampli-
tude compensation.
On the other hand, from the correlation pointof view, oscillations seen before compensat-ing are improved. In fact, no oscillation isobserved, confirming the intuition describedabove, see Fig. (B.8).
0 20 40 60 80 100−1
−0.5
0
0.5
1
1.5
2
2.5
3x 10
−3
Shift d
Corr
ela
tion
Non compensated Compensated
Figure B.8: Correlation before andafter compensation.
Hashed correlation
After hashing the data using the Whirlpoolhash function, the autocorrelation is calculatedagain. The �
d
< 10�4 level indicates that weare close the statistical noise. The setting for
Appendix B. Detailed data analysis 51
this calculation1 are: Ngroup
= Navg
= 105
and amount of numbers: 50 Ms.
0 50 100 150 20010
−8
10−6
10−4
10−2
100
Shift d
Corr
ela
tion
Positive valuesNegative values
Figure B.9: Correlation after ran-domness extraction. The correlationlevel is within the statistical noise dueto finite sequence size, i.e. no corre-
lation is observed.
0 50 100 150 200−6
−4
−2
0
2
4x 10
−4
Shift d
Corr
ela
tion
Figure B.10: Correlation after ran-domness extraction. The correlationlevel is within the statistical noise dueto finite sequence size, i.e. no corre-
lation is observed.
Final results
Then, using the correction factor definedabove, the correlation is calculated again. Thesettings for this calculation are: N
group
= 100,N
avg
= 104 and amount of numbers used 100Ms.
0 10 20 30 40 5010
−8
10−6
10−4
10−2
100
Shift d
Corr
ela
tion
Positive valuesNegative values
Figure B.11: Correlation after ran-domness extraction. The correlationlevel is within the statistical noise dueto finite sequence size, i.e. no corre-
lation is observed.
0 10 20 30 40 50−2
−1
0
1
2x 10
−4
Shift d
Corr
ela
tion
Figure B.12: Raw correlation andstatistical noise. As observed, no sig-
nificant correlation is measured.
Conclusions
• The observed oscillatory behavior of thecorrelation is a consequence of the mea-surement procedure. It has nothing to dowith the physical process.
• In order to compensated window size am-plitude variations, a correction factor isapplied to the data in the calculation.
• In order not to be a↵ected by drifts in the5 day period measurements were taken,the expected value in Eq. (B.2) is calcu-lated using the N previous samples.
• A correlation close to the statistical noiseis observed using the raw data. No im-provement in this result is observed com-pared to the hashed data.
1The code developed for calculating the correlation of a large vector in subgroups of 100 sampleswithout mixture can be used to calculate any large correlation in a cheap computational way.
Appendix B. Detailed data analysis 52
Appendix C
Parities. The simplest
randomness extractor.
Abstract - Randomness extractors allows the conversion from a non-uniform distribution
to a uniform distribution at the cost of losing output bits. Nevertheless, they are usually
complicated and we cannot have full control on the process. Thus, in this appendix is
analyzed the simplest, and also ine�cient, randomness extractor, which is the parity. Now,
the influence of the extraction process is controlled and the correlation at di↵erent parities
is compared. As expected, the parity of several bits is more random than any given bit.
53
Appendix C. Parities. The simplest randomness extractor. 54
Parities and correlationsMorgan W. Michell & Carlos Abellan
Institut de Ciencies Fotoniques, Av. Carl Friedrich Gauss, 3, 08860 Castelldefels, Barcelona, Spain.
sciences
August 9, 2013
Note - All information about correlations canbe found in Appendix A.
Deepening in the experiment and the definitionof correlation, a more accurate calculation couldbe performed. First of all, data were taken dur-ing a five-day period both to accumulate moresamples and to test for repeatability and long-term stability. Using the setup described inChapter 3, subsequent optical pulses were sam-pled in groups of 100 and stored in di↵erentfiles. This was repeated many times accumu-lating 1.2⇥ 108 14-bits random numbers.
The correlation function finds relations with thesequence and itself d samples later. Therefore,numbers coming from di↵erent files cannot bemixed because some samples were lost betweeneach file acquisition, i.e. samples from di↵erentfiles are not continuous in time.
0 10 20 30 40 50−2
0
2
4
6
8
10
12x 10
−4
Shift d
Corr
ela
tion
Figure C.1: Bit correlation �d
com-puted with 120 Mbits. Red lines show±� interval for ”perfect coin” idealcase. Correlations at the 10�3 level areclearly above the statistical noise, andare presumably due to ”slow” (¿ 1 ns)
electronic noise.
The parity calculation is the most basic ran-domness extractor, and also the most ine�cient.However, using this calculation, we can fully con-trol the process and analyze the correlation at
di↵erent parity levels. A naive intuition suggeststhat the parity of several bits is more randomthan any given bit. Furthermore, parity calcu-lations are very attractive because these calcu-lations can be done very fast and low latency.
First of all, we perform a 1-bit digitization asfollows: x
i
= 0 if xi
< µi
and otherwise for xi
= 1, where µi
=P
i�1
i=1
xi
is the average of allprevious events. After the 2-bit digitization pro-cess on the data, 1.2 ⇥ 106 strings of 100 bitsare obtained, which are then analyzed for cor-relations1. In Fig. (C.1), a correlation at the|�
d
| 1.2 ⇥ 10�3 level is visible above the sta-tistical noise.
0 5 10 15 20 25−1
−0.5
0
0.5
1
1.5
2x 10
−4
Shift d
Corr
ela
tion
Figure C.2: k=2 parity correlation�d
computed from 120 Mbits, con-verted to 60 Mbits parity values. Redlines show ±� interval for ”perfectcoin” case. Aces are as in Fig. (C.1).Correlations are reduced below the10�4 level, but are still visible above
the statistical noise.
Parity - With the binary sequence computed,the parity is calculated as follows: we reducea given 100-bit sequence {x
1
, x2
, ..., x100
} to astring of length N
k
= b100/kc by taking theparity of subsequent groups of length k, e.g. fork = 3,
{y(k)1
, ..., y(k)Nk
} = {x1
�x2
�x3
, ..., x97
�x98
�x99
}1All computing is done using C++ because Matlab takes long time to compute such a large
amount of data. Details can be found attached in Appendix E
Appendix C. Parities. The simplest randomness extractor. 55
, where � indicates addition modulo 2.
0 2 4 6 8 10 12−1.5
−1
−0.5
0
0.5
1
1.5x 10
−4
Shift d
Corr
ela
tion
Figure C.3: 4-bit parity
Results for k = 2 are shown in Fig. (C.2), in-dicating correlations near the statistical uncer-tainty. Finally, for k = 3, 4, no detectable corre-lations are seen. If any, remains masquerade bythe statistical noise.
Appendix D
Quantum entropy
quantification.
Abstract - In this appendix, a method to extract the randomness from a random variable
within a cosine in an interferometric process is presented. Using the cumulants such as the
mean and the variance, and prior knowledge about the behavior of the phase, the visibility
and the min-entropy of the phase distribution are estimated. For uniform phase distributions,
the min-entropy is derived to increase linearly with half the resolution of the digitaizer.
56
Appendix D. Quantum entropy quantification. 57
Quantifying the extractable randomness from a random phase in an
interferometric process
Carlos Abellan and Morgan W. Mitchell
Institut de Ciencies Fotoniques, Av. Carl Friedrich Gauss, 3, 08860 Castelldefels, Barcelona,
Spain. sciences
August 9, 2013
Mainly in cryptography and random number generation, the amount of ran-domness related to an specific variable needs to be quantified in order to beextracted. For instance, in random number generation, several quantum ran-dom number generators need to quantify the amount of randomness arisingfrom the quantum phenomena only in order to remove the classical contri-bution. On the other hand, in cryptography, imagine Alice wants to send amessage to Bob X, but Eve has some information E about the message, i.e.H(X|E) = e, where H denotes Shannon entropy. Being H(X) = x the en-tropy of the original message, to Eve, only x�e bits are still random. Thus forthe privacy amplification step [36] Alice and Bob need to perform to removeEve’s knowledge on the message, quantifying e has prominent importance.
In this paper is introduced a method to quantify the amount of extractablerandomness from a random phase in an interferometric process based on priorknowledge of the statistics of the phase.
Definitions, notations and assumptions
Let us denote the expected value of a random variable xi
(i = 1, 2, ...K) byE(x
i
) = Xi
and the variance of xi
by Vi
. Making no assumptions on the setof K random variables defined above, the variance of the sumation and thevariance of the product of the K random variables are defined by [37, 38]
V⇣
K
X
i=1
xi
⌘
=K
X
i=1
a2i
V (xi
) +X
i 6=j
ai
aj
Cov(xi
, xj
), (D.1)
V⇣
K
Y
i=1
xi
⌘
= En
K
Y
i=1
x2
i
o
��
K
Y
i=1
xi
2
, (D.2)
where ai
are constants and Cov indicates covariance matrix.
For the sack of simplicity, if the random variables are assumed to be indepen-dent, this pair of equations is greatly simplified to:
V⇣
K
X
i=1
xi
⌘
=K
X
i=1
a2i
V (xi
), (D.3)
V⇣
K
Y
i=1
xi
⌘
= En
K
X
i=1
x2
i
o
�K
Y
i=1
X2
i
, (D.4)
Appendix D. Quantum entropy quantification. 58
Having in mind we are insterested in quantifying the amount of randomnessfrom an interferometric process using real data, we will assume the randomvariables to be uncorrelated, which is a very common simplification.
Interference
Defining u1
, u2
the interfering intensities, unoise
accounting for backgroundnoise, V is the visibility and � = �
1
� �0
the phase di↵erence between subse-quent samples, the intensity u(out) at the output of the interferometer is definedby
u(out) = u1
+ u2
+ 2|V is|pu1
u2
cos(�) + u2
noise
. (D.5)
This expression is the addition of 4 random variables u1
, u2
,pu1
pu2
cos�and u
noise
, wherepu1
pu2
cos� is in turn the product of 3 random variables:b1
=pu1
, b2
=pu2
and cos�. Thus, using Eq. (D.3) and Eq. (D.4), thevariance at the output of the interferometer can be calculated as
V�
b1
b2
cos��
=
= V�
b1
�
V�
b2
�
V�
cos��
+ V�
b1
�
V�
b2
�
E{cos�}2
+ V�
b1
�
V�
cos��
E{b2
}2 + V�
b2
�
V�
cos��
E{b1
}2
+ V�
b1
�
E{b2
}2E{cos�}2 + V�
b2
�
E{b1
}2E{cos�}2
+ V�
cos��
E{b1
}2E{b2
}2 (D.6)
where the probability distribution function of b1,2
is given by
Pb
(Y ) =X
i
�
�
�
d
dYf�1
i
(Y )�
�
�
PX
�
f�1
i
(Y )�
. (D.7)
As u1
is positive-definite, u1
= f�1
i
(Y ) = Y 2 and d/dY f�1
i
(Y ) = 2Y . Then,being u
1
a gaussian distribution with mean µ and standard deviation �,
Pb
(y) =|2y|p2⇡�
expn
��
y2 � µ�
2
2�2
o
. (D.8)
The mean and the variance of this new distribution are not obvious and involvesthe summation of Bessel functions of the first order I
n
(x), see Eq. (D.9) andEq. (D.10). Nevertheless, for k = µ/� >> 1, the distribution of Y =
pu1
iswell approached by a gaussian distribution with mean and variance given by:
E{Y } =
Z 1
0
yPY
(y)dy
=
p⇡
4p2µ�
e�k2
4
h
µ2I�1/4
�
k2/4�
+�
µ2 + 2�2
�
I1/4
�
k2/4�
+ µ2
⇣
I3/4
�
k2/4) + I5/4
�
k2/4�
⌘i
(D.9)
Appendix D. Quantum entropy quantification. 59
E{Y 2} =
Z 1
0
y2PY
(y)dy
=1
2
⇣
µ+
r
2
⇡�e�k
2/2 + µErf
�
k/p2�
⌘
(D.10)
Prior knowledge
We are trying to quantify the amount of extractable randomness within thephase in an interferometric process. Using prior knowledge on the behavior ofthe physical process producing the randomness on the phase will lead us tosimple expressions.
Uniform distributions
Let’s first analyze the simplest case, i.e. the phase � = �1
� �0
is uniformlydistributed in [�⇡,⇡). With this assumption, the random variable cos� isdescribed by the arcsine probability distribution function, which statistics aregiven by
pdf(x) =1
⇡p
(x� a)(b� x); µ
x
=a+ b
2; V (x) =
1
8(b� a)2 (D.11)
Then, as cos� goes from �1 to 1, using Eq. (D.11) with a = �1 and b = 1,its mean and variance read E{cos�} = 0 and V (cos�) = 1/2. Replacing thesevalues in Eq. (D.6), the visibility of the interference can be statistically inferusing measurable of all other variables, see Eq. (D.12).
|V is|2 =1
2
V�
u(out)
�
� V�
u1
�
� V�
u2
�
� V�
unoise
�
A(D.12)
where,
A = V�
b1
�
V�
b2
�
+ V�
b1
�
E{b1
}2
+ V�
b2
�
E{b2
}2 + E{b1
}2E{b2
}2
With the visibility estimated, the probability distribution function producedby the random phase only can be described by an arcsine distribution between(lim
inf
, limsup
), where
⇢
liminf
= hu1
+ u2
� 2|V is|pu1
u2
i,lim
sup
= hu1
+ u2
+ 2|V is|pu1
u2
i,
are the destructive and constructive interfered values respectively and h x idenote the mean value of x.
Appendix D. Quantum entropy quantification. 60
To check the algorithm, u1
, u2
, unoise
are modeled as gaussian random variablesand � as a uniform distribution. Then, a set of 2 ⇥ 105 random numbersare generated for each variable. After that, the visibility is set to a knownvalue and Eq. (D.5) is simulated for: (i) � the only random variable (idealdistribution) and (ii) with the set of generated random numbers (measureddistribution). Finally, V is is infer and the corresponding arcsine distributionis calculated (arcsine fitting, see Fig. (D.1(a)). In terms of the min-entropy,the ideal distribution has H1 = 5.3324 and the reconstructed distributionH1 = 5.3297.
0 1 2 3 40
0.005
0.01
0.015
0.02
Intensity [a.u.]
No
rma
lize
d h
isto
gra
m [
a.u
.]
Measured histogramPhase histogramArcsine fitting
(a) Fitting
0 0.2 0.4 0.6 0.8 10
0.2
0.4
0.6
0.8
1
Set visibility
Est
ima
ted
vis
ibili
ty
Set visibility
Estimated visibility
(b) Visibility estimation
Figure D.1: In Fig. (D.1(a)) the result of a simulation to test the algorithmis depicted. 2 · 105 pseudo-random numbers are used for each variable. The vis-ibility is set to V is = 0.75 and the algorithm recovers V is = 0.7495. Note thatfor visualization purposes, the measured histogram is scaled. In Fig. (D.1(b)) isshown the recovered value for a set visibility ranging from 0 to 1. As seen, the algo-rithm works perfectly well assuming the real distribution of the phase approaches
a uniform distribution.
Also, as shown in Fig. (D.1(b)), the visibility can be accurately estimated evenfor low values.
�1 and �0 are uniformly distributed
Being �1
and �0
two uniform distributions in [�k⇥⇡, k⇥⇡), where k = 1, 2, ...,the probability distribution function f(�) of � = �
1
� �0
is given by
f(�) = f(�1
) ? f(��0
) (D.13)
i.e. a triangular distribution in [�k ⇥ 2⇡, k ⇥ 2⇡). Defining n = 0, 1, ..., 2k �1, and according to the modulo 2⇡ cycle of the cosine, we can calculate theequivalent distribution not in [�k⇥2⇡, k⇥2⇡), but in [�⇡,⇡), e.g phases in theinterval [0, 2⇡) yields the same results as phases in [2⇥2⇡, 3⇥2⇡). Generalizing:
X
8n odd
Z
k0+⇡(n+1)
k0+⇡n
d�f(�) =1
2
X
8n even
Z
k0+⇡(n+1)
k0+⇡n
d�f(�) =1
2
where k0
= �k2⇡.
Accordingly, this is an equivalent scenario as the one presented in the case �uniform.
Appendix D. Quantum entropy quantification. 61
Di↵usion processes. � gaussianly distributed
A di↵usion process is described by a gaussian distribution. In this work, wewill demonstrate that a gaussian distribution with a large standard deviationwithin a cosine can be approximated by a uniform distribution. Hence, it canbe studied in the same way as the uniform distribution.
Probability density function of the cosine of a gaussian distri-bution
Being X a gaussian distribution, the probability density function of Y =cos(X � ⇠) can be derived using Eq. (D.8). Thus, assuming a zero meangaussian distribution and absorbing its mean, if any, in ⇠, the probability dis-tribution function of Y is given by:
PY
(Y ) =1p
1� Y 2
⇥X
si=±1
1X
nj=�1exp
n
� (si
arccosY + 2⇡nj
+ ⇠)2
2�2
o
(D.14)
Calculating the cumulants of this distribution is not obvious. Nevertheless,some simulations can be run so as to see how the distribution of Y behaveswith the shape of the gaussian distribution X. As depicted in Fig. (D.2),⇠ has strong influence on the result for � small, but has no influence for �large. Particularly, for � � 3, no matter the value of ⇠ that the error madeapproaching the gaussian distribution to a uniform distribution is smaller than1.5⇥ 10�4, see Fig. (D.2(d)).
(a) � = 1.0 (b) � = 2.0
(c) � = 3.0 (d) Error
Figure D.2: Simulation for di↵erent standard deviations � = 1.0, 2.0 and 3.0.In every picture, three plots represents ⇠ = 0,⇡/2,⇡ and the other parametersare u
1
= u2
= 100 and V is = 0.8. For � � 3, the resultant distribution can beapproached to a uniform distribution with an error smaller than 1.5⇥ 10�4
.
Appendix D. Quantum entropy quantification. 62
Min-entropy estimation
The min-entropy of a random variable X quantifies the amount of randomnesswhich can be extracted.
H1(X) = � log2
⇣
max8 xi
Pr[X = xi
]⌘
. (D.15)
Being Aadc
the ADC’s dynamic range, b its resolution and �b = Aadc
/2b thebin size, the probability of the first bin can be easily computed as a functionof A
adc
, b and lim0sup
doing the linear transformation lim0inf
= 0 and lim0sup
=lim
sup
� liminf
:
Pr[X = x1
]�
Aadc
, b, lim0sup
�
=1
⇡
Z
�b
0
1q
x(lim0sup
� x)dx
=2
⇡arcsin
s
Aadc
2blim0sup
. (D.16)
According to the definition of the min-entropy and the fact that arcsinx ⇡ x forx small, it can be easily seen that the probability of the first bin decreases ex-ponentially and therefore the min-entropy increases linearly with the resolutionof the histogram.
H1(X) = � log2
⇣
max8 xi
Pr[X = xi
]⌘
= � log2
⇣ 2
⇡arcsin
s
Aadc
2blim0sup
⌘
⇡ b
2� log
2
⇣
s
4Aadc
⇡2lim0sup
⌘
. (D.17)
Appendix E
Algorithm to compute the
correlation of discontinuous sets
of data
Abstract - Data taken in the high-speed experiments for the paper were collected in 100-
samples files. Thus, in order to calculate the correlation of those data, samples from di↵erent
files cannot be mixed. In this appendix is presented a method to calculate the correlation
of discontinuous sets of data. Furthermore, this algorithm can also be used to calculate the
correlation of very long sequences in a cheap computational way, e.g. imagine a sequence
of 100 Gbits, this would require at least 100 Gbits in memory to store data, using this
algorithm, the amount of required memory is reduced to vector’s size a computer can easily
handle. It can be done because the correlation function only involves samples separated by
a shift d, not all of them are required.
63
Appendix D. Algorithm for the autocorrelation of discontinuous sets of data 64
Algorithm to compute the correlation of discontinuous sets of dataCarlos Abellan
Institut de Ciencies Fotoniques, Av. Carl Friedrich Gauss, 3, 08860 Castelldefels, Barcelona, Spain.
sciences
August 9, 2013
The autocorrelation function gives informationabout the relationship between a set of data anditself after a shift of d samples. In theory, the cal-culation of the correlation involves infinite sam-ples. As this makes no sense in real calculations,the unbiased estimator �
d
is defined.
�d
=1
N � d
N�1
X
i=N�d
xi
xi+d
� E[x], (E.1)
where N is the sequence size, x the set of dataand E[ ] the expectation value.
Usually, when capturing real data, some sam-ples could be lost between acquisitions. Hence,despite storing all those values in a continuousstring, they are not continuous in time. Forinstance, imagine you are capturing pulses butyour acquisition system only allow you to acquireN
G
continuous pulses. If you want to captureN pulses, you will have to repeat the processN/N
G
times. Thus, samples from di↵erent ac-quisitions are not continuous in time, and there-fore, strictly talking, they cannot be mixed inthe calculation of the correlation.
In order to solve this practical inconvenience, analgorithm for calculating this type of correlationsis introduced.
Algorithm
The main advantage of this algorithm, in termsof memory, is that, to calculate the correlationof N samples, only N
G
<< N are required to bestored in memory. However, the price to pay isthat the amount of data used for the calculationis reduced by
d⇥N/NG
� d = d(N/NG
� 1)
The calculation is divided in two steps. In thefirst one, for each group of N
G
samples, its corre-lation is calculated for all shifts and accumulated
to ⇤d
, see Eq. (E.2). Namely, in ⇤d
is added thecontribution to the correlation of each set of dataat a distance d.
⇤d
=X
8i
h 1
NG
� d
NG2 �1
X
d=0
NG�1
X
m=d
xi
m
xi
m�d
� E[x]2i
,
(E.2)
where the upper index i indicates the i-th NG
-bit sequence. Note that no information abouthow long the sequence is is required.
After computing Eq. (E.2), ⇥ = bN/NG
c se-quences have been used. Finally, in the secondstep all those contributions are averaged, Eq.(E.3) .
�d
=
NG2 �1
X
d=0
⇤d
⇥. (E.3)
Autocorrelation of large amounts ofdata
In terms of memory, calculating the correlationof large vectors is very expensive. For instance,to calculate the autocorrelation of a sequence of109 numbers, a continuous vector of 109 posi-tions is required to be stored in memory. Aslong as the amount of shifts to be calculated issmall, i.e. d << N
G
< N being NG
the sub-group size and N the total size, the correlationcan be estimated using the algorithm introducedabove.
For instance, in my personal computer, the max-imum vector size allowed with C++ is 4 Ms.Then, if I only need the correlation for a rela-tively small d, setting N
G
= 4 Ms, the correla-tion of any sequence size can be calculated usingEq. (E.2) and Eq. (E.3).
Bibliography
[1] A. Tajima, A Tanaka, W. Maeda, S. Takahashi, and A. Tomita. Practical quantum
cryptosystem for metro area applications. IEEE Journal of Selected Topics in Quantum
Electronics, 13:1031–1038, 2007.
[2] A. Uchida, K. Amano, M. Inoue, K. Hirano, S. Naito, H. Someya, I. Oowada,
T. Kurashige, M. Shiki, S. Yoshimori, K. Yoshimura, and P. Davis. Fast physical
random bit generation with chaotic semiconductor lasers. Nature Photonics, pages
728–732, 2008.
[3] X. Cai and X. Wang. Stochastic modeling and simulation of gene networks - a re-
view of the state-of-the-art research on stochastic simulations. IEEE Signal Processing
Magazine, 24:27–36, 2007.
[4] C. Hall and B. Schneier. Remote electronic gambling. 13th Annual Computer Security
Applications Conference, 1997, pages 232–238, 1997.
[5] C. Petrie and J. Connelly. A noise-based ic random number generator for applications
in cryptography. IEEE Transactions on Circuits and Systems I, 47:615–621, 2000.
[6] I. Kanter, Y. Aviad, I. Reidler, and E. Cohen. An optical ultrafast random bit generator.
Nature Photonics, 4:58–61, 2010.
[7] A. Argyris, E. Pikasis, S. Deligiannidis, and Syvridis D. Sub-tb/s physical random
bit generators based on direct detection of amplified spontaneous emission signals. J.
Lightwave Technology, 30:1329–1334, 2012.
[8] Yasukazu Yoshizawa, Hiroshi Kimura, Hikaru Inoue, Keiko Fujita, Masao Toyama, and
Osamu Miyatake. Physical random numbers generated by radioactivity. Journal of the
Japanese Society of Computational Statistics, 12(1):67–81, dec 1999.
[9] T. Jennewein, U. Achleitner, G. Weihs, H. Weinfurter, and A. Zeilinger. A fast and com-
pact quantum random number generator. Review of Scientific Instruments, 71:1675–
1680, 2000.
[10] O. Kwon, Y.-W. Cho, and Y.-H. Kim. Quantum random number generator using
photon-number path entanglement. Appl. Opt., 48:1774–1778, 2009.
[11] H. Guo, W. Tang, Y. Liu, and W. Wei. Truly random number generation based on
measurement of phase noise of a laser. Phys. Rev. E, 81, 2010.
65
Bibliography 66
[12] 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:20665–20672, 2011.
[13] Feihu Xu, Bing Qi, Xiongfeng Ma, He Xu, Zheng Haoxuan, and Hoi-Kwong Lo. Ultra-
fast quantum random number generation based on quantum phase fluctuations.
[14] M. Wahl, M. Leifgen, M. Berlin, T. Rohlicke, H.-J. Rahn, and O. Benson. An ultrafast
quantum random number generator with provably bounded output bias based on photon
arrival time measurements. Applied Physics Letters, 98:171105–171105, 2011.
[15] C. Gabriel, C. Wittmann, D. Sych, R. Dong, W. Mauerer, U. Andersen, C. Marquardt,
and G. Leuchs. A generator for unique quantum random numbers based on vacuum
states. Nature Photonics, 4:711–715, 2010.
[16] S. Pironio, A. Acin, S. Massar, A.B. de la Giroday, D.N. Matsukevich, P. Maunz,
S. Olmschenk, D. Hayes, L. Luo, T.A. Manning, and C. Monroe. Random numbers
certified by bell’s theorem. Nature Photonics, 464:1021–1024, 2010.
[17] Mark Fox. Quantum Optics. Oxford University Press, 2006.
[18] K. Petermann. Laser diode modulation and noise. 1991.
[19] Marlan O. Scully and M. Suhail Zubairy. Quantum Optics. Cambridge University Press,
2002.
[20] Siegman. Lasers. 1986.
[21] H. Ghafouri Shiraz. Distributed feedback laser diode and optical tunable filters. WILEY,
2003.
[22] H. Kogelnik and C.V. Shank. Stimulated emission in a periodic structure. App. Phy.,
18:152, 1971.
[23] C. Henry. Theory of the linewidth of semiconductor lasers. IEEE Journal of Quantum
Electronics, 18:259–264, 1982.
[24] C Henry. Phase noise in semiconductor lasers. Journal of ligthwave technology, 3, 1986.
[25] C Henry. Theory of spontaneous emission noise in open resonators and its applications
to laser and optical amplifiers. Journal of light technology, 3, 1986.
[26] Govind P. Agrawal and R. Roy. Lasers of injection-current fluctuations on the spectral
linewidth of semiconductor lasers. Physical Review A, 37:7, 1988.
[27] G. P. Agrawal. E↵ect of gain nonlinearities on single-mode dynamics in semiconductor
lasers. IEEE journal of quantum electronics, 26:11, 1990.
[28] Zeno To↵ano. Investigation of threshold transistions in semiconductor lasers. IEEE
journal of selected topics in quantum electronics, 3, 1997.
[29] E.G. Steward. Fourier Optics. Halsted Press, 1987.
[30] De Anindya, Christopher Portmann, Thomas Vidick, and Renato Renner. Trevisan’s
extractor in the presence of quantum side information. arxiv, 2012.