1 Quantum random flip-flop and its applications University of Illinois at Urbana-Champaign Apr 02,...

31
1 Quantum random flip-flop and its applications University of Illinois at Urbana-Champaign Apr 02, 2014 Mario Stipcevic Rudjer Boskovic Institute, Zagreb, Croatia Duke University, Durham, NC E-mail: [email protected]

Transcript of 1 Quantum random flip-flop and its applications University of Illinois at Urbana-Champaign Apr 02,...

1

Quantum random flip-flop and its applications

University of Illinois at Urbana-Champaign Apr 02, 2014

Mario StipcevicRudjer Boskovic Institute, Zagreb, CroatiaDuke University, Durham, NC

E-mail: [email protected]

2

What means “random” ?1. Random variable a number “drawn” from a p.d.f.

2. Random numbers (sequence) 0110010101010… D. Knuth: There is NO definition of random sequence of numbers.

3. Time-wise random events Radioactive decay, photon emission from a laser, Big-Bang…

4. Randomness Is throwing a coin random? Is statistical mechanics random? Are chaotic moves random? NO! Governed by Newtoinian laws => deterministic.

3``

A physical system being RANDOM means that if we keeprepeating the exact same experiment on it, with exact sameinitial conditions

THEN

it yields unexpected result EVERY TIME and EVEN IN THEORY

=> quantum theory

Randomness is a purely quantum effect and has no classical analog.

Randomness is probably the only thing that cannot be defined becauseit would imply describing “random” by means of deterministic, (Boolean)logic.

Unless …… we introduce the non-deterministic logic.

4

Boolean logic circuits• AND, OR, NOT, NAND, flip-flop,….

• NAND – a single universal element sufficient to build any logic circuit, e.g. a computer.

Computer does not compute: it merely performs logic operationson pieces of information.

It is Human interpretation only what we perceive as:• Computation with numbers (ALU – many basic logic circuits),• Text processing,• Graphics,• Music, … etc.

Computer “knows” nothing about any of it.

Moreover, computers per se can make only deterministicdecisions – they behave predictably. They can be modeled bya theoretical model called Turing machine. However, a more powerful computing paradigm known asprobabilistic Turing machine (PTM) can execute randomizedalgorithms:

• may compute faster that its deterministic counterpart• may be less prone to computational errors• may solve otherwise untractable problems.

Examples: Rabin-Miller primality test, Monte Carlo, Cryptography…

PTM depends on random decisions – but no logic circuits that could implement that feature exist(ed) so far!

6

Flip-flop (a reminder)• A non-sequential logic circuit• Several types: D, T, JK, RS,… with optional Set and Reset

Examples:

D-type FF transfers state at D on appearance of pulse at CP; T-type FF toggles state (Q) on CP if T=1 otherwise nothing.

FF’s can emulate each other:

Sequential and non-sequential logic circuits are building blocks of all contemporary ICT devices. They are DETERMINISTIC.

7

Flip-flops are used for:

• Memory storage (memories, registers,…)• Serial-to-parallel and parallel-to-serial stream data

conversion• Counters• One-shot oscillators (period generators)• Clocks• Frequency division.

Examples of frequency division of periodic signal by 2 and by n

8

Random flip-flopA single Universal logic element enabling random decisions. The most important building block of a PTM.

Operates in the same way as ordinary flip-flop except its clockinput acts with a probability of ½.

Conventional DFF:Exact truth table

Random “DRFF”:“Typical” truth table

Random flip-flop has inputs and outputs fully compatible with“conventional” logic and can be easily combined with.

For example, RFFs can emulate each other (in the exact sameway as their deterministic counterparts):

Emulation of TRFF by DRFF (left) and vice versa (right).

10

Applications of random flip-flopsMost obvious application: a random bit generator (RBG).A RBG produces one random bit upon a request.

Two equivalent realizations of a stream random bit generator with DRFF (left) and TRFF (right).

Straightforward to parallelize any number of RBGs to achievemulti-bit RNG => a single clock fixed or float point Uniform p.d.f. random variable.

11

Random numbers are esential for many important applications:

1. Cryptography 2. Stochastic (aka Monte Carlo) simulations & calculations3. Lottery and online gambling (6 G$ annually in US only) 4. Numbering of Prepaid & Gift cards5. Electronic money6. Industrial testing: micro processors (chips), automotive industry,

bench top testing equipment7. Industry labeling (unique chip numbers, MAC numbers…)8. etc.

12

Random Programming Language Instructions

Programming of a PTM requires existence of a computerprogramming language that feature random decisions, like:

Ordinary PL Probabilistic PL

1.

2.

3.

IF {condition} THEN {block1} ELSE {block2} ENDIF

GOTO n OF lab1, lab2, lab3, ...

RIF {prob} {condition} THEN {block1} ELSE {block2} ENDIF

RGOTO lab1, lab2, lab3, ...

srand(seed);……a = rand();

a= rfloat;ORa= rdouble;

13

Binary symmetric channel with noise

In information-theoretic secure cryptographic protocols based on noisy channels (BSCN) is a crucial resource.

BSCN flips the data bit with a predetermined “bit error probability” probability perr < ½.

Realization of BSCN with perr = µ

14

In Maurer’s scenario Alice, Bob and Eve all have access to apublic string (S0) via individual BSCNs and Eve’s perr=γ >0.

There are 2 deviations from the Shannon crypto model:1. Alice, Bob and Eve do not have the same information2. There is an arbitrary small probability that Alice and Bob would end up with a different key.

A protocol exist by which Alice and Bob can arrive to a ITprovable secure key by public communication, just s in QKD! IEEE T Inform. Theor. 49, 822-831 (2003)

15

Analog noise generator

Gaussian white noise is a very useful resource for: • measuring and testing of audio equipment• speech and music synthesis, • testing radio communication circuits, etc

Pseudo-random techniques exhibit peaks, electronic noise (eg.transistor noise) exhibits 1/f rise near zero.

Spectrum starts at 0 and drops down by -0.1dB at 0.12 fclock, -1dB at 0.26 fclock

Power density envelope is flat near zero and hasno peaks.

16

Randomness preserving frequency division

Random pulse train (RPT) = time-wise random pulses (events).

Frequency of periodic signals can be divided using ordinary flip-flops and yield periodic signals.

Circuits with ordinary FFs divide random pulses too but … time-wise randomness is NOT preserved.

Example: Deterministic division by 2 => exactly every second pulse is omitted.Random division by 2 => on average every second pulse is omitted.

Random division preserves time-wise randomness.

Random pulse train (RPT) consists of logic pulses of equal width and height such that waiting times obey Exponential p.d.f.  

17

Basic random divider circuitsBasic random dividers:

Stacking basic dividers frequency of a RPT can be divided by 2N.

Randomness preserving frequency division wasn’t feasible so far.

a) random divider by 2; b) random divider by 4; c) divider which performs random division by 2 followed by deterministic division by 2.

18

1. Random and Deterministic divisions do not commute.

2. Random division is a self-healing process.

Can we divide by an arbitrary integer number n? This is still an open question.Naively it may be done by a random counter-to-n but that does not work !

Waiting time distributions of aRPT (the exponential p.d.f.) andof a RPT divided by factors: 2D, 2D2R, 2D4R and 2D16R.

19

Random Counter

A random analog of the 4-bit synchronous binary counterexhibits rich set of phenomena.

Known so far:

Need for NEW tools to compute circuits (random Boolean logic?)

1. Counter has 16 states Q={Q3,Q2,Q1,Q0} representing numbers in range 0-15

2. Advancement resembles random walker wondering about 15/2

3. Each output Qi generates a random number sequence with zero bias and

serial correlation coefficients:ak(Qi) = (1-2-i)k (a Markov process).

4. Frequency of the clock appears at Qi divided: f(Qi) = fin/(2i+1)R/2D BUT the outputs are 100% correlated thus frequency synthesis is not possible.

20

Random Frequency SynthesisIf we cannot divide – let’s multiply by <1! μ-multiplier:

N 2N k2 4 1 2 33 8 1 2 3 4 6 74 16 1 2 3 4 6 7 8 12 14 155 32 1 2 3 4 6 7 8 12 14 15 16 24 28 30 316 64 1 2 3 4 6 7 8 12 14 15 16 24 28 30 31

32 48 56 60 62 637 128 1 2 3 4 6 7 8 12 14 15 16 24 28 30 31

32 48 56 60 62 63 64 96 112 120 124 126 127

8 256 1 2 3 4 6 7 8 12 14 15 16 24 28 30 31 32 48 56 60 62 63 64 96 112 120 124 126 127 128 192 224 240 248 252 254 255

10

1024 1 2 3 4 6 7 8 12 14 15 16 24 28 30 31 32 48 56 60 62 63 64 96 112 120 124 126 127 128 192 224 240 248 252 254 255 256 384 448 480 496 504 508 510 511 512 768 896 960 992 1008 1016 1020 1022 1023

μ-multiplier schematic and the table of realizable multiplication factors k/2N

21

Advantages:

• Instantaneous change of random pulse rate (not limited by the quasi-Heisenberg uncertainty principle )

• Digitally selectable frequency (similar to PLL circuit)

Disadvantage:

• Sparse set of multiplication factors.

A research on general random frequency synthesis circuits in underway (see arXiv:1308.5719 [quant-ph]).

22

Using RFF and deterministic logic it is possible to make a Random Pulse Selector (RPS): sends an input pulse randomly to one of the two output ports.

A block schematic of a full-fledged RPT generator of frequency inthe range [fo, fo+f in] in arbitrary small steps Δf.

23

Electronic dice

And now some fun. Send a request pulse and obtain integerrandom value in the range 1-6, just like throwing a dice.

Note: the device is symmetric on permutation of outputs.

A Request pulse generates a number in the range 0-7. If codes 0 or 7 are obtained, an intenal generator sends further request pulses until a value1-6 is obtained. Ready signifies the end of the process.

24

Random pulse computing paradigm

Binary operations between frequencies of random pulse trainsQuasi-analog, classical calculationRequires time to settle (~Heisenberg uncertainty)High immunity against noise (used in airplanes)Simple hardware

Random pulse train (RPT) consists of logic pulses of equal width and height such that waiting times obey exponential p.d.f.  

Realizations of elementary binary mathematical operations between frequencies of RPTs.  

25

Having the 3 elementary binary operations (+, -, *) one can evaluatepolynomials (with very little resources in comparison to digitaloperations) and thus all functions that allow Taylor expansion.

• Adding operations requires minimum additional hardware• All n-nary operations are parallel (not sequential)

Open problems: 1. binary division unknown 2. analog-RPT and RPT-analog conversions

26

Realization of a RFFA work in progress. One non-ideal solution takes advantage ofapproximate even-odd symmetry of slowly sampled exponentialp.d.f. (CLT):

Time-wise random events (LED -> dispersive filter -> photon detector) toggle the TFF whose state controls the clock pulse input (CP).

This DRFF is edge-triggered.

M. Stipcevic, Rev. Sci. Instrum. 75(2004)4442-4449V. Bagini and M. Bucci., CHES 1999, pp. 204–218,P. Chevalier, C. Menard, B. Dorval, Patent No. US3790768A

27

ConclusionRandom flip-flop is a novel digital circuit that generates and processesclassical information by means of a purely quantum effect – randomness.

It features inputs and outputs fully compatible with ordinary logic.

Potential applications:

•Probabilistic Turing machine•Random pulse computing paradigm•Random number generation•Randomness preserving frequency division•Random frequency synthesis•Random counters•Simulation of random walks, fair coins, fair dices, etc.•Many more?

28

29

Random Number Generator

Starting from an initial number, algorithmically produce sequence ofnumbers. If they “look random” than that is a PRNG.

Examples: = LCG(a,b,c)

=ILCG(a,b,c)

Pseudo random number sequences exhibit strong, deterministic, long-range, correlations.

cbaxx nn mod)(1

cbaxx nn mod)( 11

30

Spatial Quantum RNG

10

Specially prepared qubit measured (projected) in orthogonal basis:

(highest entropy α2=β2=½)

• Depending on which detector “clicks”, 0 or 1 is generated per each detected photon.

• Simple and theoretically perfect.

Beam splitter QRNG

00

11

31

How did we test for randomness ?

NO definition exists of (sequence of) random numbers.

Generally, one could say that a sequence (of binary values, bits) israndom if it is unbiased i.e. p(1)=p(0), and if there are no functional orprobabilistic correlations among bits.

There are infinitely many properties that a long sequence of randombits must satisfy, statistically.

We tested for:1. Bias, defined as p(1)-½2. Serial auto correlation , defined [Knuth] as:

k is a lag between bits.

N

i ikN

i kiik bbbbbba1

2

1