1/22 quantum algorithms deutsch-josza algorithm: quantum computers are more powerful than classical...
TRANSCRIPT
1/22
Quantum Algorithms• Deutsch-Josza Algorithm: quantum computers are more powerful than classical ones.f :b∈ 0,1( )→ b∈ 0,1( ) four possible functions
b f(b)
0 0
1 0
b f(b)
0 1
1 1
b f(b)
0 0
1 1
b f(b)
0 1
1 0
balanced functions
1 2 4 4 4 3 4 4 4 unbalanced functions1 2 4 4 4 3 4 4 4
• Is f(b) balanced or unbalanced?
classically: need to evaluate f(b) twice; quantum algorithm: only once.
2/22
•Inverse Database search Example: telephone book with N entries
AARDVAARK, A…5-2346AARONSON, SJ…3-2349….JAMES, DFV…7-5436JOHANSSON, Scarlett…(you’ll be lucky…)KWIAT, PG…3-9116….ZEILINGER, A…5-1201ZYXT, X…4-8719
who has the phone number 7-5436 ?
classically: ~ N/2 queriesquantum algorithm: ~
N
Grover’s Algorithm
3/22
H2L Algorithm*
*Harrow, Hassidim and Lloyd, 2009
Given a matrix A and a vector b, find a vector x such that A x =b
• A is sparse (lots of zeros on off diagonal)
• not interested in x, rather in x†.M.x for some M.
• exponential speed-up demonstrated over classical algorithms
4/22
Alice
Bob
RSA* Encryption and Factoring
*Rivest, Shamir & Adelman, 1978; (also Clifford Cocks, 1973).
• select two prime numbers: p,q
• calculate: n = p.q; = (p-1).(q-1)
• select e, with GCD(e,) = 1
• calculate d, with e.d = 1 mod public key: n,e
• Message: M
• calculate: E = Me mod n
encrypted message, E
• calculate: Ed mod n = M mod n
• Easy to find the message if you know p and q
• Security relies on difficulty of factoring n
Message M
5/22
• Example: n = 77; c = 8;
0
20
40
60
80
0 10 20 30 40a
fn,c(x)
x
• The function fn,c(x) = cx mod n , is
periodic, (period r). • Either or is a factor of n.
€
GCD cr / 2 −1,n( )
€
GCD cr / 2 +1,n( )
• Chose a number, c, which is coprime with n i.e. GCD(c,n) =1
GCD 85 +1,77( )=11
GCD 85 −1,77( ) =7
From data, r = 10;
Period Finding Factoring
Factoring Numbers*
*P. Shor, Proc. 35th Ann. Symp. Found. Comp. Sci. 124-134 (1994);also: Preskill et al., Phys Rev A 54, 1034 (1996).
6/22
Large number of evaluations are replaced
by one
Quantum Factoring
€
then you can do this : ˆ U f x 0x∑ ⎛
⎝ ⎜
⎞
⎠ ⎟= x fN ,C x( )
x∑
• Classical factoring: evaluate fn,c(x) for
a large number of values of x until you can find r.
€
if you can do this : ˆ U f x 0 = x fN ,C x( )
• Quantum parallelism:
i.e. the state of multiple qubits corresponding to x; e.g.if x=29, ⏐x⟩=⏐11101⟩
7/22
€
φ x( ) =1
2L / 2fN ,C y( ) exp i
2π
2Lx.y
⎛
⎝ ⎜
⎞
⎠ ⎟
y =0
2 L -1
∑
Quantum Factoring (cont.)• Quantum Fourier Transform to argument register:
€
UQFT ⊗ I( ) x fN ,C x( )x∑ = x φ x( )
x∑
• If 2L/r=M, number of periods in the argument register:
€
φ x( ) = M ϕ s if x = sM s = 0,1,2....r −1( )
0 otherwise
⎧ ⎨ ⎩
0 T 2T
Periodic Function
... 0 1/T 2/T 3/T...
Fourier Transform
8/22
Quantum Factoring (cont., again)
€
x φ x( )x∑ = s2L /r ϕ s
s =0
r-1∑
• Thus the state after the QFT is:
• Discard the function register: the argument register is in a mixed state:
€
ρ final = s2L r s2L rs =0
r-1∑
• Measurement of the function register yields, with high probability a number which is a multiple of N/r; extracting r, you can find the factors.
9/22
BUT....• Unless you get real lucky, N is not a multiple of r
• How actually do you implement the unitary operations for modular exponentiation and quantum Fourier transform?
- you can fix this using bigger registers, so the ‘periodic’ signal swamps the rest.
- both can be done efficiently (i.e. in a polynomial number of operations)
- break down complicated operations into simpler operations (e.g. multiplexed adders and repeated squaring), which can be performed by CNOTs and related multi-qubit quantum gates.
- QFT can be simplified by dropping some operations, and by doing it ‘semi-classically’ by measurement and feed-forward*
*R. B.Griffiths and C.-S. Niu Phys. Rev. Lett. 76 3228 (1996).
10/22
modular exponentiation Fourier trans.initiation
Circuit Diagram
argument
function
€
x 0x=0
2 L-1∑
€
x fN ,C x( )x=0
2 L-1∑€
C20
€
C21
€
C2L−1
....
QFT
€
sN /r ϕ ss =0
r-1∑
readout
11/22
RSA cryptosystem:
•polynomial work to encrypt/decrypt
•exponential work to break = factoring
•BUT quantum factoring is only polynomial work
27997833911221327870829467638722601621070446786955428537560009929326128400107609345671052955360856061822351910951365788637105954482006576775098580557613579098734950144178863178946295187237869221823983
RSA 200:3532461934402770121272604978198464368671197400197625023649303468776121253679423200058547956528088349
7925869954478333033347085841480059687737975857364219960734330341455767872818152135381409304740185467
x=
Vulnerability of RSA to Quantum Computers?
RSA200
0 200 400 600 800 10001
10
100
10001 10
41 10
51 10
61 10
71 10
81 10
91 10
101 10
111 10
121 10
131 10
141 10
151 10
161 10
171 10
181 10
191 10
201 10
211 10
221 10
231 10
24
Classical ~ exp{AL}
# of instructions
# of bits, L, factored
~ 1020
instructions: 16 months (2003-05)
Shors Algorithm~ L3
~ 1012 operations:Hours ?
12/22
2. Simplifications for a Few QubitsN=15, C=4
x fN,C(x)
0 1
1 4
2 1
3 4
i.e. period 2
N=15, C=2
x fN,C(x)
0 1
1 2
2 4
3 8
4 1
i.e. period 4
13/22
Simplifications for a Few QubitsN=15, C=4
x fN,C(x)
00 001
01 100
10 001
11 100
i.e. period 2
N=15, C=2
x fN,C(x)
000 0001
001 0010
010 0100
011 1000
100 0001
i.e. period 4
this is too profligate with qubits....
14/22
Simplifications for a Few QubitsN=15, C=4
xLogC[fN,C(x)]
00 00
01 01
10 00
11 01i.e. period 2
N=15, C=2
xLogC[fN,C(x)]
000 00
001 01
010 10
011 11
100 00i.e. period 4
15/22
cancelMinimalist Period 2 Circuit
X
QFT
Z
• Top rail cancellation occurs for all r =2n.• Two qubits, one quantum gate
xLogC[fN,C(x)]
00 00
01 01
10 00
11 01
16/22
XX
X
Slightly Less Minimalist Period 2 Circuitwithout Logarithm of fN,C(x)
• Three qubits, two gates.
17/22
X
X
What about Period 4?
QFT
Z
Z
T
€
T =exp iπ /8[ ] 0
0 exp −iπ /8[ ]
⎛
⎝ ⎜
⎞
⎠ ⎟
xLogC[fN,C(x)]
000 00
001 01
010 10
011 11
100 00
18/22
X
X
What about Period 4?
Z
• 4 qubits, 2 quantum gates
xLogC[fN,C(x)]
000 00
001 01
010 10
011 11
100 00
Z
19/22
*Lanyon, Weinhold, Langford, Barbieri, James, Gilchrist, and White, PRL 99, 250505 (2007)
4-photonsource
3. Factoring Experiment*
20/22
GCD of Cr/2±1 and NGCD of 41±1 and 15 = 3,5
P110 = 27 ± 2%
order-2 order-4
F = 99.9 ± 0.3%SL= 99.9 ± 0.6% F = 98.5 ± 0.6%
SL= 98.1 ± 0.8%
P000 = 27 ± 2%P100 = 24 ± 2%
GCD of Cr/2±1 and NGCD of 41±1 and 15 = 3,5
r=2
add redundantbit then reverseargument bits
P10 = 48 ± 3%
P00 = 52 ± 3% failure
r=6
GCD of 43±1 and 15 = 3,5
r=2
P010 = 23 ± 2%
algorithm works near perfectly …?
Order-finding algortihm uses mixed output state: non-deterministic
Measuring the output
21/22
order-2
order-4
FGHZ = 59 ± 4%WGHZ = 9 ± 4%
SL= 62 ± 4%
F2Bell = 98.5 ± 0.6%=
Tbd = 41 ± 5%Tce = 33 ± 5%
SL= 98.1 ± 0.8%
joint state of argumentand function registersis entangled & mixed
joint state of argumentand function registersis highly entangled
independent photons
dependent photons
Measuring the output
22/22
Conclusions• Simplified versions of Shor’s Algorithm are accessible with today’s quantum technology technology.
• Improving these results, step-by-step, is as good a route to practical quantum computers.
• Complexity of quantum circuit depends on period r, rather than size of number.
23/22
xLogC[fN,C(x)]
0 0
1 1
2 2
3 0
4 1
5 2i.e. period 3
4. Where next: Period 3?N=21, C=4
xLogC[fN,C(x)]
000 00
001 01
010 10
011 00
100 01
101 10i.e. period 3
After modular exponentiation, a three qubit argument register plus two qubit function register will be in the state:⏐⟩= ⏐⟩⏐⟩⏐⟩⊗⏐⟩⏐⏐⟩⏐⟩⏐⟩⊗⏐⟩⏐⏐⟩⏐⟩⊗⏐⟩
24/22
A bit less scary...
• Can we make this state using established techniques for making W states and GHZ states?
where: ⏐⟩⏐⟩⏐⟩√
⏐⟩⏐⟩⏐⟩⏐⟩√
⏐⟩⏐⟩⏐⟩⏐⟩√
flip qubit #2:⏐⟩= ( ⏐⟩⊗⏐⟩⏐⟩⊗⏐⟩⏐⟩⊗⏐⟩
€
18
€
3
€
3
€
2
25/22
€
3 00 + 3 01 + 2 10 GHZ W W
Period 3 Circuit
H
X
X
X
Ry()
• 5 qubits, 8 gates + QFT (still pretty scary)• Period is not a power of 2; full QFT needed.• Size of the argument register will not be a factor of the period.
QFTXX
X
X
X
H
R(