30
1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic Photonics and Quantum Optics Unit Center of Excellence for Advanced Materials and Sensors Ruđer Bošković Institute, Zagreb, Croatia E-mail: [email protected]

1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

Embed Size (px)

Citation preview

Page 1: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

1

Quantum random flip-flop: a novel device for digital and

analog signal processingUniversity of California Santa Barbara

March 10, 2015

Mario Stipcevic

Photonics and Quantum Optics UnitCenter of Excellence for Advanced Materials and Sensors Ruđer Bošković Institute, Zagreb, Croatia

E-mail: [email protected]

Page 2: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

2

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.

Page 3: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

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 intractable problems• does calculations sequentially and deterministically.

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!

Page 4: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

4

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.

Page 5: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

5

Flip-flops are used for:

• Memory storage (memories, registers,…)• Counters• Clocks• Frequency division• One-shot oscillators (period generators)• Serial-to-parallel and parallel-to-serial stream data

conversion, etc

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

Page 6: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

6

What “random” means ?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 physical 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.

Page 7: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

7``

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.

Page 8: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

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

Page 9: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

Random flip-flop has inputs and outputs fully compatible withconventional logic circuits 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).

Page 10: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

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.

Important! The main difference between a (single) RNG and RFF is parallelism of randomness (-> RPT computing).

Page 11: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

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.

Page 12: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

12

But how do we BUILD a RFF ? It must have some source ofrandomness. IBM’s balanced bistable multivibrator:

The quality is bad - requires complex, slow and hardware extensivepost-processing. Is this the best that could be done? NO!

Page 13: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

13

Realization of a RFFHow to make RFF without the need for crytical adjustments?One solution: slowly sampled exponential p.d.f. :

Random Pulse-train Generator (RPG) (LED (LD) dispersive filter photon detector)

toggles 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

Page 14: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

14

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;

Page 15: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

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.

Page 16: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

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.  

Page 17: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

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; d) equivalent to c).

Page 18: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

18

1. Random and Deterministic divisions do not commute, i.e. 1/2D/2R≠ 1/2R/2D

2. Random division is a self-healing process.

Can we randomly 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.

Page 19: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

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 with steps of ±1

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.

Page 20: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

20

Towards Random Frequency Synthesis

If 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

Page 21: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

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]).

Page 22: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

22

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 = µ

Digression:Binary symmetric channel with noise

Page 23: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

23

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)

Page 24: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

24

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 [f0, f0+ f1] in arbitrary small steps Δf = f1/2N . Here N=4.

Page 25: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

25

Using 4 RFFs and one random source (f1 = 1 MHz), we built a randomfrequency synthesizer capable of generating frequencies in range 0 to 1 MHz in steps of 62.5 kHz:

fout = k * 62.5 KHz, k = 0…16

Exponential distribution of output pulses is indicated by a straight-line Shape of the distribution in the log plot.

Page 26: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

26

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.

Page 27: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

27

Random pulse computing paradigm

• Binary operations between frequencies of random pulse trains• High immunity against noise (used in airplanes)• Fast with a slow hardware• Simple

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.  

Page 28: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

28

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)• Polynomial with any number of terms 2 gate delays only!• Takes advantage of multiple, independent randomness sources to

achieve massive parallel computing!• Randomness essential to effectuate the calculation• A circle enabling continued fractions expansion exists.

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

Page 29: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

29

Further research1. Find the laws governing the randomized Boolean logic (e.g. be able

to construct divider-by-n without guessing)

2. Lower errors and limitations (due to: non-perfect randomness, non-perfect probability of ½ ,the finite pulse width …)

3. Develop further the RPT computing paradigm

4. Realize RFF on chip using the existing technology

5. Find further applications

Page 30: 1 Quantum random flip-flop: a novel device for digital and analog signal processing University of California Santa Barbara March 10, 2015 Mario Stipcevic

30

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 digital Turing machine•Random pulse computing•Random number generation•Randomness preserving frequency division•Random frequency synthesis & spurless DDS•Random counters•Simulation of random walks, fair coins, fair dices, etc.•Many more?