Richard Cleve DC 3524 [email protected] Course web site at:
description
Transcript of Richard Cleve DC 3524 [email protected] Course web site at:
1
Introduction to Introduction to Quantum Information ProcessingQuantum Information Processing
CS 467 / CS 667CS 467 / CS 667Phys 467 / Phys 767Phys 467 / Phys 767C&O 481 / C&O 681C&O 481 / C&O 681
Richard Cleve DC [email protected]
Course web site at: http://www.cs.uwaterloo.ca/~cleve/courses/cs467
Lecture 9 (2005)
2
ContentsContents
• Loose ends in discrete log algorithm
• Universal sets of quantum gates
3
• Loose ends in discrete log algorithm
• Universal sets of quantum gates
4
Discrete log algorithm (I)Discrete log algorithm (I)Input: p (n-bit prime), g (generator of Z*p), a Z*p
Output: r Zp1 such that g r mod p = a
Example: p = 7, Z*7 = {1, 2, 3, 4, 5, 6} = {30, 32, 31, 34, 35, 33} (hence 3 is a generator of Z*7)
Define f : Zp1 Zp1 Z*p as f (x , y) = gx ay mod p
Then f (x1 , y1) = f (x2, y2) iff (x1, y1) (x2, y2) k (r, 1) (mod p 1)
fF
0
0F0
0
F†
F†
produces a random (s , t) such that
(s , t)(r, 1) 0 (mod p 1)
sr + t 0 (mod p 1)
(for some k)
5
Discrete log algorithm (II)Discrete log algorithm (II)
fF
0
0F0
0
F†
F† produces a random (s , t) such that
sr + t 0 (mod p 1)
If gcd(s, p 1) = 1 then r can be computed as r = ts1 mod p 1
The probability that this occurs is (p 1)/ (p 1), where is Euler’s totient function
It is known that (N) = (N/ loglogN), which implies that the
above probability is at least (1/ loglog p) = (1/ log n)
Therefore, O( log n) repetitions are sufficient
… this is not bad—but things are actually better than that …
6
Discrete log algorithm (III)Discrete log algorithm (III)We obtain a random (s , t) such that sr + t 0 (mod p 1)
Therefore, a constant number of repetitions suffices
Note that each s {0,…, p 2} occurs with equal probability
Therefore, if we run the algorithm twice: we obtain two independent samples s1, s2 {0,…,p 2}
Question: what is the probability that gcd(s1, s2) = 1?
prime
22prime
1 5401
1PrPr1qq
.q
s|qs|q
If it happens that gcd(s1, s2) = 1 then (by Euclid) there exist
integers a and b such that as1 + bs2 = 1 r = (at1 + bt2)
7
Discrete log algorithm (IV)Discrete log algorithm (IV)Another loose end: our algorithm uses QFTs modulo p 1,
whereas we have only seen how to compute QFTs modulo 2n
A variation of our QFT algorithm would work for moduli of the form 3n, and, more generally, all smooth numbers (those that are products of “small” primes)
2113121
13963
12642
132
ωωωω1
ωωωω1
ωωωω1
ωωωω1
11111
1
)N()N()N(N
)N(
)N(
N
N
H4
8 4
816 4
32 16 8 4
H
HH
H
8
Discrete log algorithm (V)Discrete log algorithm (V)
Shor just used a modulus close to p 1, and, using careful error-analysis, showed that this was good enough ...
In fact, for the case where p 1 is smooth, there already exist polynomial-time classical algorithms for discrete log!
It’s only the case where p 1 is not smooth that is interesting
There are also ways of attaining good approximations of QFTs for arbitrary moduli (which we won’t consider now)
9
• Loose ends in discrete log algorithm
• Universal sets of quantum gates
10
A universal set of gates (I)A universal set of gates (I)Main Theorem: any unitary operation U acting on k qubits
can be decomposed into O(4k) CNOT and one-qubit gates
Proof sketch (for a slightly worse bound of O(k24k)) :
We first show how to simulate a controlled-U, for any one-qubit unitary U
2β
2β
2α
2α
δ
δ
0
0
2θcos2θsin
2θsin2θcos
0
0
0
0/i
/i
/i
/i
i
i
e
e
//
//
e
e
e
e
Straightforward to show: every one-qubit unitary matrix can be expressed as a product of the form
11
A universal set of gates (II)A universal set of gates (II)
• A B C = I• ei A X B X C = U, where
This can be used to show that, for every one-qubit unitary U,
there exist A, B, C, and , such that:
01
10X
The fact implies that
U A B C
Pwhere
λ0
01ie
P
Exercise: show how this follows
12
A universal set of gates (III)A universal set of gates (III)
Controlled-U gates can also simulate controlled-controlled-V gates, for an arbitrary unitary one-qubit unitary V:
UV U U †
where V = U 2
13
A universal set of gates (IV)A universal set of gates (IV)
Example: Toffoli gate“controlled-controlled-NOT”
In this case, the one-qubit gates can be:
4π0
01/ie
T
c (ab)
b
aa
b
c
11
11
2
1H
14
A universal set of gates (V)A universal set of gates (V)
From the Toffoli gate, generalized Toffoli gates (which are controlled-controlled- ... -NOT gates) can be constructed:
a1a2a3
:akb1
:
c
c (a1 a2 ... ak)
bk2
15
A universal set of gates (VI)A universal set of gates (VI)From generalized Toffoli gates, generalized controlled-U
gates (controlled-controlled- ... -U) can be constructed:
U0
U
0
1110
0100
000000
000000
00100000
00010000
00001000
00000100
00000010
00000001
UU
UU
16
A universal set of gates (VII)A universal set of gates (VII)
10000000
01000000
00100000
000000
00001000
00000100
000000
00000001
1110
0100
UU
UU
The approach essentially enables any k-qubit operation of the simple form
to be computed with O(k2) CNOT and one-qubit gates
In a spirit similar to Gaussian elimination, any 2k2k unitary
matrix can be decomposed into a product of O(4k) of these
17
A universal set of gates (VIII)A universal set of gates (VIII)
Thus, the set of all one-qubit gates and the CNOT gate are universal in that they can simulate any other gate set
This completes the proof sketch*
Question: is there a finite set of gates that is universal?
Answer 1: strictly speaking, no, because this results in only countably many quantum circuits, whereas there are uncountably many unitary operations on k qubits (for any k)
Actually we proved a slightly worse bound of O(k24k)
18
ApproximatelyApproximately universal gate sets universal gate sets
Answer 2: yes, for universality in an approximate sense ...
To be continued ...
19