Professional Documents
Culture Documents
Martin Rotteler
NEC Laboratories America, Inc. 4 Independence Way, Suite 200 Princeton, NJ 08540, U.S.A.
International Summer School on Quantum Information, Max-Planck-Institut fur Physik komplexer Systeme Dresden, August 31, 2005
Overview
Today: Introduction to qubits, quantum gates, and circuits. Appetizer: Two-bit problem where quantum beats classical! The power of quantum computing: Simons algorithm Basic principles used:
Computing in superposition Constructive/destructive interference
, C,
where ||2 + | |2 = 1.
, C,
where ||2 + | |2 = 1.
, C,
where ||2 + | |2 = 1.
Bits vs Qubits
One classical bit One quantum bit (qubit)
is in a coherent superposition | = | + | of the basis states | , | Quantum state space H2 = C2 : | + | : ||2 + | |2 = 1 of 2 dimensions
Introduction to Quantum Algorithms
Bits vs Qubits
One classical bit One quantum bit (qubit)
is in a coherent superposition | = | + | of the basis states | , | Quantum state space H2 = C2 : | + | : ||2 + | |2 = 1 of 2 dimensions
Introduction to Quantum Algorithms
of the state
1 n
n
n
in the 2n dimensional space H2n = C2 C2 C2 = C2 . Product states of n qubits can only hold a product state |1 |2 |n = (1 | + 1 | ) (n | + n | ) (thus, only linear scaling of system and dimension)
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
of the state
1 n
n
n
in the 2n dimensional space H2n = C2 C2 C2 = C2 . Product states of n qubits can only hold a product state |1 |2 |n = (1 | + 1 | ) (n | + n | ) (thus, only linear scaling of system and dimension)
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
of the state
1 n
n
n
in the 2n dimensional space H2n = C2 C2 C2 = C2 . Product states of n qubits can only hold a product state |1 |2 |n = (1 | + 1 | ) (n | + n | ) (thus, only linear scaling of system and dimension)
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
H2
2 3 1 1 6 17 1 6 1 7 2 41 1 5
1 1 7 7 5 1
d d
2 1 6 6 1 4 1
2 3 1 6 6 1 7 7 4 u11 u12 5
u21 u22
H2
2 3 1 1 6 17 1 6 1 7 2 41 1 5
1 1 7 7 5 1
d d
2 1 6 6 1 4 1
2 3 1 6 6 1 7 7 4 u11 u12 5
u21 u22
y| .
1 2n/2
x ,y I Fn 2
(1)x y |x
y| ,
where x y :=
n i = 1 xi yi
I F2 .
Introduction to Quantum Algorithms
y| .
1 2n/2
x ,y I Fn 2
(1)x y |x
y| ,
where x y :=
n i = 1 xi yi
I F2 .
Introduction to Quantum Algorithms
H2 H2
H2 H2
H2 H2
U (i )
. . . . . .
. . . . . . . . . i j
Universal set of gates Theorem (Barenco et al., 1995): U (2n ) = U (i ) , CNOT(i ,j ) Quantum gates: main problem Find efcient factorizations for given U U (2n )!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
i , j = 1, . . . , n ,
i =j
U (i )
. . . . . .
. . . . . . . . . i j
Universal set of gates Theorem (Barenco et al., 1995): U (2n ) = U (i ) , CNOT(i ,j ) Quantum gates: main problem Find efcient factorizations for given U U (2n )!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
i , j = 1, . . . , n ,
i =j
U (i )
. . . . . .
. . . . . . . . . i j
Universal set of gates Theorem (Barenco et al., 1995): U (2n ) = U (i ) , CNOT(i ,j ) Quantum gates: main problem Find efcient factorizations for given U U (2n )!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
i , j = 1, . . . , n ,
i =j
0 1B U= B 2@
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 C C A
01 1 1B =2B @ 1 1 1
1 1
1 C C 1A
(I x ) I x
01 1 B B @ 1 1 1
1
(H2 I )
1 1
1 C C A
Quantum circuit
H2 g H2
Introduction to Quantum Algorithms
0 1B U= B 2@
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 C C A
01 1 1B =2B @ 1 1 1
1 1
1 C C 1A
(I x ) I x
01 1 B B @ 1 1 1
1
(H2 I )
1 1
1 C C A
Quantum circuit
H2 g H2
Introduction to Quantum Algorithms
0 1B U= B 2@
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 C C A
01 1 1B =2B @ 1 1 1
1 1
1 C C 1A
(I x ) I x
01 1 B B @ 1 1 1
1
(H2 I )
1 1
1 C C A
Quantum circuit
H2 g H2
Introduction to Quantum Algorithms
x1 OR gate: 0 0 1 1
Theorem
Any deterministic classical circuit and thereby any deterministic classical computation can be realized by using NAND gates only. Any probabilistic computation can be realized using NAND gates and in addition one gate which realizes a fair coin ip.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
x1 OR gate: 0 0 1 1
Theorem
Any deterministic classical circuit and thereby any deterministic classical computation can be realized by using NAND gates only. Any probabilistic computation can be realized using NAND gates and in addition one gate which realizes a fair coin ip.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Then ({0, 1}, , ) becomes a eld consisting of two elements only, also denoted by I F2 . A nite eld with n elements exists if and only if n is a prime power. Important identity: (1)x y = (1)x (1)y We can also rewrite CNOT: |x |y |x |x y
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Then ({0, 1}, , ) becomes a eld consisting of two elements only, also denoted by I F2 . A nite eld with n elements exists if and only if n is a prime power. Important identity: (1)x y = (1)x (1)y We can also rewrite CNOT: |x |y |x |x y
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Then ({0, 1}, , ) becomes a eld consisting of two elements only, also denoted by I F2 . A nite eld with n elements exists if and only if n is a prime power. Important identity: (1)x y = (1)x (1)y We can also rewrite CNOT: |x |y |x |x y
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Then ({0, 1}, , ) becomes a eld consisting of two elements only, also denoted by I F2 . A nite eld with n elements exists if and only if n is a prime power. Important identity: (1)x y = (1)x (1)y We can also rewrite CNOT: |x |y |x |x y
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Then ({0, 1}, , ) becomes a eld consisting of two elements only, also denoted by I F2 . A nite eld with n elements exists if and only if n is a prime power. Important identity: (1)x y = (1)x (1)y We can also rewrite CNOT: |x |y |x |x y
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
|x |y |z
|x |y |z x y
Theorem (Toffoli, 1981) Any reversible computation can be realized by using TOF gates and ancilla (auxiliary) bits which are initialized to 0.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
|x |y |z
|x |y |z x y
Theorem (Toffoli, 1981) Any reversible computation can be realized by using TOF gates and ancilla (auxiliary) bits which are initialized to 0.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
A Two-Bit Problem
The Deutsch Jozsa problem (most simple case) Given a Boolean function f : {0, 1} {0, 1}. Decide whether the property f (0) = f (1) holds or not. The four possible functions x 0 1 f (x ) 0 0 x 0 1 f (x ) 1 1 x 0 1 f (x ) 0 1 x 0 1 f (x ) 1 0
Observation From querying the function only on one input, we cannot determine whether f (0) = f (1) with certainty. E. g., if the answer is f (0) = 0, it could be the rst or third function. On the other hand, two queries determine the function completely. What is the quantum query complexity?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
A Two-Bit Problem
The Deutsch Jozsa problem (most simple case) Given a Boolean function f : {0, 1} {0, 1}. Decide whether the property f (0) = f (1) holds or not. The four possible functions x 0 1 f (x ) 0 0 x 0 1 f (x ) 1 1 x 0 1 f (x ) 0 1 x 0 1 f (x ) 1 0
Observation From querying the function only on one input, we cannot determine whether f (0) = f (1) with certainty. E. g., if the answer is f (0) = 0, it could be the rst or third function. On the other hand, two queries determine the function completely. What is the quantum query complexity?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
A Two-Bit Problem
The Deutsch Jozsa problem (most simple case) Given a Boolean function f : {0, 1} {0, 1}. Decide whether the property f (0) = f (1) holds or not. The four possible functions x 0 1 f (x ) 0 0 x 0 1 f (x ) 1 1 x 0 1 f (x ) 0 1 x 0 1 f (x ) 1 0
Observation From querying the function only on one input, we cannot determine whether f (0) = f (1) with certainty. E. g., if the answer is f (0) = 0, it could be the rst or third function. On the other hand, two queries determine the function completely. What is the quantum query complexity?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
? ?
|x = = |f (x ) |1 f (x ) 2 | 0 |1 |x (1)f (x ) 2 |0 |1 (1)f (x ) |x 2
Introduction to Quantum Algorithms
? ?
|x = = |f (x ) |1 f (x ) 2 | 0 |1 |x (1)f (x ) 2 |0 |1 (1)f (x ) |x 2
Introduction to Quantum Algorithms
? ?
|x = = |f (x ) |1 f (x ) 2 | 0 |1 |x (1)f (x ) 2 |0 |1 (1)f (x ) |x 2
Introduction to Quantum Algorithms
? ?
|x = = |f (x ) |1 f (x ) 2 | 0 |1 |x (1)f (x ) 2 |0 |1 (1)f (x ) |x 2
Introduction to Quantum Algorithms
(1)f (x ) |x
? ?
=
2
H 2
? ?
=
2
H 2
? ?
=
2
H 2
? ?
=
2
H 2
? ?
=
2
H 2
=
2
H 2
Hence, we from measuring the rst qubit in the computational basis, we obtain the answer f (0) f (1) which reveals whether f (0) = f (1) or not.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
=
2
H 2
Hence, we from measuring the rst qubit in the computational basis, we obtain the answer f (0) f (1) which reveals whether f (0) = f (1) or not.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
x1
Uniform families of quantum circuits A family F := {Cn U (2n ) | n I N} of quantum circuits is called uniform if there exists a polynomial-time deterministic Turing machine which computes n Cn , where n is the problem size. Theorem (Yao 93) Uniform families of quantum circuits and quantum Turing machines (see Bernstein/Vazirani 93) are equivalent.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
x1
Uniform families of quantum circuits A family F := {Cn U (2n ) | n I N} of quantum circuits is called uniform if there exists a polynomial-time deterministic Turing machine which computes n Cn , where n is the problem size. Theorem (Yao 93) Uniform families of quantum circuits and quantum Turing machines (see Bernstein/Vazirani 93) are equivalent.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
x1
Uniform families of quantum circuits A family F := {Cn U (2n ) | n I N} of quantum circuits is called uniform if there exists a polynomial-time deterministic Turing machine which computes n Cn , where n is the problem size. Theorem (Yao 93) Uniform families of quantum circuits and quantum Turing machines (see Bernstein/Vazirani 93) are equivalent.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Asymptotics of Functions
Landau notation We use Landau notation to compare the asymptotics of two functions f , g : I N C. Typically, f is the running time for an algorithm for input of size n and g is another function. f (n) = O (g (n)) means that for some m there exists a constant c > 0, such that |f (n)| cg (n) for all n m. f (n) = (g (n)) means that for some m there exists a constant c > 0, such that |f (n)| cg (n) for all n m. f (n) = (g (n)) means that both f (n) = O (g (n)) and f (n) = (g (n)) hold. Example Let f (n) be number of operations needed to compute a classical FFT of a vector of length n. Then f (n) = O (n log(n)).
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Asymptotics of Functions
Landau notation We use Landau notation to compare the asymptotics of two functions f , g : I N C. Typically, f is the running time for an algorithm for input of size n and g is another function. f (n) = O (g (n)) means that for some m there exists a constant c > 0, such that |f (n)| cg (n) for all n m. f (n) = (g (n)) means that for some m there exists a constant c > 0, such that |f (n)| cg (n) for all n m. f (n) = (g (n)) means that both f (n) = O (g (n)) and f (n) = (g (n)) hold. Example Let f (n) be number of operations needed to compute a classical FFT of a vector of length n. Then f (n) = O (n log(n)).
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Computational Complexity
Measuring the problem size Usually algorithms can use different kinds of resources. Typical examples for resources which can be measured are time, space, depth, and queries. The resources needed are always measured as a function of the input size. Examples Consider the problem of multiplying two n-bit numbers. Clearly, this can be done in O (n2 ) additions and multiplications using the school method. The best known method uses O (n log n log log n) operations. The converse problem of factoring an n-bit number N into its prime factors is much harder. The currently best known algorithm needs exp c (log N )1/3 (log log N )2/3 operations.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Computational Complexity
Measuring the problem size Usually algorithms can use different kinds of resources. Typical examples for resources which can be measured are time, space, depth, and queries. The resources needed are always measured as a function of the input size. Examples Consider the problem of multiplying two n-bit numbers. Clearly, this can be done in O (n2 ) additions and multiplications using the school method. The best known method uses O (n log n log log n) operations. The converse problem of factoring an n-bit number N into its prime factors is much harder. The currently best known algorithm needs exp c (log N )1/3 (log log N )2/3 operations.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Query Problems
Query complexity and black boxes Instead of counting the number of operations we can count the number of queries to f in order to solve the problem. Often upper and lower bounds can be shown for the query complexity model only. Black-box model: we assume that we are given a function f but cannot analyze how f is actually implemented. Most real-world problems are actually white-box, for example FACTORING, GRAPH-ISO, etc. Lower bounds in the white-box problems are typically very weak. Examples Black box problems: Simons algorithm, Grovers algorithm. White-box problems: Factoring and dlog, phase estimation.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Query Problems
Query complexity and black boxes Instead of counting the number of operations we can count the number of queries to f in order to solve the problem. Often upper and lower bounds can be shown for the query complexity model only. Black-box model: we assume that we are given a function f but cannot analyze how f is actually implemented. Most real-world problems are actually white-box, for example FACTORING, GRAPH-ISO, etc. Lower bounds in the white-box problems are typically very weak. Examples Black box problems: Simons algorithm, Grovers algorithm. White-box problems: Factoring and dlog, phase estimation.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem
The XOR bit mask problem We consider only functions f : {0, 1}n {0, 1}n for which there exists s {0, 1}n such that x {0, 1}n we have f (x ) = f (x s), x , y {0, 1}n we have that if x = y s, then f (x ) = f (y ). The task is to nd the hidden string s. Example where f : {0, 1}3 {0, 1}3
0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 1 0 0 1
Simons Problem
The XOR bit mask problem We consider only functions f : {0, 1}n {0, 1}n for which there exists s {0, 1}n such that x {0, 1}n we have f (x ) = f (x s), x , y {0, 1}n we have that if x = y s, then f (x ) = f (y ). The task is to nd the hidden string s. Example where f : {0, 1}3 {0, 1}3
0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 1 0 0 1
Simons Problem
The XOR bit mask problem We consider only functions f : {0, 1}n {0, 1}n for which there exists s {0, 1}n such that x {0, 1}n we have f (x ) = f (x s), x , y {0, 1}n we have that if x = y s, then f (x ) = f (y ). The task is to nd the hidden string s. Example where f : {0, 1}3 {0, 1}3
0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 1 0 0 1
Simons Problem
Some comments about Simons problem There is some similarity to the Deutsch-Jozsa problem, however, here the task is not to distinguish between two cases (constant vs balanced) but between exponentially many cases (one for each unknown string s). Problem might seem articial, but Shors algorithm has the same underlying idea. Note: This is a promise problem! Problem gave the rst strong (polynomial vs exponential) separation between quantum and classical computing. Before that only super-polynomial separations were known. Literature D. R. Simon. On the Power of Quantum Computation. Proc. FOCS 94, 116123. IEEE, 1994.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem
Some comments about Simons problem There is some similarity to the Deutsch-Jozsa problem, however, here the task is not to distinguish between two cases (constant vs balanced) but between exponentially many cases (one for each unknown string s). Problem might seem articial, but Shors algorithm has the same underlying idea. Note: This is a promise problem! Problem gave the rst strong (polynomial vs exponential) separation between quantum and classical computing. Before that only super-polynomial separations were known. Literature D. R. Simon. On the Power of Quantum Computation. Proc. FOCS 94, 116123. IEEE, 1994.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem
Some comments about Simons problem There is some similarity to the Deutsch-Jozsa problem, however, here the task is not to distinguish between two cases (constant vs balanced) but between exponentially many cases (one for each unknown string s). Problem might seem articial, but Shors algorithm has the same underlying idea. Note: This is a promise problem! Problem gave the rst strong (polynomial vs exponential) separation between quantum and classical computing. Before that only super-polynomial separations were known. Literature D. R. Simon. On the Power of Quantum Computation. Proc. FOCS 94, 116123. IEEE, 1994.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem
Some comments about Simons problem There is some similarity to the Deutsch-Jozsa problem, however, here the task is not to distinguish between two cases (constant vs balanced) but between exponentially many cases (one for each unknown string s). Problem might seem articial, but Shors algorithm has the same underlying idea. Note: This is a promise problem! Problem gave the rst strong (polynomial vs exponential) separation between quantum and classical computing. Before that only super-polynomial separations were known. Literature D. R. Simon. On the Power of Quantum Computation. Proc. FOCS 94, 116123. IEEE, 1994.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
|x Uf |y
|x
|y f (x )
Uf | |0 =
i =1
Uf |xi |0 =
i =1
|xi |f (xi ) .
|x Uf |y
|x
|y f (x )
Uf | |0 =
i =1
Uf |xi |0 =
i =1
|xi |f (xi ) .
|x Uf |y
|x
|y f (x )
Uf | |0 =
i =1
Uf |xi |0 =
i =1
|xi |f (xi ) .
x |x |f (x ) x |x |0 +
x :f (x )=0 x :f (x )=1
2n/2
x |x |1 .
|x |2 , Pr(X = 1) =
x :f (x )=1
|x |2 .
This talk: We only consider von Neumann measurements of some (or all) of the qubits.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
x |x |f (x ) x |x |0 +
x :f (x )=0 x :f (x )=1
2n/2
x |x |1 .
|x |2 , Pr(X = 1) =
x :f (x )=1
|x |2 .
This talk: We only consider von Neumann measurements of some (or all) of the qubits.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
x |x |f (x ) x |x |0 +
x :f (x )=0 x :f (x )=1
2n/2
x |x |1 .
|x |2 , Pr(X = 1) =
x :f (x )=1
|x |2 .
This talk: We only consider von Neumann measurements of some (or all) of the qubits.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
yields the result X = 1 , then the collapsed state is 1 |1 = x |x , where s1 = |{x : f (x ) = 1}|. s1
x :f (x )=1
Note: cannot be used to nd solutions to f (x ) = 1. Why? Further reading: the most general operation which can be applied to a quantum system in order to obtain classical information is a POVM (positive operator valued measure).
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
yields the result X = 1 , then the collapsed state is 1 |1 = x |x , where s1 = |{x : f (x ) = 1}|. s1
x :f (x )=1
Note: cannot be used to nd solutions to f (x ) = 1. Why? Further reading: the most general operation which can be applied to a quantum system in order to obtain classical information is a POVM (positive operator valued measure).
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
yields the result X = 1 , then the collapsed state is 1 |1 = x |x , where s1 = |{x : f (x ) = 1}|. s1
x :f (x )=1
Note: cannot be used to nd solutions to f (x ) = 1. Why? Further reading: the most general operation which can be applied to a quantum system in order to obtain classical information is a POVM (positive operator valued measure).
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
1 2n 1 2n
|x |0
x I Fn 2
|x |f (x ) .
x I Fn 2
Collapsing the uniform superposition Now, measuring the second register will yield a random s I Fn 2 in the image of f . The state collapses to 1 |x0 ,s = (|x0 + |x0 s ). 2
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
1 2n 1 2n
|x |0
x I Fn 2
|x |f (x ) .
x I Fn 2
Collapsing the uniform superposition Now, measuring the second register will yield a random s I Fn 2 in the image of f . The state collapses to 1 |x0 ,s = (|x0 + |x0 s ). 2
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
= = =
1 2n + 1 1 2n + 1 1 2n + 1
x I Fn 2 x I Fn 2 x I Fn 2
= = =
1 2n + 1 1 2n + 1 1 2n + 1
x I Fn 2 x I Fn 2 x I Fn 2
= = =
1 2n + 1 1 2n + 1 1 2n + 1
x I Fn 2 x I Fn 2 x I Fn 2
= = =
1 2n + 1 1 2n + 1 1 2n + 1
x I Fn 2 x I Fn 2 x I Fn 2
= = =
1 2n + 1 1 2n + 1 1 2n + 1
x I Fn 2 x I Fn 2 x I Fn 2
= =
1 2n+1 1 2n+1
x I Fn 2
(1)x x0 1 + (1)x s |x
x I Fn 2
(1)x x0 |x
x s = 0
= {x I Fn 2 |x s = 0}.
What we really want... ... are elements from s itself (there is only 0 and s itself since s is one-dimensional). How can we compute s from s ?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
= =
1 2n+1 1 2n+1
x I Fn 2
(1)x x0 1 + (1)x s |x
x I Fn 2
(1)x x0 |x
x s = 0
= {x I Fn 2 |x s = 0}.
What we really want... ... are elements from s itself (there is only 0 and s itself since s is one-dimensional). How can we compute s from s ?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
= =
1 2n+1 1 2n+1
x I Fn 2
(1)x x0 1 + (1)x s |x
x I Fn 2
(1)x x0 |x
x s = 0
= {x I Fn 2 |x s = 0}.
What we really want... ... are elements from s itself (there is only 0 and s itself since s is one-dimensional). How can we compute s from s ?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
= =
1 2n+1 1 2n+1
x I Fn 2
(1)x x0 1 + (1)x s |x
x I Fn 2
(1)x x0 |x
x s = 0
= {x I Fn 2 |x s = 0}.
What we really want... ... are elements from s itself (there is only 0 and s itself since s is one-dimensional). How can we compute s from s ?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
|0 |0
P
x {0,1}n x {0,1}n
|x |0
|x |f (x )
+ |x0 s ) = |x0 ,s
2n+1
(1)x x0 |x
x s=0
x I Fn 2
6.
Sample y I Fn 2 with y s = 0.
|0 |0
P
x {0,1}n x {0,1}n
|x |0
|x |f (x )
+ |x0 s ) = |x0 ,s
2n+1
(1)x x0 |x
x s=0
x I Fn 2
6.
Sample y I Fn 2 with y s = 0.
|0 |0
P
x {0,1}n x {0,1}n
|x |0
|x |f (x )
+ |x0 s ) = |x0 ,s
2n+1
(1)x x0 |x
x s=0
x I Fn 2
6.
Sample y I Fn 2 with y s = 0.
|0 |0
P
x {0,1}n x {0,1}n
|x |0
|x |f (x )
+ |x0 s ) = |x0 ,s
2n+1
(1)x x0 |x
x s=0
x I Fn 2
6.
Sample y I Fn 2 with y s = 0.
|0 |0
P
x {0,1}n x {0,1}n
|x |0
|x |f (x )
+ |x0 s ) = |x0 ,s
2n+1
(1)x x0 |x
x s=0
x I Fn 2
6.
Sample y I Fn 2 with y s = 0.
|0 |0
P
x {0,1}n x {0,1}n
|x |0
|x |f (x )
+ |x0 s ) = |x0 ,s
2n+1
(1)x x0 |x
x s=0
x I Fn 2
6.
Sample y I Fn 2 with y s = 0.
|0 |0
P
x {0,1}n x {0,1}n
|x |0
|x |f (x )
+ |x0 s ) = |x0 ,s
2n+1
(1)x x0 |x
x s=0
x I Fn 2
6.
Sample y I Fn 2 with y s = 0.
|0 |0
P
x {0,1}n x {0,1}n
|x |0
|x |f (x )
+ |x0 s ) = |x0 ,s
2n+1
(1)x x0 |x
x s=0
x I Fn 2
6.
Sample y I Fn 2 with y s = 0.
|0 |0
P
x {0,1}n x {0,1}n
|x |0
|x |f (x )
+ |x0 s ) = |x0 ,s
2n+1
(1)x x0 |x
x s=0
x I Fn 2
6.
Sample y I Fn 2 with y s = 0.
(n1)n
(n1)n
= =
2n1 1 2n1 1
......
1 2
1
2n1 1 2n1
...... 1 1 1 2
1 4
1 2
+ ... +
1 1 2 4
= =
2n1 1 2n1 1
......
1 2
1
2n1 1 2n1
...... 1 1 1 2
1 4
1 2
+ ... +
1 1 2 4
= =
2n1 1 2n1 1
......
1 2
1
2n1 1 2n1
...... 1 1 1 2
1 4
1 2
+ ... +
1 1 2 4
= =
2n1 1 2n1 1
......
1 2
1
2n1 1 2n1
...... 1 1 1 2
1 4
1 2
+ ... +
1 1 2 4
The a priori probabilities Pr(s = s0 ) are equal and by symmetry Pr(|Fk | = k s = s0 ) is independent of s0 .
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The a priori probabilities Pr(s = s0 ) are equal and by symmetry Pr(|Fk | = k s = s0 ) is independent of s0 .
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The a priori probabilities Pr(s = s0 ) are equal and by symmetry Pr(|Fk | = k s = s0 ) is independent of s0 .
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The a priori probabilities Pr(s = s0 ) are equal and by symmetry Pr(|Fk | = k s = s0 ) is independent of s0 .
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The a priori probabilities Pr(s = s0 ) are equal and by symmetry Pr(|Fk | = k s = s0 ) is independent of s0 .
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Conclusions
Elementary quantum gates:
Controlled NOT gate Local unitary transformations
A simple quantum algorithm on two qubits which distinguishes constant from balanced functions. Separation: 1 query (quantum) vs 2 queries (classical) Quantum algorithm for Simons problem based on:
Computing with superpositions Interference of computational paths
Introduction to Quantum Algorithms Part II: The Algorithms of Shor and Grover
Martin Rotteler
NEC Laboratories America, Inc. 4 Independence Way, Suite 200 Princeton, NJ 08540, U.S.A.
International Summer School on Quantum Information, Max-Planck-Institut fur Physik komplexer Systeme Dresden, September 1, 2005
Overview
Today: Shors algorithm
Modular exponentiation Period extraction via Quantum Fourier Transform Classical post-processing
Generalizations of Shors algorithm Grovers algorithm for searching a list Universal quantum gates Outlook: On September 19, Markus Grassl will continue with an introduction to quantum error-correcting codes.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
1 2m
How can we efciently determine the multiplicative order of a random element a modulo N ?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
1 2m
How can we efciently determine the multiplicative order of a random element a modulo N ?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
1 2m
How can we efciently determine the multiplicative order of a random element a modulo N ?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
|y = f (x )
|x
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
x ZM
1 Uf |x |0 M
|x |f (x ) .
x ZM
Collapsing the graph of f Now, measuring the second register will yield a random s ZN in the image of f . The state collapses to 1 N /r
N /r 1
|x0 + k r .
k =0
Introduction to Quantum Algorithms
x ZM
1 Uf |x |0 M
|x |f (x ) .
x ZM
Collapsing the graph of f Now, measuring the second register will yield a random s ZN in the image of f . The state collapses to 1 N /r
N /r 1
|x0 + k r .
k =0
Introduction to Quantum Algorithms
The unknown offset x0 is transfered into the phases. The analogue of |x0 ,s in case of the cyclic group ZN is |x0 ,r = 1 N /r
N /r 1 r
|x0 + k r
k =0
6
x0
The unknown offset x0 is transfered into the phases. The analogue of |x0 ,s in case of the cyclic group ZN is |x0 ,r = 1 N /r
N /r 1 r
|x0 + k r
k =0
6
x0
k , =0...N 1
DFT
-
Proof: Let S :=
i n S
n1 ij j =0 n . n 1 i ij n n j =0
Then
n 1 n 1 i (j +1) n j =0
=
j =0
ij n =S
Proof: Let S :=
i n S
n1 ij j =0 n . n 1 i ij n n j =0
Then
n 1 n 1 i (j +1) n j =0
=
j =0
ij n =S
Proof: Let S :=
i n S
n1 ij j =0 n . n 1 i ij n n j =0
Then
n 1 n 1 i (j +1) n j =0
=
j =0
ij n =S
Proof: Let S :=
i n S
n1 ij j =0 n . n 1 i ij n n j =0
Then
n 1 n 1 i (j +1) n j =0
=
j =0
ij n =S
1 10 N /r 1 N 1 X X 1 1 ij @ |x0 + k r A N |i j |A @ p N /r k =0 N i ,j =0 0 1 N N /r 1 1 r X @ X i (x0 +k r ) A N |i N
i =0 k =0
N N /r 1 1 r X ix0 X ikr N N |i N i =0 k =0 | {z }
=:i
1 10 N /r 1 N 1 X X 1 1 ij @ |x0 + k r A N |i j |A @ p N /r k =0 N i ,j =0 0 1 N N /r 1 1 r X @ X i (x0 +k r ) A N |i N
i =0 k =0
N N /r 1 1 r X ix0 X ikr N N |i N i =0 k =0 | {z }
=:i
1 10 N /r 1 N 1 X X 1 1 ij @ |x0 + k r A N |i j |A @ p N /r k =0 N i ,j =0 0 1 N N /r 1 1 r X @ X i (x0 +k r ) A N |i N
i =0 k =0
N N /r 1 1 r X ix0 X ikr N N |i N i =0 k =0 | {z }
=:i
1 10 N /r 1 N 1 X X 1 1 ij @ |x0 + k r A N |i j |A @ p N /r k =0 N i ,j =0 0 1 N N /r 1 1 r X @ X i (x0 +k r ) A N |i N
i =0 k =0
N N /r 1 1 r X ix0 X ikr N N |i N i =0 k =0 | {z }
=:i
N /r 1 kr
i =
k =0 N r
=
k =0
1=
N . r
Case 2: i =
i =
k =0
kr
=0
N /r 1 kr
i =
k =0 N r
=
k =0
1=
N . r
Case 2: i =
i =
k =0
kr
=0
N /r 1 ikr N
r |i = N
r 1 =0
N 1 ix0 N i |i i =0
N
N r
x0 N
N r
1 = r
N r
x0
N r
What happens if r does not divide N ? In this case the state can be approximated very accurately by DFTN
k
|x0 + k r
Nx0 |
N /r 1 ikr N
r |i = N
r 1 =0
N 1 ix0 N i |i i =0
N
N r
x0 N
N r
1 = r
N r
x0
N r
What happens if r does not divide N ? In this case the state can be approximated very accurately by DFTN
k
|x0 + k r
Nx0 |
N /r 1 ikr N
r |i = N
r 1 =0
N 1 ix0 N i |i i =0
N
N r
x0 N
N r
1 = r
N r
x0
N r
What happens if r does not divide N ? In this case the state can be approximated very accurately by DFTN
k
|x0 + k r
Nx0 |
PM /r 1
k =0
Pr 1
=0
6.
PM /r 1
k =0
Pr 1
=0
6.
PM /r 1
k =0
Pr 1
=0
6.
PM /r 1
k =0
Pr 1
=0
6.
PM /r 1
k =0
Pr 1
=0
6.
PM /r 1
k =0
Pr 1
=0
6.
PM /r 1
k =0
Pr 1
=0
6.
PM /r 1
k =0
Pr 1
=0
6.
PM /r 1
k =0
Pr 1
=0
6.
Classical Post-Processing
p ? How to obtain r from q
Since we know N and 0 , we could easily compute r from 0 N r . p for which we only know that the However, we are just given q following holds p 1 0 < 2 q r 2r Diophantine approximation
p We apply the continued fractions algorithm to q . This will lead
to several principal fractions and actually r0 will be one of them. Note that we can check whether a candidate r is indeed the order. Theorem (Shor 94) FACTORING BQP.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Classical Post-Processing
p ? How to obtain r from q
Since we know N and 0 , we could easily compute r from 0 N r . p for which we only know that the However, we are just given q following holds p 1 0 < 2 q r 2r Diophantine approximation
p We apply the continued fractions algorithm to q . This will lead
to several principal fractions and actually r0 will be one of them. Note that we can check whether a candidate r is indeed the order. Theorem (Shor 94) FACTORING BQP.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Classical Post-Processing
p ? How to obtain r from q
Since we know N and 0 , we could easily compute r from 0 N r . p for which we only know that the However, we are just given q following holds p 1 0 < 2 q r 2r Diophantine approximation
p We apply the continued fractions algorithm to q . This will lead
to several principal fractions and actually r0 will be one of them. Note that we can check whether a candidate r is indeed the order. Theorem (Shor 94) FACTORING BQP.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Diophantine Approximation
The continued fractions algorithm Input: x I R. Output: Sequence of bi Z (possibly innite) which represents 1 1 , b1 := x1 , x2 := x , . . . . Then x . Let b0 := x , x1 := x b b
0 1 1
x = b0 +
1 b1 +
1 1 b2 +
[1, 1, 2, 2, 5, 3, 1, 1, 3, 1, 11, 1, 1, 21, 1, 2, 5, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3] Consider the convergents Cn which are obtained by truncating after n steps: n 1 2 3 4 5 6 7 8 9 10 Cn n Cn 1
1 2 3 5 7 12 38 65 121 207 159 272 280 479 999 1709 1279 2188
11
15608 25777
12
16347 27965
13
31415 53742
14
676062 1156547
... ...
27
5021264471 8589934592
Diophantine Approximation
The continued fractions algorithm Input: x I R. Output: Sequence of bi Z (possibly innite) which represents 1 1 , b1 := x1 , x2 := x , . . . . Then x . Let b0 := x , x1 := x b b
0 1 1
x = b0 +
1 b1 +
1 1 b2 +
[1, 1, 2, 2, 5, 3, 1, 1, 3, 1, 11, 1, 1, 21, 1, 2, 5, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3] Consider the convergents Cn which are obtained by truncating after n steps: n 1 2 3 4 5 6 7 8 9 10 Cn n Cn 1
1 2 3 5 7 12 38 65 121 207 159 272 280 479 999 1709 1279 2188
11
15608 25777
12
16347 27965
13
31415 53742
14
676062 1156547
... ...
27
5021264471 8589934592
Diophantine Approximation
Lagranges Theorem
p Let x Q and assume that we are given q Q such that x p 1 q 2q 2 p p , namely that for which |Cn q |< Then x is a convergent Cn of q 1 . 2q 2
Example (contd) Let y = 31415 be the inverse period. Since denominator of y is 216 we can 53742 p work with precision 233 . Suppose we measure q = 5021264471 : 8589934592 n Cn n Cn 1 1 2
1 2
3
3 5
4
7 12
5
38 65
6
121 207
7
159 272
8
280 479
9
999 1709
10
1279 2188
11
15608 25777
12
16347 27965
13
31415 53742
14
676062 1156547
... ...
27
5021264471 8589934592
Diophantine Approximation
Lagranges Theorem
p Let x Q and assume that we are given q Q such that x p 1 q 2q 2 p p , namely that for which |Cn q |< Then x is a convergent Cn of q 1 . 2q 2
Example (contd) Let y = 31415 be the inverse period. Since denominator of y is 216 we can 53742 p work with precision 233 . Suppose we measure q = 5021264471 : 8589934592 n Cn n Cn 1 1 2
1 2
3
3 5
4
7 12
5
38 65
6
121 207
7
159 272
8
280 479
9
999 1709
10
1279 2188
11
15608 25777
12
16347 27965
13
31415 53742
14
676062 1156547
... ...
27
5021264471 8589934592
signal f (x )
quantum information
sampling
f =
X
x
modelling
f (x ) x
X
x
x |x |f (x )
transform
result
unitary
w1
w2
w1
w2
DFT4
1 1 1 1 1 i 1 i 1 1 1 1 1 i 1 i
=
1
rev
1 1 1
(12 DFT2 )
1 1 1 1 1 1 1 1
diag
1 1 1 i
(DFT2 12 )
1 1 1 1 1 1 1
FFT Theorem Multiplication with DFTN can be performed classically in O (N log N ) elementary operations. We can do much better on a quantum computer!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
DFT4
1 1 1 1 1 i 1 i 1 1 1 1 1 i 1 i
=
1
rev
1 1 1
(12 DFT2 )
1 1 1 1 1 1 1 1
diag
1 1 1 i
(DFT2 12 )
1 1 1 1 1 1 1
FFT Theorem Multiplication with DFTN can be performed classically in O (N log N ) elementary operations. We can do much better on a quantum computer!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
DFT4
1 1 1 1 1 i 1 i 1 1 1 1 1 i 1 i
=
1
rev
1 1 1
(12 DFT2 )
1 1 1 1 1 1 1 1
diag
1 1 1 i
(DFT2 12 )
1 1 1 1 1 1 1
FFT Theorem Multiplication with DFTN can be performed classically in O (N log N ) elementary operations. We can do much better on a quantum computer!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
DFT4
1 1 1 1 1 i 1 i 1 1 1 1 1 i 1 i
=
1
rev
1 1 1
(12 DFT2 )
1 1 1 1 1 1 1 1
diag
1 1 1 i
(DFT2 12 )
1 1 1 1 1 1 1
FFT Theorem Multiplication with DFTN can be performed classically in O (N log N ) elementary operations. We can do much better on a quantum computer!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
..
.
2 2 n
n 1 1
2 2 n
n2
. . . 1 2n
..
.
2 2 n
n 1 1
2 2 n
n2
. . . 1 2n
D4
H2 . . .
Cost Classical Computer T (N ) = 2 T (N /2) + O (N ) T (N ) = O (N logN ) Quantum Computer T (N ) = T (N /2) + O (logN )) T (N ) = O (log2 N )
D4
H2 . . .
Cost Classical Computer T (N ) = 2 T (N /2) + O (N ) T (N ) = O (N logN ) Quantum Computer T (N ) = T (N /2) + O (logN )) T (N ) = O (log2 N )
Kitaev 95, Brassard & Hyer 97, Mosca & Ekert 98 Generalization to arbitrary abelian groups. Open Problems Can the Hidden Subgroups Problem be solved for Any non-abelian group? (yes!) All non-abelian groups? (dont know) Interesting non-abelian groups? (progress, but still open)
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Kitaev 95, Brassard & Hyer 97, Mosca & Ekert 98 Generalization to arbitrary abelian groups. Open Problems Can the Hidden Subgroups Problem be solved for Any non-abelian group? (yes!) All non-abelian groups? (dont know) Interesting non-abelian groups? (progress, but still open)
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Kitaev 95, Brassard & Hyer 97, Mosca & Ekert 98 Generalization to arbitrary abelian groups. Open Problems Can the Hidden Subgroups Problem be solved for Any non-abelian group? (yes!) All non-abelian groups? (dont know) Interesting non-abelian groups? (progress, but still open)
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Kitaev 95, Brassard & Hyer 97, Mosca & Ekert 98 Generalization to arbitrary abelian groups. Open Problems Can the Hidden Subgroups Problem be solved for Any non-abelian group? (yes!) All non-abelian groups? (dont know) Interesting non-abelian groups? (progress, but still open)
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Kitaev 95, Brassard & Hyer 97, Mosca & Ekert 98 Generalization to arbitrary abelian groups. Open Problems Can the Hidden Subgroups Problem be solved for Any non-abelian group? (yes!) All non-abelian groups? (dont know) Interesting non-abelian groups? (progress, but still open)
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Kitaev 95, Brassard & Hyer 97, Mosca & Ekert 98 Generalization to arbitrary abelian groups. Open Problems Can the Hidden Subgroups Problem be solved for Any non-abelian group? (yes!) All non-abelian groups? (dont know) Interesting non-abelian groups? (progress, but still open)
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Kitaev 95, Brassard & Hyer 97, Mosca & Ekert 98 Generalization to arbitrary abelian groups. Open Problems Can the Hidden Subgroups Problem be solved for Any non-abelian group? (yes!) All non-abelian groups? (dont know) Interesting non-abelian groups? (progress, but still open)
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Mathematically G
n F2
G/H
/ =S { { {{ {{i { {
f
Mathematically G
n F2
G/H
/ =S { { {{ {{i { {
f
H g1 H
g H
n
G
Martin Rotteler, NEC Laboratories America
R
Introduction to Quantum Algorithms
Phase
Phase
Some properties of DFTG Dened for arbitrary nite groups. The isomorphism is realized by a unitary matrix DFTG = 1 |G||H |
,i ,j
d
h H
ij (gh) |, i , j
g| .
1dk k .
Some properties of DFTG Dened for arbitrary nite groups. The isomorphism is realized by a unitary matrix DFTG = 1 |G||H |
,i ,j
d
h H
ij (gh) |, i , j
g| .
1dk k .
|0 |0
P
x G
|x |0
P
x G
|G|
|x |f (x )
x cH |x |f (c ) |H | Xp X d ij (ch) |, i , j ,i ,j h H
6.
Grovers Algorithm
The diffusion operator 1 + 2 2n Dn := . . .
2 2n
2 2n
2 2n
...
2 2n
2 2n 2 2n
1 + . . .
2 2n
... .. .
. . .
. . . 1 +
2 2n
Inversion about the average One application of the operator Dn Vf when applied to the equal superposition of basis states does the following:
6 6 6 -
Grovers Algorithm
The diffusion operator 1 + 2 2n Dn := . . .
2 2n
2 2n
2 2n
...
2 2n
2 2n 2 2n
1 + . . .
2 2n
... .. .
. . .
. . . 1 +
2 2n
Inversion about the average One application of the operator Dn Vf when applied to the equal superposition of basis states does the following:
6 6 6 -
Grovers Algorithm
Grovers algorithm First prepare the equal superposition. Then iterate the operator Dn Sf a number of O ( 2n ) times. Afterwards measure the system in the computational basis. With high probability the result will be the solution x for which f (x ) = 1. Success probability after several iterations
Grovers Algorithm
Grovers algorithm First prepare the equal superposition. Then iterate the operator Dn Sf a number of O ( 2n ) times. Afterwards measure the system in the computational basis. With high probability the result will be the solution x for which f (x ) = 1. Success probability after several iterations
Searching
) classical: O (N ) quantum: O ( N ) (and this is optimal)
6 -
6 6 -
discrete FFT
6 feature extraction using signal transforms leads to the idea of hidden subgroup problems highly regular, in general huge speed-ups can be expected
Martin Rotteler, NEC Laboratories America
correlation with 6
6 -
increase the amplitude of target states via correlations in general a square-root speed-up can be expected
Introduction to Quantum Algorithms
Searching
) classical: O (N ) quantum: O ( N ) (and this is optimal)
6 -
6 6 -
discrete FFT
6 feature extraction using signal transforms leads to the idea of hidden subgroup problems highly regular, in general huge speed-ups can be expected
Martin Rotteler, NEC Laboratories America
correlation with 6
6 -
increase the amplitude of target states via correlations in general a square-root speed-up can be expected
Introduction to Quantum Algorithms
U (i )
. . . . . .
. . . . . . . . . i j
Universal set of gates Theorem (Barenco et al., 1995): U (2n ) = U (i ) , CNOT(i ,j ) How to prove this result? Next: breaking down the proof into several small steps
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
i , j = 1, . . . , n ,
i =j
Solution 2
f r r r
f r r
.. .
. . .
f r
1 DFT 2n
. . .
DFT2n
. . .
2 1
Solution 2
f r r r
f r r
.. .
. . .
f r
1 DFT 2n
. . .
DFT2n
. . .
2 1
Solution 2
f r r r
f r r
.. .
. . .
f r
1 DFT 2n
. . .
DFT2n
. . .
2 1
Operations on Subspaces
Rotation on a subspace spanned by the states s1 and s2
T (s1 ,s2 )
01 B B B B B B B B B B B B B B @
s1
s2
..
?
1
.. .
1
1 ..
1 C C C C C C C C C C C C C C A
1
s1
s2
T (s1 , s2 ).
Operations on Subspaces
Rotation on a subspace spanned by the states s1 and s2
T (s1 ,s2 )
01 B B B B B B B B B B B B B B @
s1
s2
..
?
1
.. .
1
1 ..
1 C C C C C C C C C C C C C C A
1
s1
s2
T (s1 , s2 ).
Conditional gates with multiple controls Let U U (2). Then k (U ) U (2k +1 ) is dened by 1 ... = 1 k +1 U . k := 2 2 1 U Alternative description of k (U ) k (U ) |x1 , . . . , xn |y = |x1 , . . . , xn |y |x1 , . . . , xn U |y if i : xi = 1 if i : xi = 1
Conditional gates with multiple controls Let U U (2). Then k (U ) U (2k +1 ) is dened by 1 ... = 1 k +1 U . k := 2 2 1 U Alternative description of k (U ) k (U ) |x1 , . . . , xn |y = |x1 , . . . , xn |y |x1 , . . . , xn U |y if i : xi = 1 if i : xi = 1
B
m
E C
ABC = I , Ax B x C = W . The matrices A,B , and C are obtained from the decomposition U = (A x A)(B x B ).
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
B
m
E C
ABC = I , Ax B x C = W . The matrices A,B , and C are obtained from the decomposition U = (A x A)(B x B ).
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
V
i
Comments Here we have to nd a unitary V with V 2 = U . This idea can be generalized to arbitrary k (U ), however, the complexity obtained from this factorization scales exponentially with k . Need better break-down strategy.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
V
i
Comments Here we have to nd a unitary V with V 2 = U . This idea can be generalized to arbitrary k (U ), however, the complexity obtained from this factorization scales exponentially with k . Need better break-down strategy.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
= linear in n
Important result about multiply-controlled gates Let U U (2). Then any n1 (U ) gate operating on n qubits can be implemented using at most O (n) elementary gates.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
= linear in n
Important result about multiply-controlled gates Let U U (2). Then any n1 (U ) gate operating on n qubits can be implemented using at most O (n) elementary gates.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
= linear in n
Important result about multiply-controlled gates Let U U (2). Then any n1 (U ) gate operating on n qubits can be implemented using at most O (n) elementary gates.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Conclusions
Shors algorithm for factoring integers
Reducing factoring to order nding Setting up a periodic state Efcient extraction of the period by computing a QFT