Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
prime factorization
algorithm found by Peter Shor 1994
generalized to an algorithm for order finding
key step is the quantum Fourier transform (QFT)
Vorlesung Quantum Computing SS ‘08
1
discrete Fourier transform (DFT)
Lieven Vandersypen, PhD thesis: http://arxiv.org/abs/quant-ph/0205193
DFT
unitary transform that converts a string of N complex
numbers xj to a string of N complex numbers yj
yk =
1
√N
N-1
∑xe
j
i2pjk/N
j=0
inverts periodicity (input string period r, output string N/r)
10001000
10101010
converts off-sets into phase factors
01000100
Vorlesung Quantum Computing SS ‘08
1 0 -i 0 -1 0 i 0
2
quantum Fourier transform
Lieven Vandersypen, PhD thesis: http://arxiv.org/abs/quant-ph/0205193
number of qubits n = log2 N (for N=8, three qubits)
amplitude of |000 represents first complex number, |001 the 2nd
states |000, |001, ... , |111 are labelled |0, |1 , ... , |7
N-1
e
∑
√N
|j → 1
i2pjk/N
|k
k=0
01000100
(|1 + |5)√2
Vorlesung Quantum Computing SS ‘08
1 0 -i 0 -1 0 i 0
(|0 - i|2 - |4 + i|6)/2
3
quantum Fourier transform
N-1
e
∑
√N
|j → 1
i2pjk/N
|k
k=0
j = j122 + j221 + j320 (short: j = j1j2j3)
0.j1j2j3 = j1/2 + j2/4 + j3/8
reverse order of output qubits: j1in = j3out, j3in = j1out
|j1 j2 j3 → 1n/2
2
1
√2
2pi 0. j13
|0 +e
2pi 0. j2j13
|1 |0 +e
2pi 0. j31j2j13
|1 |0 +e
|1
j3in =1
1 1
1 -1 j in
3
H
Vorlesung Quantum Computing SS ‘08
1 1 1
1 0
0 eip/2 j in√2 1 -1 j in
2
2
R90°
23
H
4
QFT quantum circuit
Weinstein et al.: quant-ph/99060059v1 (1999)
| j 3
| j 1
H
| j 2
90°
R
| j 2
H
| j 1
45°
R
H=e
i pI
ħ x
-i p
ħ 2
Rjk= e
e
e
Iyj,k
e
i pI
ħ 2 y
R1 = e
e
i pI j i J t I j I k
z z
ħ q ħ
Vorlesung Quantum Computing SS ‘08
R
- i f Iz
ħ
i f I j,k i p I j,k
ħ x ħ 2 y
e
90°
e
i pI j
ħ q
| j 3
H
-i f
2
=
e
e
- i p Iy
ħ 2
= e
e
if
2
i fI i p I
ħ x ħ 2 y
e
5
QFT implementation
Weinstein et al.: Phys. Rev. Lett. 86,1889 (2001)
13C
labeled spins of Alanine as qubits (T1>1.5s, T2>400ms)
Preparation of pseudo-pure state |000
Preparation of input state |000+|010+ |100+|110
Apply QFT => |000+|001 and SWAP => |000+|100
|111 000|
|000000|
|111 111|
|000111|
Vorlesung Quantum Computing SS ‘08
6
Order finding
Lieven Vandersypen, PhD thesis: http://arxiv.org/abs/quant-ph/0205193
M rooms with one entrance and one exit
Connected by subcycles
How often to change room until back at start?
p1(5)=4, p2(5)=2, …
0
6
y={2,4,5}
r=3
7 y={0,1,3,7}
4
r=4
y=6
r=1
5
2
1
Vorlesung Quantum Computing SS ‘08
3
7
Order finding: quantum circuit
Lieven Vandersypen, PhD thesis: http://arxiv.org/abs/quant-ph/0205193
|x= |x2x1x0, x=4x2+2x1+x0
M=4, |y1y0= |y, y M-1
|x|y → |x|px(y) = |x|p4x 2 (y)|p2x 1(y)|px 0 (y)
y=3 p1(3)=1, p2(3)=3, …
|0
H
|0
H
|0
H
||y11
QFT
p (y)
||y10
p2(y)
p4(y)
|y|y
=(|0+|1+|2+|3+|4+|5+|6+|7)|11
|y3=(|0+|4)|1+(|0-|4)|3
|y0=|000|11
21=(|0+|2+|4+|6)|1+(|1+|3+|5+|7)|3
Vorlesung Quantum Computing SS ‘08
measurement yields multiple of 2n/r => r=2
8
Order finding for n qubits
Lieven Vandersypen, PhD thesis: http://arxiv.org/abs/quant-ph/0205193
register 1
number of transitions between “rooms”
register 2
number of starting room
1) |0|0
n
2) Hn →
2 -1
S
1
|j|0
n
√2 j=0
n
3) f(j)=pj(0) →
2 -1
S
1
|j|f(j)
n
√2 j=0
n
n
n
2 -1 2 -1
n
2 -1 2 -1
S S
S S
4) QFT r1 → 1
ei2pjk/N |k|f(j) → 1
ei2pjk/N |k|f(j)
√2n j=0 k=0
√2n k=0 j=0
n
5) Measure the amplitude of |k →
Vorlesung Quantum Computing SS ‘08
2 -1
S
e
j=0
2
i2pjk/N
(large for k=c*N/r)
9
Shor’s algorithm
L. Vandersypen et al.: Nature 414, 883 (2001)
one factor is gcd(ar/21,N)
number to factorize: N
(e.g. N=15)
(probability >0.5)
integer a does NOT divide N
(a=2,4,7,8,11,13,14)
f(x,y)=px(y)=axy mod N
“easy”
“easy?”
a2 mod 15 = 1, a {4,11,14}
a4
f(x) needs x0 only
2k
mod 15 = 1, a {2,7,8,13} => a mod 15 =1, k ≥ 2
f(x) needs x0 and x1
register 1
needs 2 qubits (take 3)
n=2m
register 2
needs 4 qubits
m=(log2N)
Vorlesung Quantum Computing SS ‘08
10
Implementation of Shor’s algorithm
3
5
6
1
2
C
C
7
4
Vorlesung Quantum Computing SS ‘08
11
Measurement
thermal spectra
a=11
effective pure state
calculated
measured
simulated
x1=0
x0=0
x=|000+|100=|0+|4 =>r=2n/4=2
Vorlesung Quantum Computing SS ‘08
x2=|0+|1
gcd(112/21,15)=3,5
12
Pulse sequence
total ~300 pulses
y
90°pulse
180°refocusing pulses
-x x
x -x
z rotation
Vorlesung Quantum Computing SS ‘08
13