0% found this document useful (0 votes)
36 views19 pages

Emerging Systems: Part 1: Quantum Computing

Grover's algorithm provides a quadratic speedup over classical algorithms for searching an unstructured database. It works by applying an oracle operator and diffusion operator to gradually increase the amplitude of solutions in the quantum state. Shor's algorithm finds the factors of integers in polynomial time on a quantum computer using periodicity of the quantum Fourier transform. This threatens the security of RSA encryption, as factoring large integers is exponentially faster on a quantum computer compared to classical computers.

Uploaded by

Santa George
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views19 pages

Emerging Systems: Part 1: Quantum Computing

Grover's algorithm provides a quadratic speedup over classical algorithms for searching an unstructured database. It works by applying an oracle operator and diffusion operator to gradually increase the amplitude of solutions in the quantum state. Shor's algorithm finds the factors of integers in polynomial time on a quantum computer using periodicity of the quantum Fourier transform. This threatens the security of RSA encryption, as factoring large integers is exponentially faster on a quantum computer compared to classical computers.

Uploaded by

Santa George
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 19

Emerging Systems

part 1: Quantum Computing

Lecture 3: Algorithms
Quantum Algorithms
• Simulation algorithms
– Simulation of quantum systems
– Tools for physicists
• Search algorithms
– Deutsch-Jozsa algorithm (1992)
– Grover’s algorithm (1996)
– Searching unstructured databases
• DFT-based algorithms
– Shor’s algorithm (1994)
– Discrete logarithms
– Factoring large integers
Grover’s Algorithm
 
On   O n

• Several applications of this algorithm were developed


• Quantum Counting
• Speedup for solving NP-complete problems
• Searching through unstructured databases
• Algorithm description
• We admit an n-element search space, labeled
• {0,1, …n-1} where n =2m => m-qubit label
Grover’s Algorithm
• We consider that the problem has k
solutions
1kn
• We can reduce his problem to a
decision problem, thus
0 if x is not the solution
f d ( x)  
1 if x is the solution
• In this context, we can define a
quantum oracle as U O : x u a x fd  x   u
Index quregister Oracle quregister
Grover’s Algorithm
The Oracle
1
• If u  0 1  “Marks the Solution”
2

• and because
1 1
NOT :  0  1  a (1)  0  1 
2 2

• We will have
1 1
UO : x  0  1 a  1
fd  x 
x 0 1 
2 2
Grover’s Algorithm
1 n 1

Initial state ?
 i  H  n 00...0 a n x
n 2 2 x 0
0

Oracle
Workspace
 ( m 1)
0 1
Grover’s Algorithm
Hadamard
• The “Gro” circuit transform
Oracle
levels

Phase shift  0 if x  0
Ph : x  
circuit  x if x  0
Grover’s Algorithm

U Gro   2  i  i  I U O
Grover’s Algorithm
New basis:  ,  
1
 
nk
 x
xS

1
 
k
 x
xS

Iterations:  n
q 
4 k

 n
O  
 k
Grover’s Algorithm

Nielsen & Chuang example


Shor’s Algorithm
• Best classical factorization: Number Field
Sieve:  1
2 
exp (c  O(1))log n  3 (log log n) 3 
• NFS complexity: 



• Shor algorithm complexity: BQP  BPP
• Consequence: threatens RSA
cryptosystem
Exponential speedup impact
• Factor a 5000 digit number

– On a classical computer (1ns/instruction)


• The classical algorithm will require more than 5
trillion years
• The universe is ~10-16 billion years old

– On a quantum computer (1ns/instruction)


• Shor’s algorithm will require over 2 minutes
Exponential speedup impact
4
3 10

4
2 10
Poly ( x)

Exp( x)
4
1 10

0
0 5 10 15 20
x

Exponential vs. polynomial discrepancy


Shor’s Algorithm
2 L 2 L
• Step 1:

• Step 2:
1   i  o  0 0
• Step 3:
 1 2 2 L 1 
– f is periodic

– factors:
2  L
2  i 0

 i 0 
2 2 L 1
1
3 
2 L i
i 0
f (i )

f a , N x   a x mod N

 r 
gcd a 2  1, N , r mod N  1
 
 
fa,N(x)
Shor’s Algorithm
• Step 4: output register measurement
 22 L 
  1
 r 
 r 
4   2L 
2 
 r i  b
i 0
m

Result Post-measure state Offset


1   0  4  8   1 0
4   3  7  11   4 3
7   1  5  9   7 1
13   2  6  10   13 2
Shor’s Algorithm
• Step 5: offset removal
 5  U DFT  4

– input register measurement: h

– h/22L=a1/a2 is approximated with continued


fractions
Quantum DFT
r divides 22L, peak distance 22L/r
Quantum DFT
r is not dividing 22L, distinct peak distance 22L/r
0.5

0.4

0.3

0.2

0.1

50 100 150 200 250

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy