You are on page 1of 41

Quantum Algorithm

and its applications

Ritajit Majumdar
MTech 2nd Year
Roll Number : 97/CSM/140001
Registration Number : 0029169 of 2008-2009

3rd semester seminar talk

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

1 / 23

Introduction

Lets Go Quantum

Consequence of Shor Algorithm

So what Now????

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

2 / 23

Introduction

Introduction

Lets Go Quantum

Consequence of Shor Algorithm

So what Now????

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

3 / 23

Introduction

Factorisation is hard

How it all began

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

4 / 23

Introduction

Factorisation is hard

How it all began

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

4 / 23

Introduction

Factorisation can be reduced to period finding

Factorisation to Period Finding


Let N = 15, x = 2

r
x r (mod N)

0
1

1
2

2
4

3
8

4
1

5
2

6
4

7
8

8
1

...
...

The period of repetition is one less than a factor of N

The problem of Prime Factorization can be reduced to the problem of


Period Finding

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

5 / 23

Introduction

Factorisation can be reduced to period finding

Factorisation to Period Finding


Let N = 15, x = 2

r
x r (mod N)

0
1

1
2

2
4

3
8

4
1

5
2

6
4

7
8

8
1

...
...

The period of repetition is one less than a factor of N

The problem of Prime Factorization can be reduced to the problem of


Period Finding

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

5 / 23

Introduction

Factorisation can be reduced to period finding

Factorisation to Period Finding


Let N = 15, x = 2

r
x r (mod N)

0
1

1
2

2
4

3
8

4
1

5
2

6
4

7
8

8
1

...
...

The period of repetition is one less than a factor of N

The problem of Prime Factorization can be reduced to the problem of


Period Finding

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

5 / 23

Introduction

Factorisation can be reduced to period finding

Is this reduction any good?

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

6 / 23

Lets Go Quantum

Introduction

Lets Go Quantum

Consequence of Shor Algorithm

So what Now????

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

7 / 23

Lets Go Quantum

Quantum Fourier Transform

Quantum Fourier Transform

FN =

1
N

1
1

..
.

1
w
w2
..
.

1
w2
w4
..
.

1
w3
w6
..
.

1 w N1 w 2(N1) w 3(N1)

...
1
. . . w N1

. . . w 2(N1)

..
..

.
.
2
. . . w (N1)

Hence FNij is w ij

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

8 / 23

Lets Go Quantum

Quantum Fourier Transform

Quantum Parallelism

Let N = 4 w = exp(i 2 ) = cos( 2 ) + i.sin( 2 ) = i


T
Consider state |1i = 0 1 0 0


1 1
1
1
0

1 i 1 i 1

F4 |1i = 21
1 1 1 1 0 =
1 i 1 i
0
=

Ritajit Majumdar (CU)

1
2

1

1 i
2 1
i

|0i + 2i |1i 21 |2i 2i |3i

Quantum Algorithm

3rd semester seminar talk

9 / 23

Lets Go Quantum

Quantum Fourier Transform

Quantum Parallelism
Let N = 4 w = exp(i 2 ) = cos( 2 ) + i.sin( 2 ) = i
T
Consider state |1i = 0 1 0 0


0
1 1
1
1

1
i
1
i
1
F4 |1i = 21
1 1 1 1 0 =
0
1 i 1 i
=

1
2

1

1 i
2 1
i

|0i + 2i |1i 21 |2i 2i |3i

Inference
Quantum Fourier Transform produces an equal superposition of all the
basis states
Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

9 / 23

Lets Go Quantum

The Algorithm

Shor Algorithm
Choose q such that N 2 q < 2N 2 where q = 2d
Start with 2 quantum registers |a, 0i
QFT

|a, 0i

1
q

Pq1
r =0

|r , 0i

Apply transformation Uf = x r mod N on 1st register


Pq1
r
1
r =0 |r , x modNi
q
Measure 2nd register collapses to some value k
The 1st register now contains all r for which x r mod N = k
Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

10 / 23

Lets Go Quantum

The Algorithm

Shor Algorithm
Choose q such that N 2 q < 2N 2 where q = 2d
Start with 2 quantum registers |a, 0i
QFT

|a, 0i

1
q

Pq1
r =0

|r , 0i

Apply transformation Uf = x r mod N on 1st register


Pq1
r
1
r =0 |r , x modNi
q
Measure 2nd register collapses to some value k
The 1st register now contains all r for which x r mod N = k
Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

10 / 23

Lets Go Quantum

The Algorithm

Shor Algorithm
Choose q such that N 2 q < 2N 2 where q = 2d
Start with 2 quantum registers |a, 0i
QFT

|a, 0i

1
q

Pq1
r =0

|r , 0i

Apply transformation Uf = x r mod N on 1st register


Pq1
r
1
r =0 |r , x modNi
q
Measure 2nd register collapses to some value k
The 1st register now contains all r for which x r mod N = k
Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

10 / 23

Lets Go Quantum

The Algorithm

Shor Algorithm
Choose q such that N 2 q < 2N 2 where q = 2d
Start with 2 quantum registers |a, 0i
QFT

|a, 0i

1
q

Pq1
r =0

|r , 0i

Apply transformation Uf = x r mod N on 1st register


Pq1
r
1
r =0 |r , x modNi
q
Measure 2nd register collapses to some value k
The 1st register now contains all r for which x r mod N = k
Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

10 / 23

Lets Go Quantum

The Algorithm

Shor Algorithm
Choose q such that N 2 q < 2N 2 where q = 2d
Start with 2 quantum registers |a, 0i
QFT

|a, 0i

1
q

Pq1
r =0

|r , 0i

Apply transformation Uf = x r mod N on 1st register


Pq1
r
1
r =0 |r , x modNi
q
Measure 2nd register collapses to some value k
The 1st register now contains all r for which x r mod N = k
Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

10 / 23

Lets Go Quantum

The Algorithm

Shor Algorithm
Choose q such that N 2 q < 2N 2 where q = 2d
Start with 2 quantum registers |a, 0i
QFT

|a, 0i

1
q

Pq1
r =0

|r , 0i

Apply transformation Uf = x r mod N on 1st register


Pq1
r
1
r =0 |r , x modNi
q
Measure 2nd register collapses to some value k
The 1st register now contains all r for which x r mod N = k
Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

10 / 23

Lets Go Quantum

The Algorithm

Shor Algorithm
The first register is in state - 1 q

P qr 1
j=0

Apply QFT again

1
r

Pr 1

k=0 w

kl

|j.r + li

|k. qr i

Measure the state collapses to k 0 . qr where 0 k 0 r 1


If gcd(k 0 , qr ) = 1 computing gcd(k 0 . qr , q) gives

q
r

q is already known find r


If gcd(k 0 , qr ) 6= 1, repeat the algorithm

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

11 / 23

Lets Go Quantum

The Algorithm

Shor Algorithm
The first register is in state - 1 q

P qr 1
j=0

Apply QFT again

1
r

Pr 1

k=0 w

kl

|j.r + li

|k. qr i

Measure the state collapses to k 0 . qr where 0 k 0 r 1


If gcd(k 0 , qr ) = 1 computing gcd(k 0 . qr , q) gives

q
r

q is already known find r


If gcd(k 0 , qr ) 6= 1, repeat the algorithm

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

11 / 23

Lets Go Quantum

The Algorithm

Shor Algorithm
The first register is in state - 1 q

P qr 1
j=0

Apply QFT again

1
r

Pr 1

k=0 w

kl

|j.r + li

|k. qr i

Measure the state collapses to k 0 . qr where 0 k 0 r 1


If gcd(k 0 , qr ) = 1 computing gcd(k 0 . qr , q) gives

q
r

q is already known find r


If gcd(k 0 , qr ) 6= 1, repeat the algorithm

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

11 / 23

Lets Go Quantum

The Algorithm

Shor Algorithm
The first register is in state - 1 q

P qr 1
j=0

Apply QFT again

1
r

Pr 1

k=0 w

kl

|j.r + li

|k. qr i

Measure the state collapses to k 0 . qr where 0 k 0 r 1


If gcd(k 0 , qr ) = 1 computing gcd(k 0 . qr , q) gives

q
r

q is already known find r


If gcd(k 0 , qr ) 6= 1, repeat the algorithm

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

11 / 23

Lets Go Quantum

The Algorithm

Shor Algorithm
The first register is in state - 1 q

P qr 1
j=0

Apply QFT again

1
r

Pr 1

k=0 w

kl

|j.r + li

|k. qr i

Measure the state collapses to k 0 . qr where 0 k 0 r 1


If gcd(k 0 , qr ) = 1 computing gcd(k 0 . qr , q) gives

q
r

q is already known find r


If gcd(k 0 , qr ) 6= 1, repeat the algorithm

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

11 / 23

Lets Go Quantum

The Algorithm

Shor Algorithm
The first register is in state - 1 q

P qr 1
j=0

Apply QFT again

1
r

Pr 1

k=0 w

kl

|j.r + li

|k. qr i

Measure the state collapses to k 0 . qr where 0 k 0 r 1


If gcd(k 0 , qr ) = 1 computing gcd(k 0 . qr , q) gives

q
r

q is already known find r


If gcd(k 0 , qr ) 6= 1, repeat the algorithm

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

11 / 23

Consequence of Shor Algorithm

Introduction

Lets Go Quantum

Consequence of Shor Algorithm

So what Now????

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

12 / 23

Consequence of Shor Algorithm

Public Key Cryptography is insecure

RSA is insecure
Run time of Shor algorithm : O((log N)2 (log log N)(log log log N))[1]

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

13 / 23

Consequence of Shor Algorithm

Public Key Cryptography is insecure

Other public key ciphers...

Shors Algorithm has been experimentally realized using NMR[2]


It has been realised using Ion Trap with only 5 qubits[5]
Counter Argument: SO WHAT? We can use cryptosystems like
Elliptic Curve, Elgamal etc.
These algorithms rely on Discrete Logarithm Problem
Well, no... Shor himself has given a quantum algorithm that can solve
Discrete Logarithm problem in polynomial time[1]

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

14 / 23

Consequence of Shor Algorithm

Public Key Cryptography is insecure

Other public key ciphers...

Shors Algorithm has been experimentally realized using NMR[2]


It has been realised using Ion Trap with only 5 qubits[5]
Counter Argument: SO WHAT? We can use cryptosystems like
Elliptic Curve, Elgamal etc.
These algorithms rely on Discrete Logarithm Problem
Well, no... Shor himself has given a quantum algorithm that can solve
Discrete Logarithm problem in polynomial time[1]

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

14 / 23

Consequence of Shor Algorithm

Public Key Cryptography is insecure

Other public key ciphers...

Shors Algorithm has been experimentally realized using NMR[2]


It has been realised using Ion Trap with only 5 qubits[5]
Counter Argument: SO WHAT? We can use cryptosystems like
Elliptic Curve, Elgamal etc.
These algorithms rely on Discrete Logarithm Problem
Well, no... Shor himself has given a quantum algorithm that can solve
Discrete Logarithm problem in polynomial time[1]

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

14 / 23

Consequence of Shor Algorithm

Public Key Cryptography is insecure

Other public key ciphers...


Shors Algorithm has been experimentally realized using NMR[2]
It has been realised using Ion Trap with only 5 qubits[5]
Counter Argument: SO WHAT? We can use cryptosystems like
Elliptic Curve, Elgamal etc.
These algorithms rely on Discrete Logarithm Problem
Well, no... Shor himself has given a quantum algorithm that can solve
Discrete Logarithm problem in polynomial time[1]
Inference
Public key cryptography is INSECURE against quantum attacks

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

14 / 23

Consequence of Shor Algorithm

Private Key Cryptography is insecure too

Private key ciphers...

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

15 / 23

Consequence of Shor Algorithm

Private Key Cryptography is insecure too

Private key ciphers...

A recent paper published on February 18, 2016 claims that Symmetric Key
Ciphers can be broken in (n) time using Simons Algorithm[4]

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

15 / 23

So what Now????

Introduction

Lets Go Quantum

Consequence of Shor Algorithm

So what Now????

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

16 / 23

So what Now????

Quantum Cryptography

BB84 Protocol
Use two conjugate basis |+i = {, } and |i = {%, -} to establish a
secret key between two parties at a distance[3]

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

17 / 23

So what Now????

Quantum Cryptography

Other variants of Quantum Key Distributions

E91 protocol [Ekert, PRL 1991]


Semi Quantum QKD [Boyer, Kenigsberg and Mor, PRL 2007]
Device Independent (DI) QKD
Idea by Mayers and Yao [FOCS, 1998]
Measurement Device Independent (MDI) QKD [Lo, Curty and Qi,
PRL, 2012]
Side Channel Free (SCF) QKD [Braunstein and Pirandola, PRL, 2012]
Fully Device Independent (FDI) QKD [Vazirani and Vidick, PRL, 2014]

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

18 / 23

So what Now????

Rebirth of Classical Cryptography

Post Quantum Cryptography

Lattice-based cryptography (e.g., NTRU)


Multivariate cryptography (e.g., Rainbow)
Hash-based cryptography (e.g., Lamport, Merkle)
Code-based cryptography (e.g., McEliece, Niederreiter)
Supersingular ECC

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

19 / 23

So what Now????

Rebirth of Classical Cryptography

Acknowledgement

I would like to acknowledge the following whom I referred to for preparing


this talk 1

Pedagogical Talk on Death and Re-birth of Classical Cryptography


in Quantum Era by Dr. Gautam Paul, ISI Kolkata, at ISCQI 2016.

Online course on Quantum Mechanics and Quantum Computation


by Prof. Umesh Vazirani of University of California, Berkeley, from
www.coursera.org.

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

20 / 23

So what Now????

Rebirth of Classical Cryptography

Reference
[1] Peter W Shor. Algorithms for quantum computation: Discrete logarithms and
factoring. In Foundations of Computer Science, 1994 Proceedings., 35th Annual
Symposium on, pages 124 134. IEEE, 1994
[2] Vandersypen et al. Experimental realization of Shors quantum factoring
algorithm using nuclear magnetic resonance. Nature 414, 883-887 (20 December
2001)
[3] Charles H Bennett. Quantum cryptography: Public key distribution and coin
tossing. In International Conference on Computer System and Signal Processing,
IEEE, 1984, pages 175 179, 1984
[4] Kaplan et al. Breaking symmetric cryptosystems using quantum period
finding. arXiv:1602.05973, 2016
[5] Monz et al. Realization of a scalable Shor algorithm. Science 04 Mar 2016:
Vol. 351, Issue 6277, pp. 1068-1070
Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

21 / 23

So what Now????

Rebirth of Classical Cryptography

Image Courtesy

Boromir: generator-meme.com/meme/one-does-not-simply/
Shor: www-math.mit.edu/shor/
Batman: bgr.com/2015/08/07/batman-movies-dc-ben-affleck/
Boromir facepalm: generator-meme.com/meme/own/
Grumpy cat: www.dailymail.co.uk

Ritajit Majumdar (CU)

Quantum Algorithm

3rd semester seminar talk

22 / 23

So what Now????

Ritajit Majumdar (CU)

Rebirth of Classical Cryptography

Quantum Algorithm

3rd semester seminar talk

23 / 23

You might also like