Quantum Random Ip - Op and Its Applications in Random Frequency Synthesis and True Random Number Generation
Quantum Random Ip - Op and Its Applications in Random Frequency Synthesis and True Random Number Generation
Quantum Random Ip - Op and Its Applications in Random Frequency Synthesis and True Random Number Generation
net/publication/298636581
CITATIONS READS
5 665
1 author:
Mario Stipčević
Ruđer Bošković Institute
209 PUBLICATIONS 4,310 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Mario Stipčević on 03 December 2017.
I. INTRODUCTION assume that a flip-flop performs its action when clock pulse
(CP) input changes state from LOW (logic 0) to HIGH (logic
Today life is unimaginable without microprocessors that
1) that is upon the “rising edge” of the input pulse. In this
are in the heart of computers, cell phones, and other devices
study, we will predominantly use D-type flip flop (DFF).
which depend on the information processing. Boolean logic
Conventional edge-triggered DFF, whose symbol is shown in
circuits are the basis technology for all contemporary micro-
Fig. 1(a), is an important building element of logic circuits
processors, computers, mobile phones, communication equip-
usually used as a one bit data storage, frequency divider-by-
ment, and many other information and communication tech-
two, or a digital counter. With each occurrence of the rising
nology (ICT) devices. Logic circuits are divided into non-
edge at the CP input, logic level present at the data input D
sequential (e.g., , , and ) whose output state only
is copied to the output Q and stays memorized there until
depends on the current state(s) of input(s), and the sequential
the new clock pulse. This operation is described exactly by
(e.g., flip-flop) whose output state depends on both current
truth Table I (3rd column), and illustrated in Fig. 1(b). DFF
and past states of the input(s). Their purpose in ICT applica-
may optionally feature the inverted output Q̄. It can also have
tions and equipment is information processing and, depending
either or both Set (S) and Reset (R) inputs which, upon being
on how data are interpreted by humans, they appear to be
brought to HIGH unconditionally (asynchronously and irre-
performing a variety of tasks like mathematical calculations,
spective of the CP input) set (to HIGH) or reset (to LOW) the
playing music and video, and word processing. Logic circuits
output Q. DFFs and other logic circuits are specifically de-
can also be used for the purpose of analog and digital signal
signed to behave deterministically, with a very small proba-
processing: frequency division, multiplication or synthesis,
bility of error in order to ensure stable and predictable opera-
clock restoration, signal delaying, measuring of relative phase
tion of ICT equipment.
shift, detecting coincident events, etc. Boolean logic circuits
There are a few technical details of marginal importance
are explicitly made to behave deterministically, that is, to give
for this study which, for simplicity, we do not take into consid-
the same output if fed by the same sequence of input signals.
eration: (1) setting time (t SET): D input has to hold a vale for
This is their great advantage but also a limitation.
some time before the clock; (2) propagation time (t CPQ): it is
Here we propose a new elementary logic building block
a finite time delay between the clock input CP and setting of
that behaves non-deterministically, the random flip-flop (RFF),
the correct value at the output Q; (3) (re)set time (t RSQ): it is
and discuss a few of its applications. We show that RFF is
the time delay between (reset)set input and the output Q. In the
a convenient way of “packaging” of randomness in a circuit
experimental technique that we will use, all these time delays
that can be mixed with conventional logic circuits in order to
are on the order of 1 ns and of little or no importance for the
arrive to a rich set of properties and applications that cannot
effects under study as long as they are constant or small with
be achieved by Boolean logic alone.
respect to the average clock rate.
By definition, the D-type random flip-flop (DRFF) (sym-
II. DEFINITION OF THE RANDOM FLIP-FLOP bol shown in Fig. 1(c)) operates similar to DFF with only
difference that, upon the clock pulse, state of the data input
In this study, we only consider the edge-triggered master- D is transferred randomly to the output Q with probability of
slave flip-flops.1 Henceforth, without loss of generality, we ½, which ensures maximal unpredictability. This is described
by truth Table I (4th column) and illustrated in Fig. 1(d).
a)Author to whom correspondence should be addressed. Electronic mail: Similarly, we define other types of RFF such as T-type
mario.stipcevic@irb.hr random flip-flop (TRFF). While Boolean T-type flip-flop (TFF)
FIG. 2. The RFFs can emulate each other in exactly the same way as their
deterministic counterparts do.
divided signal becomes increasingly periodic and eventually FIG. 10. Synchronous 4-bit random counter. With each clock pulse, the
its randomness vanishes. Thus, the deterministic division counter randomly advances up similar to random walker on a line.
drives a random input signal away from randomness. Interest-
ingly, by virtue of the Poisson limit theorem (see, e.g., Ref. 11),
random division brings a pulse train obeying any initial time Figure 10 shows the well-known synchronous counter to-
interval distribution asymptotically towards exponential distri- pology, however, realized with TRFFs instead of TFFs. In our
bution that is towards maximal randomness. experiment, it has been built using four independent TRFFs,
This is illustrated in Fig. 8 by experimentally measured each realized by an independent DRFF, built according to
data, where an initial Erlang distributed pulse train is repeat- Fig. 6, via the emulation circuit shown in Fig 2. Both the deter-
edly divided by 2R until it almost resembles exponential p.d.f. ministic counter (made with TFFs) and the random counter
In that respect, random frequency division and synthesis of (made with TRFFs) feature 16 possible (output) states which
RPTs (Section VI) are stable, self-healing processes which can be represented by a binary number {Q3,Q2,Q1,Q0} whose
tend to eliminate effects of imperfections in hardware. value is in the range from 0 to 15. The deterministic version
Note that in the special case of dividing a RPT by 2D (for of this counter advances by one upon each (rising edge of the)
example, by means of a deterministic flip-flop, as shown in clock pulse, that is, it counts from 0 to 15, then falls back to
Fig. 9), no information is lost: every edge (rising or falling) 0, etc. Thus the counter can only advance in steps of 1 or −15.
corresponds to one pulse from the original RPT, and therefore, Starting from 0, the counter advances by 1 in 15 consecutive
it is possible to restore the original RPT form the divided one. steps and then advances by −15 in a single step, thus exhibiting
The restoration can be done by a deterministic multiplier an average advance of 0 in the long run.
by 2D, such as the one shown in Fig. 9, which upon every edge Regarding counting, unlike its deterministic counterpart,
(rising or falling) generates one short pulse of width equal to upon a clock pulse random counter can go up, down, or stay
the propagation delay of the non-inverting buffer (DLY). On unchanged, that is, the output numbers appear “random.” On
the contrary, when a RPT is randomly divided by 2R, then half a long run, probabilities of all 16 possible output states (num-
of the information (every second pulse, on average) is lost and bers) are equal for both deterministic and random counters.
there is no way to recover the original RPT. The difference is in the variety of possible step sizes by
Random frequency dividers are the basis for the random which the counter advances and their probabilities. Possible
counters and random frequency synthesis that are described in advancement steps are in the range from −15 to +8 since
Secs. V and VI. advances greater than 8 (the most significant bit) are impos-
sible. Namely in order to achieve step of 8 or greater, it is
necessary that Q3 goes from LOW to HIGH. But to enable this,
V. RANDOM COUNTER
considering the three gates, we see that all other outputs
Counters are important building blocks, made of flip- must be HIGH. Therefore, the step of 8 is the greatest possible.
flops, that can be used for counting events or for frequency A histogram of probabilities of advancement step upon a clock
division. To illustrate the complexity of circuits built with pulse of the random counter, obtained by computer simulation,
RFFs in this section, we analyze the “random synchronous is shown in Fig. 11. In order to determine these probabilities
counter,” defined as a synchronous up-counter in which all flip- theoretically, one would need to determine probabilities of
flops are replaced by their random counterparts. 24 possible steps for each of the 16 possible states, in total
A few of its characteristics are investigated: counting, M = 384 values. The distribution is skewed and grouping of
random number generation, and frequency division. values in clusters of 1, 2, 4, and 8 steps is apparent.
Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 75.143.18.145 On: Thu, 17 Mar
2016 01:13:13
035113-6 Mario Stipčević Rev. Sci. Instrum. 87, 035113 (2016)
FIG. 11. Probabilities of step sizes of the 4-bit synchronous random counter. FIG. 12. Autocorrelation coefficients with lag 1-36 of 4-bit numbers gener-
ated by 3 devices: random counter (blue triangles), periodic up counter (red
round dots), and random number generator (black squares).
By far the most probable step sizes are 0 (no change)
and 1, each with roughly equal probabilities. This could be ministically by 2 (in our notation: f (Q i ) = f in/(2i+1) R/2 D ).
expected from a forward counter topology constructed such Unfortunately, RPTs appearing at outputs Q0 − Q3 are strongly
that the counter mostly advances by 1, where deterministic correlated: any RPT contains all pulses from any lower fre-
flip-flops are replaced by random ones which have the prob- quency RPT; therefore, they cannot be combined to obtain
ability of action equal to ½; thus, the most probable steps are RPTs of frequencies other than those. Thus only divisions by
indeed 0 and 1. However, interestingly, the average step size 2i are possible.
is 0, as is for the deterministic counter. The number of prob- In this example of a random counter, we see that behavior
abilities (M) that need to be determined in order to calculate of circuits containing only a few RFFs may exhibit a very
probabilities of steps rises faster than exponentially with the rich behavior. In particular, the random synchronous counter
number of flip-flops (N): M = (2 N )2 + 22N −1, indicating high counts erratically up and down can be used for the genera-
complexity of this seemingly simple circuit. tion of correlated random numbers and for the randomness-
Regarding random number generation, state of the random preserving frequency division by a power of two. However,
counter changes unpredictably in such a manner that the 16 frequency division by an integer number n is yet unknown.
possible outcomes are distributed uniformly, but numbers so Instead, random frequency synthesis can be used.
generated are strongly correlated and therefore not completely
random. Namely, when considered individually, each of the
outputs Q i (taken in synchronization with the Strobe output) VI. RANDOM FREQUENCY SYNTHESIS
yields a random bit sequence with zero bias but with a non- Frequency synthesis of periodic signals can be accom-
zero serial autocorrelation coefficients of lag k, defined, for plished by well known techniques, for example, phase-locked
example, in Ref. 12 loop (PLL) or direct digital synthesis (DDS). These enable
N −k generation of a set of frequencies separated by an arbitrary
(x i − x̄) (x i+k − x̄)
ak = i=1 N −k 2
. (3) small, constant increment in a desired frequency interval.
i=1 (x i − x̄) Using RFF, one is, for the first time, able to build a full-
Experimentally determined, autocorrelation coefficients featured random frequency synthesizer (RFS) with digitally
obey geometric law with respect to k: ak (Q i ) = (1 − 2i )k controlled rate. In this example, the output signal is a RPT
indicating Markov process. Indeed, one expects Markovian even though this is not the only possibility. A RSF that makes
behavior since sequentiality of RFF dictates that the next state possible synthesis of RPTs having frequency in an arbitrary
of the counter depends solely (albeit non-deterministically) interval and with arbitrary small steps is shown in Fig. 13. A
on the previous state. Of course, autocorrelation among indi- random pulse splitter (RPS) conveys a pulse from the input IN
vidual bits causes autocorrelation of the sequence of 4-bit randomly to one and only one of its two outputs, O1 or O2.
binary numbers {Q3,Q2,Q1,Q0} generated by the random Pulses of frequency f 1 from the input are randomly picked up
counter. Triangular dots (blue) in Fig. 12 represent first 36 and directed towards switches Si with mutually independent
autocorrelation coefficients (1 ≤ k ≤ 36) experimentally ob- probabilities of 1/2i . Depending on the setting of switches,
tained by the random counter (statistics 3 · 108 numbers, error none, some, or all pulses from the input reach the input of the
are bars smaller than the dot size) whereas round dots (red) 1 gate which sums their frequencies by simply interleaving
correspond to the deterministic counter and square dots (black) the incoming pulses.
correspond to completely random numbers. Of course, stream Frequency of the resulting RPT is equal to ( 2kN ) f 1, where
of random values does not show any autocorrelation. k can take on any integer value in the range 0 ≤ k ≤ 2 N .
Regarding usability of the random counter for frequency Parameter k depends on setting of the switches,
division, we note that if the input is fed by a RPT, each output N
Q i gives another RPT. The frequency of ith output (Q i ) is equal
k = SN +1 + 2 N −i Si . (4)
to the input frequency divided randomly by 2i+1 and then deter- i=1
Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 75.143.18.145 On: Thu, 17 Mar
2016 01:13:13
035113-7 Mario Stipčević Rev. Sci. Instrum. 87, 035113 (2016)
FIG. 15. Two equivalent random bit generators: by each rising edge at the
FIG. 14. Pulse waiting time distributions for 16 possible output frequencies. Request input circuit generates a fresh new random bit synchronously with
For k = 0, output frequency is 0. the Strobe pulse.
Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 75.143.18.145 On: Thu, 17 Mar
2016 01:13:13
035113-8 Mario Stipčević Rev. Sci. Instrum. 87, 035113 (2016)
ACKNOWLEDGMENTS
This work was in part financed by MoSES No. 533-19-
14-0002.
FIG. 16. Electronic dice generates random numbers in the range 1-6 upon a 1See http://pdf.datasheetcatalog.com/datasheet/philips/74f74.pdf for 74F74
request. Completion of a throw is signified by appearance of logic 1 at the Dual D-type flip-flop, Philips Product specification (last accessed June 27,
output Ready. 2015).
Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 75.143.18.145 On: Thu, 17 Mar
2016 01:13:13
035113-9 Mario Stipčević Rev. Sci. Instrum. 87, 035113 (2016)
2T. F. d. M. Wahl, M. Leifgen, M. Berlin, T. Roehlicke, H. J. Rahn, and 12D. E. Knuth, The Art of Computer Programming, 3rd ed. (Addison-Wesley,
O. Benson, “An ultrafast quantum random number generator with provably Reading, 1997), Vol. 2.
bounded output bias based on photon arrival time measurements,” Appl. 13A. S. Robinson, “Pulse rate function generator,” U.S. patent US3217148
Phys. Lett. 98, 171105 (2011). (priority date 28 June 1960).
3M. Stipčević, “Fast nondeterministic random bit generator based on weakly 14J. A. Hanby and S. J. Redman, “Random pulse train generator with
correlated physical events,” Rev. Sci. Instrum. 75, 4442–4449 (2004). linear voltage control of average rate,” Rev. Sci. Instrum. 42, 657–662
4M. Stipčević and B. M. Rogina, “Quantum random number generator based (1971).
on photonic emission in semiconductors,” Rev. Sci. Instrum. 78, 045104 15G. White, “The generation of random-time pulses at an accurately known
(2007). mean rate and having a nearly perfect Poisson distribution,” J. Sci. Instrum.
5M. Stipčević, “A novel active quenching circuit for single photon detec- 41, 361–364 (1964).
tion with Geiger mode avalanche photodiodes,” Appl. Opt. 48, 1705–1714 16T. Noriyoshi and Y. Hiroyasu, “Random pulse generator and random number
(2009). generation device and probability generation device utilizing the random
6M. Stipčević, D. Wang, and R. Ursin, “Characterization of a commer- number generator,” patent EP1094603A1 (20 October 1999).
cially available large area, high detection efficiency single-photon avalanche 17V. S. Reinhardt, R. P. Verdes, I. Shahriari, inventors, and Hughes Aircraft
diode,” J. Lightwave Technol. 31, 3591–3596 (2013). Company, asignee, “Spurless fractional divider direct digital frequency
7M. Stipčević and R. Ursin, “An on-demand optical quantum random number synthesizer and method,” U.S. patent US4815018 (21 March 1989).
generator with in-future action and ultra-fast response,” Sci. Rep. 5, 10214 18R. C. Lawlor, “Computer ulitizing random pulse trains,” U.S. patent
date 12 September 1989). M. Vangel, D. Banks, A. Heckert, J. Dray, and S. Vo, “A statistical test suite
9N. Regimbal, F. Badets, D. Bordeaux, J. B. Begueret, inventors, and CNRS, for the validation of random number generators and pseudo random num-
STMicroelectronics S.A., applicants, “Fractional frequency divider,” U.S. ber generators for cryptographic applications,” NIST Special Publication,
patent US2012/0001665 (29 June 2011). 800–22rev1a, April 2010, URL: http://csrc.nist.gov/groups/ST/toolkit/rng/
10R. E. Best, Phase-locked Loops: Design Simulation and Applications documents/sts-2.1.1.zip.
(McGraw-Hill, 2003), ISBN: 0-07-141201-8. 20See http://www.statista.com/markets/409/topic/438/gambling/ for statistics
11A. Papoulis and S. U. Pillai, Probability, Random Variables, and and market data on gambling (last accessed March 8, 2016).
Stochastic Processes, 4th ed. (McGraw-Hill Europe, 2002), ISBN-13: 21M. S. Roulston, “Estimating the errors on measured entropy and mutual
Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 75.143.18.145 On: Thu, 17 Mar
2016 01:13:13
View publication stats