roetteler all
TRANSCRIPT
-
7/29/2019 Roetteler All
1/247
Introduction to Quantum Algorithms
Part I: Quantum Gates and Simons Algorithm
Martin Rotteler
NEC Laboratories America, Inc.4 Independence Way, Suite 200Princeton, NJ 08540, U.S.A.
International Summer School on Quantum Information,
Max-Planck-Institut fur Physik komplexer Systeme
Dresden, August 31, 2005
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
http://find/http://goback/ -
7/29/2019 Roetteler All
2/247
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
Tomorrow: Shors algorithm and Grovers algorithm
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
http://find/ -
7/29/2019 Roetteler All
3/247
Basics: Quantum Information
Quantumbit (qubit)
A qubit is a normalized state in C2
:
|0 + |1 , , C, where ||2 + ||2 = 1.
Quantum registerA quantum register of length n is a collection of qubits
q1, . . . , qn.
Possible operations / dynamicsA quantum computer can
perform unitary operations on quantum registers
measure single qubits
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
http://find/ -
7/29/2019 Roetteler All
4/247
Basics: Quantum Information
Quantumbit (qubit)
A qubit is a normalized state in C2
:
|0 + |1 , , C, where ||2 + ||2 = 1.
Quantum registerA quantum register of length n is a collection of qubits
q1, . . . , qn.
Possible operations / dynamicsA quantum computer can
perform unitary operations on quantum registers
measure single qubits
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
http://find/ -
7/29/2019 Roetteler All
5/247
Basics: Quantum Information
Quantumbit (qubit)
A qubit is a normalized state in C2
:
|0 + |1 , , C, where ||2 + ||2 = 1.
Quantum registerA quantum register of length n is a collection of qubits
q1, . . . , qn.
Possible operations / dynamicsA quantum computer can
perform unitary operations on quantum registers
measure single qubits
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
http://find/http://goback/ -
7/29/2019 Roetteler All
6/247
Bits vs Qubits
One classical bit
is in one of the basis states
= High = 1 = Low = 0
Boolean state space:
IF2 = {, } = {0, 1}consisting of 2 elements
One quantum bit (qubit)
is in a coherent superposition
| = | + |of the basis states |, |
Quantum state space H2 = C2: | + | : ||2 + ||2 = 1
of 2 dimensions
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Q
http://find/ -
7/29/2019 Roetteler All
7/247
Bits vs Qubits
One classical bit
is in one of the basis states
= High = 1 = Low = 0
Boolean state space:
IF2 = {, } = {0, 1}consisting of 2 elements
One quantum bit (qubit)
is in a coherent superposition
| = | + |of the basis states |, |
Quantum state space H2 = C2: | + | : ||2 + ||2 = 1
of 2 dimensions
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
T Bi T Q bi
http://find/ -
7/29/2019 Roetteler All
8/247
Two Bits vs Two Qubits
Two classical bits
Two bits can hold either of the 4 states in the state space
{0, 1} {0, 1} = {0, 1}2 = {, , , }.
Two coupled qubits
A register of two coupled qubits can hold any of the states
| = | + | + | + |in the state space H2 H2 = C2 C2.
Two separate qubits
Two separate qubits can hold any of the product states
|1 |2 = (1 | + 1 |)(2 | + 2 |)
in the state space
H2
H2
C2
C2.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
T Bit T Q bit
http://find/ -
7/29/2019 Roetteler All
9/247
Two Bits vs Two Qubits
Two classical bits
Two bits can hold either of the 4 states in the state space
{0, 1} {0, 1} = {0, 1}2 = {, , , }.
Two coupled qubits
A register of two coupled qubits can hold any of the states
| = | + | + | + |in the state space H2 H2 = C2 C2.
Two separate qubits
Two separate qubits can hold any of the product states
|1 |2 = (1 | + 1 |)(2 | + 2 |)
in the state space
H2
H2
C2
C2.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
T Bit T Q bit
http://find/ -
7/29/2019 Roetteler All
10/247
Two Bits vs Two Qubits
Two classical bits
Two bits can hold either of the 4 states in the state space
{0, 1} {0, 1} = {0, 1}2 = {, , , }.
Two coupled qubits
A register of two coupled qubits can hold any of the states
| = | + | + | + |in the state space H2 H2 = C2 C2.
Two separate qubits
Two separate qubits can hold any of the product states
|1 |2 = (1 | + 1 |)(2 | + 2 |)
in the state space
H2
H2
C2
C2.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
M Bit M Q bit
http://find/http://goback/ -
7/29/2019 Roetteler All
11/247
Many Bits vs Many Qubits
Classical register of n bits
holds one of the 2n states = 1
n of the state
space {0, 1}n = {0, 1} {0, 1}.
Quantum register of nqubits
can hold any coherent superposition
| = {0,1}n
1n |1 |2 |n
in the 2n dimensional space H2n = C2C2 C2 = C2n.
Product states of nqubitscan 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
Many Bits vs Many Qubits
http://find/ -
7/29/2019 Roetteler All
12/247
Many Bits vs Many Qubits
Classical register of n bits
holds one of the 2n states = 1
n of the state
space {0, 1}n = {0, 1} {0, 1}.
Quantum register of nqubits
can hold any coherent superposition
| = {0,1}n
1n |1 |2 |n
in the 2n dimensional space H2n = C2C2 C2 = C2n.
Product states of nqubitscan 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
Many Bits vs Many Qubits
http://find/ -
7/29/2019 Roetteler All
13/247
Many Bits vs Many Qubits
Classical register of n bits
holds one of the 2n states = 1
n of the state
space {0, 1}n = {0, 1} {0, 1}.
Quantum register of nqubits
can hold any coherent superposition
| = {0,1}n
1n |1 |2 |n
in the 2n dimensional space H2n = C2C2 C2 = C2n.
Product states of nqubitscan 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
Our Model of Measurements
http://find/ -
7/29/2019 Roetteler All
14/247
Our Model of Measurements
von Neumann measurements of one qubit
First, specify a basis B for C2, e. g.{|
0
,|1}
. The outcome of
measuring the state |0 + |1 is described by a randomvariable X. The probabilities to observe 0 or 1 are given by
Pr(X = 0) = ||2, Pr(X = 1) = ||2.
Measuring a state in Cn in an orthonormal basis B
Recall: Orthonormal Basis of CN
B = {|i : i = 1, . . . , N}, where i|j = i,j
Let | = Ni=1 i |i, where Ni=1 |i|2 = 1. Thenmeasuring | in the basis B gives random variable XBtaking values 1, . . . , N:
Pr(XB = 1) = |1||2, . . . , Pr(XB = N) = |N||2.Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Our Model of Measurements
http://find/ -
7/29/2019 Roetteler All
15/247
Our Model of Measurements
von Neumann measurements of one qubit
First, specify a basis B for C2, e. g.{|
0
,|1}
. The outcome of
measuring the state |0 + |1 is described by a randomvariable X. The probabilities to observe 0 or 1 are given by
Pr(X = 0) = ||2, Pr(X = 1) = ||2.
Measuring a state in Cn in an orthonormal basis B
Recall: Orthonormal Basis of CN
B = {|i : i = 1, . . . , N}, where i|j = i,j
Let | = Ni=1 i |i, where Ni=1 |i|2 = 1. Thenmeasuring | in the basis B gives random variable XBtaking values 1, . . . , N:
Pr(XB = 1) = |1||2, . . . , Pr(XB = N) = |N||2.Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Two Important Types of Operations
http://find/ -
7/29/2019 Roetteler All
16/247
Two Important Types of Operations
Local operations
1N U =
U
U
. . .
U
, where U U(2).
Conditioned operation: the controlled NOT (CNOT)
|00 |00|01 |01|10 |11|11 |10
= 1 1 1 1
= i
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Two Important Types of Operations
http://find/http://goback/ -
7/29/2019 Roetteler All
17/247
Two Important Types of Operations
Local operations
1N U =
U
U
. . .
U
, where U U(2).
Conditioned operation: the controlled NOT (CNOT)
|00 |00|01 |01|10 |11|11 |10
= 1 1 1 1
= i
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Notation for Quantum Gates
http://find/ -
7/29/2019 Roetteler All
18/247
Notation for Quantum Gates
Gate in Feynman notation
H2
dd
U
s
Corresponding transformation
12
2
6
6
4
1 1 1 1
1 1 1 1
3
7
7
5
2
6
6
4
1 1 1 1
3
7
7
5
2
6
6
4
1 1
u11 u12 u21 u22
3
7
7
5
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Notation for Quantum Gates
http://find/ -
7/29/2019 Roetteler All
19/247
Notation for Quantum Gates
Gate in Feynman notation
H2
dd
U
s
Corresponding transformation
12
2
6
6
4
1 1 1 1
1 1 1 1
3
7
7
5
2
6
6
4
1 1 1 1
3
7
7
5
2
6
6
4
1
1 u11 u12 u21 u22
3
7
7
5
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Two Constructions for Matrices
http://find/http://goback/ -
7/29/2019 Roetteler All
20/247
Two Constructions for Matrices
Tensor product
T1 T2 = (T1 I)(I T2) = I T2 classically parallel
T1 T2 quantum parallel = independent dynamicsclassical: expensive, quantum: easy, since local operations
Direct sum
T1
T2 = (T1
I)(I
T2) =
I T2 conditional operationT1 T2 CASE operator = coupled dynamics
classical: easy, quantum: difficult, since entangled
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Two Constructions for Matrices
http://find/ -
7/29/2019 Roetteler All
21/247
Two Constructions for Matrices
Tensor product
T1 T2 = (T1 I)(I T2) = I T2 classically parallel
T1 T2 quantum parallel = independent dynamicsclassical: expensive, quantum: easy, since local operations
Direct sum
T1
T2 = (T1
I)(I
T2) =
I T2 conditional operationT1 T2 CASE operator = coupled dynamics
classical: easy, quantum: difficult, since entangled
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Hadamard Transform
http://find/ -
7/29/2019 Roetteler All
22/247
The Hadamard Transform
The Hadamard transform on one qubit
H2 =1
2
1 11 1
=
12 x,yIF2
(1)xy |x y| .
The Hadamard transform on nqubits
The n-fold tensor product of H2 is given by
Hn2 = 12n/2
x,yIFn2(1)xy |x y| ,
where x y :=
ni=1 xiyi IF2.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Hadamard Transform
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
23/247
The Hadamard transform on one qubit
H2 =1
2
1 11 1
=
12 x,yIF2
(1)xy |x y| .
The Hadamard transform on nqubits
The n-fold tensor product of H2 is given by
Hn2 = 12n/2
x,yIFn2(1)xy |x y| ,
where x y :=
ni=1 xiyi IF2.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Hadamard Transform
http://find/ -
7/29/2019 Roetteler All
24/247
Properties of the Hadamard transform
By definition H2 is the following map:
|0 12
(|0 + |1)
|1 1
2 (|0 |1)
Identity involving the Pauli matrices: H2xH2 = z
Identity involving the CNOT gate:
H2
H2
m
H2
H2
=m
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Hadamard Transform
http://find/ -
7/29/2019 Roetteler All
25/247
Properties of the Hadamard transform
By definition H2 is the following map:
|0 12
(|0 + |1)
|1 1
2 (|0 |1)
Identity involving the Pauli matrices: H2xH2 = z
Identity involving the CNOT gate:
H2
H2
m
H2
H2
=m
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Hadamard Transform
http://find/ -
7/29/2019 Roetteler All
26/247
Properties of the Hadamard transform
By definition H2 is the following map:
|0 12
(|0 + |1)
|1 1
2 (|0 |1)
Identity involving the Pauli matrices: H2xH2 = z
Identity involving the CNOT gate:
H2
H2
m
H2
H2
=m
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Quantum Gates and Circuits
http://find/ -
7/29/2019 Roetteler All
27/247
Elementary quantum gates
U(i) =...
..
.
U i...
..
.
CNOT(i,j) =
..
.
..
.
... g j
i
..
.
..
.
...
Universal set of gates
Theorem (Barenco et al., 1995):
U(2n
) = U(i)
, CNOT(i,j)
: i,j = 1, . . . , n, i = jQuantum gates: main problem
Find efficient factorizations for given U U(2n)!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Quantum Gates and Circuits
http://find/ -
7/29/2019 Roetteler All
28/247
Elementary quantum gates
U(i) =...
..
.
U i...
..
.
CNOT(i,j) =
..
.
..
.
... g j
i
..
.
..
.
...
Universal set of gates
Theorem (Barenco et al., 1995):
U(2n
) = U(i)
, CNOT
(i,j)
: i,j = 1, . . . , n, i = jQuantum gates: main problem
Find efficient factorizations for given U U(2n)!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Quantum Gates and Circuits
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
29/247
Elementary quantum gates
U(i) =...
..
.
U i...
..
.
CNOT(i,j) =
..
.
..
.
..
.
g j
i
..
.
..
.
..
.
Universal set of gates
Theorem (Barenco et al., 1995):
U(2n
) = U(i)
, CNOT
(i,j)
: i,j = 1, . . . , n, i = jQuantum gates: main problem
Find efficient factorizations for given U U(2n)!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Different Levels of Abstraction
http://find/ -
7/29/2019 Roetteler All
30/247
Unitary matrix
U = 12
0
B
B
@
1 1 1 1
1 1 1 11 1 1 1
1 1 1 1
1
C
C
A
Factorized unitary matrix
U= (I H2) (I x) (H2 I)
= 12
0
B
B
@
1 11 1
1 11 1
1
C
C
A
I
x
0B
B
@
1 11 1
1 11 1
1
C
C
A
Quantum circuit
H2g
H2
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Different Levels of Abstraction
http://find/ -
7/29/2019 Roetteler All
31/247
Unitary matrix
U = 12
0
B
B
@
1 1 1 1
1 1 1 11 1 1 1
1 1 1 1
1
C
C
A
Factorized unitary matrix
U= (I H2) (I x) (H2 I)
= 12
0
B
B
@
1 11 1
1 11 1
1
C
C
A
I
x
0B
B
@
1 11 1
1 11 1
1
C
C
A
Quantum circuit
H2g
H2
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Different Levels of Abstraction
http://find/ -
7/29/2019 Roetteler All
32/247
Unitary matrix
U = 12
0
B
B
@
1 1 1 1
1 1 1 11 1 1 1
1 1 1 1
1
C
C
A
Factorized unitary matrix
U= (I H2) (I x) (H2 I)
= 12
0
B
B
@
1 11 1
1 11 1
1
C
C
A
I
x
0B
B
@
1 11 1
1 11 1
1
C
C
A
Quantum circuit
H2g
H2
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Basic Facts About Boolean Functions
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
33/247
Boolean functions
Any function f :
{0, 1
}n
{0, 1
}m, where n is the number
of input bits and m the number of output bits is said to be aBoolean function.
Any Boolean function can be represented by a truth table.
If f = (f1, . . . , fm), this is a matrix of size 2n m where in
column i we have the list of values fi(x
1, . . . , x
n), where
xj {0, 1} for j = 1, . . . , n.
The number of Boolean functions
There are 22n
Boolean functions f :
{0, 1
}n
{0, 1
}, i. e.,
functions with n inputs and one output (since we canassign an arbitrary value for each of the 2n inputs).
There are 2m2n
Boolean functions f : {0, 1}n {0, 1}mwithn inputs and m outputs.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Basic Facts About Boolean Functions
http://find/ -
7/29/2019 Roetteler All
34/247
Boolean functions
Any function f :
{0, 1
}n
{0, 1
}m, where n is the number
of input bits and m the number of output bits is said to be aBoolean function.
Any Boolean function can be represented by a truth table.
If f = (f1, . . . , fm), this is a matrix of size 2n m where in
column i we have the list of values fi(x
1, . . . , x
n), where
xj {0, 1} for j = 1, . . . , n.
The number of Boolean functions
There are 22n
Boolean functions f :
{0, 1
}n
{0, 1
}, i. e.,
functions with n inputs and one output (since we canassign an arbitrary value for each of the 2n inputs).
There are 2m2n
Boolean functions f : {0, 1}n {0, 1}mwithn inputs and m outputs.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Universal Gates: Classical Computing
http://find/ -
7/29/2019 Roetteler All
35/247
Connectives
NOT gate:x1 x10 1
1 0
AND gate:
x1 x2 x1 x20 0 00 1 0
1 0 0
1 1 1
OR gate:
x1 x2 x1 x20 0 00 1 1
1 0 1
1 1 1
NAND gate:
x1 x2 x1 x20 0 10 1 1
1 0 1
1 1 0
TheoremAny 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 flip.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Universal Gates: Classical Computing
http://find/ -
7/29/2019 Roetteler All
36/247
Connectives
NOT gate:x1 x10 1
1 0
AND gate:
x1 x2 x1 x20 0 00 1 0
1 0 0
1 1 1
OR gate:
x1 x2 x1 x20 0 00 1 1
1 0 1
1 1 1
NAND gate:
x1 x2 x1 x20 0 10 1 1
1 0 1
1 1 0
TheoremAny 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 flip.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Loading More Structure Onto Bits
http://find/ -
7/29/2019 Roetteler All
37/247
Finite field of two elements
The set {0, 1} can be equipped with a multiplication andan addition such that the field axioms hold.Truth tables for these operations:
x y x y0 0 0
0 1 01 0 0
1 1 1
x y x y0 0 0
0 1 11 0 1
1 1 0
Then (
{0, 1
},
,
) becomes a field consisting of two
elements only, also denoted by IF2. A finite field with nelements exists if and only if n is a prime power.
Important identity: (1)xy = (1)x (1)yWe can also rewrite CNOT: |x |y |x |x yMartin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Loading More Structure Onto Bits
http://find/ -
7/29/2019 Roetteler All
38/247
Finite field of two elements
The set {0, 1} can be equipped with a multiplication andan addition such that the field axioms hold.Truth tables for these operations:
x y x y0 0 0
0 1 01 0 0
1 1 1
x y x y0 0 0
0 1 11 0 1
1 1 0
Then (
{0, 1
},
,
) becomes a field consisting of two
elements only, also denoted by IF2. A finite field with nelements exists if and only if n is a prime power.
Important identity: (1)xy = (1)x (1)yWe can also rewrite CNOT: |x |y |x |x yMartin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Loading More Structure Onto Bits
http://find/ -
7/29/2019 Roetteler All
39/247
Finite field of two elements
The set {0, 1} can be equipped with a multiplication andan addition such that the field axioms hold.Truth tables for these operations:
x y x y0 0 0
0 1 01 0 0
1 1 1
x y x y0 0 0
0 1 11 0 1
1 1 0
Then (
{0, 1
},
,
) becomes a field consisting of two
elements only, also denoted by IF2. A finite field with nelements exists if and only if n is a prime power.
Important identity: (1)xy = (1)x (1)yWe can also rewrite CNOT: |x |y |x |x yMartin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Loading More Structure Onto Bits
http://find/ -
7/29/2019 Roetteler All
40/247
Finite field of two elements
The set {0, 1} can be equipped with a multiplication andan addition such that the field axioms hold.Truth tables for these operations:
x y x y0 0 0
0 1 01 0 0
1 1 1
x y x y0 0 0
0 1 11 0 1
1 1 0
Then (
{0, 1
},
,
) becomes a field consisting of two
elements only, also denoted by IF2. A finite field with nelements exists if and only if n is a prime power.
Important identity: (1)xy = (1)x (1)yWe can also rewrite CNOT: |x |y |x |x yMartin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Loading More Structure Onto Bits
http://find/ -
7/29/2019 Roetteler All
41/247
Finite field of two elements
The set {0, 1} can be equipped with a multiplication andan addition such that the field axioms hold.Truth tables for these operations:
x y x y0 0 0
0 1 01 0 0
1 1 1
x y x y0 0 0
0 1 11 0 1
1 1 0
Then (
{0, 1
},
,
) becomes a field consisting of two
elements only, also denoted by IF2. A finite field with nelements exists if and only if n is a prime power.
Important identity: (1)xy = (1)x (1)yWe can also rewrite CNOT: |x |y |x |x yMartin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Reversible Computation of Boolean Functions
http://find/ -
7/29/2019 Roetteler All
42/247
Basic issue of reversible computing
Suppose, we want to compute a function f :
{0, 1
}n
{0, 1
}m
that is not reversible. How can we do this?
One possible solution
Define a new Boolean function which takes n+ m inputs andn+ m outputs as follows:
F(x, y) := (x, y f(x))
Properties of F(x, y)
On the special inputs (x, 0), where x {0, 1}n we obtainthat F(x, 0) = (x, f(x)). Furthermore, F is reversible.
Theorem (Bennett): If f can be computed using K gates,
then F can be computed using 2K + m gates.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Reversible Computation of Boolean Functions
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
43/247
Basic issue of reversible computing
Suppose, we want to compute a function f :
{0, 1
}n
{0, 1
}m
that is not reversible. How can we do this?
One possible solution
Define a new Boolean function which takes n+ m inputs andn+ m outputs as follows:
F(x, y) := (x, y f(x))
Properties of F(x, y)
On the special inputs (x, 0), where x {0, 1}n we obtainthat F(x, 0) = (x, f(x)). Furthermore, F is reversible.
Theorem (Bennett): If f can be computed using K gates,
then F can be computed using 2K + m gates.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Reversible Computation of Boolean Functions
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
44/247
Basic issue of reversible computing
Suppose, we want to compute a function f :
{0, 1
}n
{0, 1
}m
that is not reversible. How can we do this?
One possible solution
Define a new Boolean function which takes n+ m inputs andn+ m outputs as follows:
F(x, y) := (x, y f(x))
Properties of F(x, y)
On the special inputs (x, 0), where x {0, 1}n we obtainthat F(x, 0) = (x, f(x)). Furthermore, F is reversible.
Theorem (Bennett): If f can be computed using K gates,
then F can be computed using 2K + m gates.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Universal Gates: Reversible Computing
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
45/247
The Toffoli gate TOF
x y z x y z
0 0 0 0 0 0
0 0 1 0 0 1
0 1 0 0 1 0
0 1 1 0 1 1
1 0 0 1 0 01 0 1 1 0 1
1 1 0 1 1 1
1 1 1 1 1 0
|z|y|x
f |z x y|y|x
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
Universal Gates: Reversible Computing
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
46/247
The Toffoli gate TOF
x y z x y z
0 0 0 0 0 0
0 0 1 0 0 1
0 1 0 0 1 0
0 1 1 0 1 1
1 0 0 1 0 01 0 1 1 0 1
1 1 0 1 1 1
1 1 1 1 1 0
|z|y|x
f |z x y|y|x
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
Reversible Computation of Boolean Functions
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
47/247
More features of the reversible embedding F(x, y)
Possibly, there are reversible functions that compute
G(x, 0) = (f(x),junk(x)) and use use fewer than n+ mbits.
Actually, only log2(max cy) many extra bits are needed tomake f reversible, where cy = |{x : f(x) = y}| are thesizes of the collisions of f.
The advantage of F is its uniform definition.
Computing a function by a quantum circuit
Any function f : {0, 1}n {0, 1}m can be computed by meansof the reversible function F : {0, 1}
n+m
{0, 1}n+m
. Hence wecan compute f also by a quantum circuit
Uf |x |y = |x |y f(x).
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Reversible Computation of Boolean Functions
http://find/ -
7/29/2019 Roetteler All
48/247
More features of the reversible embedding F(x, y)
Possibly, there are reversible functions that compute
G(x, 0) = (f(x),junk(x)) and use use fewer than n+ mbits.
Actually, only log2(max cy) many extra bits are needed tomake f reversible, where cy = |{x : f(x) = y}| are thesizes of the collisions of f.
The advantage of F is its uniform definition.
Computing a function by a quantum circuit
Any function f : {0, 1}n {0, 1}m can be computed by meansof the reversible function F : {0, 1}
n+m
{0, 1}n+m
. Hence wecan compute f also by a quantum circuit
Uf |x |y = |x |y f(x).
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
A Two-Bit Problem
http://find/ -
7/29/2019 Roetteler All
49/247
The Deutsch Jozsa problem (most simple case)
Given a Boolean function f : {0, 1} {0, 1}. Decide whetherthe property f(0) = f(1) holds or not.
The four possible functions
x f(x)
0 01 0
x f(x)
0 11 1
x f(x)
0 01 1
x f(x)
0 11 0
Observation
From querying the function only on one input, we cannot
determine whether f(0) = f(1) with certainty. E. g., if theanswer is f(0) = 0, it could be the first 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
Th D h J bl ( i l )
http://find/ -
7/29/2019 Roetteler All
50/247
The Deutsch Jozsa problem (most simple case)
Given a Boolean function f : {0, 1} {0, 1}. Decide whetherthe property f(0) = f(1) holds or not.
The four possible functions
x f(x)
0 01 0
x f(x)
0 11 1
x f(x)
0 01 1
x f(x)
0 11 0
Observation
From querying the function only on one input, we cannot
determine whether f(0) = f(1) with certainty. E. g., if theanswer is f(0) = 0, it could be the first 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
Th D t h J bl ( t i l )
http://find/ -
7/29/2019 Roetteler All
51/247
The Deutsch Jozsa problem (most simple case)
Given a Boolean function f : {0, 1} {0, 1}. Decide whetherthe property f(0) = f(1) holds or not.
The four possible functions
x f(x)
0 0
1 0
x f(x)
0 1
1 1
x f(x)
0 0
1 1
x f(x)
0 1
1 0
Observation
From querying the function only on one input, we cannot
determine whether f(0) = f(1) with certainty. E. g., if theanswer is f(0) = 0, it could be the first 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
The Phase Kick-Back Trick
http://find/ -
7/29/2019 Roetteler All
52/247
Computing the function into the phase
|x
|0|1
2
Uf ??
Computing the effect for different inputs
|x |0 |12
|x |f(x) |1 f(x)
2
= |x (1)f(x) |0 |1
2
= (1)f(x) |x |0 |1
2
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Phase Kick-Back Trick
http://find/http://goback/ -
7/29/2019 Roetteler All
53/247
Computing the function into the phase
|x
|0|1
2
Uf ??
Computing the effect for different inputs
|x |0 |12
|x |f(x) |1 f(x)
2
= |x (1)f(x) |0 |1
2
= (1)f(x) |x |0 |1
2
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Phase Kick-Back Trick
http://find/http://goback/ -
7/29/2019 Roetteler All
54/247
Computing the function into the phase
|x
|0|1
2
Uf ??
Computing the effect for different inputs
|x |0 |12
|x |f(x) |1 f(x)
2
= |x (1)f(x) |0 |1
2
= (1)f(x) |x |0 |1
2
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Phase Kick-Back Trick
http://find/ -
7/29/2019 Roetteler All
55/247
Computing the function into the phase
|x
|0|1
2
Uf ??
Computing the effect for different inputs
|x |0 |12
|x |f(x) |1 f(x)
2
= |x (1)f(x) |0 |1
2
= (1)f(x) |x |0 |1
2
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Phase Kick-Back Trick
C i h f i i h h
http://find/http://goback/ -
7/29/2019 Roetteler All
56/247
Computing the function into the phase
|x
|0|1
2
Uf
(
1)f(x)
|x
|0|1
2
Computing the effect for different inputs
|x |0 |12
|x |f(x) |1 f(x)
2
= |x (1)f(x) |0 |1
2
= (1)f(x) |x |0 |1
2
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Phase Kick-Back Trick
The quantum algorithm
http://find/http://goback/ -
7/29/2019 Roetteler All
57/247
The quantum algorithm
|0
|1 H2
H2
UfH2
H2 ??
Phase kick-back in superposition
|0 |1H2
2
|0
+|12
|0 |
12
Uf 12
(1)f(0) |0 |0 |1
2
+1
2(1)f(1) |1
|0 |12
=(1)f(0)
2
|0
+ (
1)f(0)f(1)
|1
|0 |1
2
H22 (1)f(0) |f(0) f(1) |1
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Phase Kick-Back Trick
The quantum algorithm
http://find/ -
7/29/2019 Roetteler All
58/247
The quantum algorithm
|0
|1 H2
H2
UfH2
H2 ??
Phase kick-back in superposition
|0 |1H2
2
|0
+|12
|0 |
12
Uf 12
(1)f(0) |0 |0 |1
2
+1
2(1)f(1) |1
|0 |12
=(1)f(0)
2
|0
+ (
1)f(0)f(1)
|1
|0 |1
2
H22 (1)f(0) |f(0) f(1) |1
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Phase Kick-Back Trick
The quantum algorithm
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
59/247
The quantum algorithm
|0
|1 H2
H2
UfH2
H2 ??
Phase kick-back in superposition
|0 |1H22
|0
+|12
|0 |
12
Uf 12
(1)f(0) |0 |0 |1
2
+1
2(1)f(1) |1
|0 |12
=(1)f(0)
2
|0
+ (
1)f(0)f(1)
|1
|0 |1
2
H22 (1)f(0) |f(0) f(1) |1
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Phase Kick-Back Trick
The quantum algorithm
http://find/ -
7/29/2019 Roetteler All
60/247
The quantum algorithm
|0
|1 H2
H2
UfH2
H2 ??
Phase kick-back in superposition
|0 |1H22
|0
+|12
|0 |
12
Uf 12
(1)f(0) |0 |0 |1
2
+1
2(1)f(1) |1
|0 |12
=(1)f(0)
2
|0
+ (
1)f(0)f(1)
|1
|0 |12
H22 (1)f(0) |f(0) f(1) |1
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Phase Kick-Back Trick
The quantum algorithm
http://find/ -
7/29/2019 Roetteler All
61/247
The quantum algorithm
|0
|1 H2
H2
UfH2
H2 ??
Phase kick-back in superposition
|0 |1H22
|0
+|12
|0 |
12
Uf 12
(1)f(0) |0 |0 |1
2
+1
2(1)f(1) |1
|0 |12
=(1)f(0)
2
|0 + (1)f(0)f(1) |1
|0 |12
H22 (1)f(0) |f(0) f(1) |1
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
The Phase Kick-Back Trick
The quantum algorithm
http://find/ -
7/29/2019 Roetteler All
62/247
q g
|0
|1 H2
H2
UfH2
H2 |f(0) f(1)
|1
Phase kick-back in superposition
|0 |1H22
|0
+|12
|0 |
12
Uf 12
(1)f(0) |0 |0 |1
2
+1
2(1)f(1) |1
|0 |12
=(1)f(0)
2
|0 + (1)f(0)f(1) |1
|0 |12
H22 (1)f(0) |f(0) f(1) |1
Hence, we from measuring the first 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
The Phase Kick-Back Trick
The quantum algorithm
http://find/ -
7/29/2019 Roetteler All
63/247
q g
|0
|1 H2
H2
UfH2
H2 |f(0) f(1)
|1
Phase kick-back in superposition
|0 |1H22
|0
+|12
|0 |
12
Uf 12
(1)f(0) |0 |0 |1
2
+1
2(1)f(1) |1
|0 |12
=(1)f(0)
2
|0 + (1)f(0)f(1) |1
|0 |12
H22 (1)f(0) |f(0) f(1) |1
Hence, we from measuring the first 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
What can be computed?
The strong Church-Turing thesis
http://find/ -
7/29/2019 Roetteler All
64/247
The strong Church Turing thesis
Any reasonable algorithmic process carried out by a physical
machine can be efficiently simulated by a probabilistic Turingmachine. The slow-down for this is at most polynomial.
Efficient computations
Given a problem of size n, an algorithm is said to have a
polynomial running time if the number of steps it needs to find a
solution is bounded by p(n), where p is a polynomial.
How do quantum algorithms fit in?
They can solve problems which are believed to be intractablefor classical computers. There are physically reasonable
algorithmic processes carried which seem to be hard to
simulate for any classical probabilistic Turing machine.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
What can be computed?
The strong Church-Turing thesis
http://find/ -
7/29/2019 Roetteler All
65/247
e st o g C u c u g t es s
Any reasonable algorithmic process carried out by a physical
machine can be efficiently simulated by a probabilistic Turingmachine. The slow-down for this is at most polynomial.
Efficient computations
Given a problem of size n, an algorithm is said to have a
polynomial running time if the number of steps it needs to find a
solution is bounded by p(n), where p is a polynomial.
How do quantum algorithms fit in?
They can solve problems which are believed to be intractablefor classical computers. There are physically reasonable
algorithmic processes carried which seem to be hard to
simulate for any classical probabilistic Turing machine.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
What can be computed?
The strong Church-Turing thesis
http://find/ -
7/29/2019 Roetteler All
66/247
g g
Any reasonable algorithmic process carried out by a physical
machine can be efficiently simulated by a probabilistic Turingmachine. The slow-down for this is at most polynomial.
Efficient computations
Given a problem of size n, an algorithm is said to have a
polynomial running time if the number of steps it needs to find a
solution is bounded by p(n), where p is a polynomial.
How do quantum algorithms fit in?
They can solve problems which are believed to be intractablefor classical computers. There are physically reasonable
algorithmic processes carried which seem to be hard to
simulate for any classical probabilistic Turing machine.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Computational Model: Quantum CircuitsExample: quantum circuit
http://find/ -
7/29/2019 Roetteler All
67/247
Quantum circuit and corresponding directed acyclic graph.
U1
U2
U3
U4U5
U6
x1
x2
x3
x4
ssss
BE
rrrj
E
sG1rrrj
B
!sG2 E
dd
sG4
sG3ddsG5 Errrj
sG6 E
rrrj
ssss
y1
y2
y3
y4
Uniform families of quantum circuits
A family F:= {Cn U(2n) | n IN} of quantum circuits is calleduniform 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
Computational Model: Quantum CircuitsExample: quantum circuit
Q
http://find/ -
7/29/2019 Roetteler All
68/247
Quantum circuit and corresponding directed acyclic graph.
U1
U2
U3
U4U5
U6
x1
x2
x3
x4
ssss
BE
rrrj
E
sG1rrrj
B
!sG2 E
dd
sG4
sG3ddsG5 Errrj
sG6 E
rrrj
ssss
y1
y2
y3
y4
Uniform families of quantum circuits
A family F:= {Cn U(2n) | n IN} of quantum circuits is calleduniform 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
Computational Model: Quantum CircuitsExample: quantum circuit
Q i i d di di d li h
http://find/ -
7/29/2019 Roetteler All
69/247
Quantum circuit and corresponding directed acyclic graph.
U1
U2
U3
U4U5
U6
x1
x2
x3
x4
ssss
BE
rrrj
E
sG1rrrj
B
!sG2 E
dd
sG4
sG3ddsG5 Errrj
sG6 E
rrrj
ssss
y1
y2
y3
y4
Uniform families of quantum circuits
A family F:= {Cn U(2n) | n IN} of quantum circuits is calleduniform 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
http://find/ -
7/29/2019 Roetteler All
70/247
Landau notation
We use Landau notation to compare the asymptotics of two
functions f, g : IN C. Typically, f is the running time for analgorithm for input of size n and g is another function.
f(n) = O(g(n)) means that for some m there exists aconstant c > 0, such that |f(n)| cg(n) for all n m.
f(n) = (g(n)) means that for some m there exists aconstant c > 0, such that |f(n)| cg(n) for all n m.f(n) = (g(n)) means that both f(n) = O(g(n)) andf(n) = (g(n)) hold.
Example
Let f(n) be number of operations needed to compute aclassical FFT of a vector of length n. Then f(n) = O(nlog(n)).
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Asymptotics of Functions
Landau notation
http://find/ -
7/29/2019 Roetteler All
71/247
We use Landau notation to compare the asymptotics of two
functions f, g : IN C. Typically, f is the running time for analgorithm for input of size n and g is another function.
f(n) = O(g(n)) means that for some m there exists aconstant c > 0, such that |f(n)| cg(n) for all n m.
f(n) = (g(n)) means that for some m there exists aconstant c > 0, such that |f(n)| cg(n) for all n m.f(n) = (g(n)) means that both f(n) = O(g(n)) andf(n) = (g(n)) hold.
Example
Let f(n) be number of operations needed to compute aclassical FFT of a vector of length n. Then f(n) = O(nlog(n)).
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Computational Complexity
Measuring the problem size
http://find/ -
7/29/2019 Roetteler All
72/247
Usually algorithms can use different kinds of resources.
Typical examples for resources which can be measuredare 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 andmultiplications using the school method. The best known
method uses O(nlog nlog 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
http://find/ -
7/29/2019 Roetteler All
73/247
Usually algorithms can use different kinds of resources.
Typical examples for resources which can be measuredare 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 andmultiplications using the school method. The best known
method uses O(nlog nlog 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
http://find/ -
7/29/2019 Roetteler All
74/247
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
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
75/247
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
W id l f ti f {0 1}n {0 1}n f hi h th
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
76/247
We consider only functions f : {0, 1}n {0, 1}n for which thereexists 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 find the hidden string s.
Example where f : {0, 1}3 {0, 1}30 0 0 1 1 1
0 0 1 1 0 0
0 1 0 1 0 0
0 1 1 1 1 1
1 0 0 0 0 1
1 0 1 0 0 0
1 1 0 0 0 0
1 1 1 0 0 1
Here s = (0, 1, 1).
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem
The XOR bit mask problem
W id l f ti f {0 1}n {0 1}n f hi h th
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
77/247
We consider only functions f : {0, 1}n {0, 1}n for which thereexists 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 find the hidden string s.
Example where f : {0, 1}3 {0, 1}30 0 0 1 1 1
0 0 1 1 0 0
0 1 0 1 0 0
0 1 1 1 1 1
1 0 0 0 0 1
1 0 1 0 0 0
1 1 0 0 0 0
1 1 1 0 0 1
Here s = (0, 1, 1).
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
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
78/247
We consider only functions f : {0, 1}n {0, 1}n for which thereexists 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 find the hidden string s.
Example where f : {0, 1}3 {0, 1}30 0 0 1 1 1
0 0 1 1 0 0
0 1 0 1 0 0
0 1 1 1 1 1
1 0 0 0 0 1
1 0 1 0 0 0
1 1 0 0 0 0
1 1 1 0 0 1
Here s = (0, 1, 1).
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
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
79/247
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 artificial, but Shors algorithm has the
same underlying idea. Note: This is a promise problem!
Problem gave the first 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
http://find/ -
7/29/2019 Roetteler All
80/247
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 artificial, but Shors algorithm has the
same underlying idea. Note: This is a promise problem!
Problem gave the first 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
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
81/247
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 artificial, but Shors algorithm has the
same underlying idea. Note: This is a promise problem!
Problem gave the first 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
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
82/247
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 artificial, but Shors algorithm has the
same underlying idea. Note: This is a promise problem!
Problem gave the first 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: Specification
How the function f is given
W i f bl k
|x |x
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
83/247
We are given f as a black
box in form of a quantumcircuit computing Uf:|y
Uf
|y f(x)
How can we query f?
Classical algorithm: makes queries x1, . . . , xk resulting in
the answers f(x1), . . . , f(xk) (counts as k queries).Quantum algorithm: can query in superposition, i. e.,
starting with the state | = ki=1 |xi results inUf | |0 =
ki=1
Uf |xi |0 =k
i=1
|xi |f(xi) .
This counts as one query!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem: Specification
How the function f is given
We are given f as a black
|x |x
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
84/247
We are given f as a black
box in form of a quantumcircuit computing Uf:|y
Uf
|y f(x)
How can we query f?
Classical algorithm: makes queries x1, . . . , xk resulting in
the answers f(x1), . . . , f(xk) (counts as k queries).Quantum algorithm: can query in superposition, i. e.,
starting with the state | = ki=1 |xi results inUf | |0 =
ki=1
Uf |xi |0 =k
i=1
|xi |f(xi) .
This counts as one query!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem: Specification
How the function f is given
We are given f as a black
|x |x
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
85/247
We are given f as a black
box in form of a quantumcircuit computing Uf:|y
Uf
|y f(x)
How can we query f?
Classical algorithm: makes queries x1, . . . , xk resulting in
the answers f(x1), . . . , f(xk) (counts as k queries).Quantum algorithm: can query in superposition, i. e.,
starting with the state | = ki=1 |xi results inUf | |0 =
ki=1
Uf |xi |0 =k
i=1
|xi |f(xi) .
This counts as one query!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Measuring the State of the System
Partial measurements / non-demolition measurements
Suppose we are given a Boolean function
http://find/ -
7/29/2019 Roetteler All
86/247
Suppose we are given a Boolean function
f :{
0, 1}
n
{0, 1
}and have prepared the state
| = 12n/2
x{0,1}n
x |x |f(x)
=
1
2n/2 x:f(x)=0
x |x |0 + x:f(x)=1
x |x |1 .Measuring the last qubit gives a random variable X.
Pr(X = 0) = x:f(x)=0 |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
Measuring the State of the System
Partial measurements / non-demolition measurements
Suppose we are given a Boolean function
http://find/ -
7/29/2019 Roetteler All
87/247
Suppose we are given a Boolean function
f :{
0, 1}
n
{0, 1
}and have prepared the state
| = 12n/2
x{0,1}n
x |x |f(x)
=
1
2n/2 x:f(x)=0
x |x |0 + x:f(x)=1
x |x |1 .Measuring the last qubit gives a random variable X.
Pr(X = 0) = x:f(x)=0 |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
Measuring the State of the System
Partial measurements / non-demolition measurements
Suppose we are given a Boolean function
http://find/ -
7/29/2019 Roetteler All
88/247
Suppose we are given a Boolean function
f :{
0, 1}
n
{0, 1
}and have prepared the state
| = 12n/2
x{0,1}n
x |x |f(x)
=
1
2n/2 x:f(x)=0
x |x |0 + x:f(x)=1
x |x |1 .Measuring the last qubit gives a random variable X.
Pr(X = 0) = x:f(x)=0 |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
Measuring the State of the System
Why partial/non-demolition measurements
We can still work with the collapsed state! For instance if
http://find/http://goback/ -
7/29/2019 Roetteler All
89/247
We can still work with the collapsed state! For instance if
measuring the last qubit of
| = 12n/2
x:f(x)=0
x |x |0 +
x:f(x)=1
x |x |1
yields the result X = 1, then the collapsed state is
|1 = 1s1
x:f(x)=1
x |x , where s1 = |{x : f(x) = 1}|.
Note: cannot be used to find 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
Measuring the State of the System
Why partial/non-demolition measurements
We can still work with the collapsed state! For instance if
http://find/ -
7/29/2019 Roetteler All
90/247
We can still work with the collapsed state! For instance if
measuring the last qubit of
| = 12n/2
x:f(x)=0
x |x |0 +
x:f(x)=1
x |x |1
yields the result X = 1, then the collapsed state is
|1 = 1s1
x:f(x)=1
x |x , where s1 = |{x : f(x) = 1}|.
Note: cannot be used to find 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
Measuring the State of the System
Why partial/non-demolition measurements
We can still work with the collapsed state! For instance if
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
91/247
We can still work with the collapsed state! For instance if
measuring the last qubit of
| = 12n/2
x:f(x)=0
x |x |0 +
x:f(x)=1
x |x |1
yields the result X = 1, then the collapsed state is
|1 = 1s1
x:f(x)=1
x |x , where s1 = |{x : f(x) = 1}|.
Note: cannot be used to find 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
Simons Problem: Preparing Useful States
Creating the uniform superposition
The basic idea is to prepare
http://find/http://goback/ -
7/29/2019 Roetteler All
92/247
The basic idea is to prepare
|0 |0 Hn2 1
2n
xIFn2|x |0
Uf 12n xIFn2 |x |f(x) .
Collapsing the uniform superposition
Now, measuring the second register will yield a random s IFn2in the image of f. The state collapses to
|x0,s =1
2(|x0 + |x0 s).
Martin Rotteler NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem: Preparing Useful States
Creating the uniform superposition
The basic idea is to prepare
http://find/http://goback/ -
7/29/2019 Roetteler All
93/247
e bas c dea s to p epa e
|0 |0 Hn2 1
2n
xIFn2|x |0
Uf 12n xIFn2 |x |f(x) .
Collapsing the uniform superposition
Now, measuring the second register will yield a random s IFn2in the image of f. The state collapses to
|x0,s =1
2(|x0 + |x0 s).
Martin Rotteler NEC Laboratories America Introduction to Quantum Algorithms
Computing the Hadamard TransformWe apply Hn2 to the collapsed states |x0,s:
1 1
http://find/ -
7/29/2019 Roetteler All
94/247
Hn2|x0,s
=
1
2n/2 x,yIFn2(1)xy
|x
y
|1
2(
|x0
+
|x0
s
)
=1
2n+1
xIFn2(1)xx0 |x +
xIFn2
(1)x(x0s) |x
= 12n+1
xIFn2
(1)xx0 |x + (1)xx0xs) |x=
12n+1 xIFn2
(1)xx0 |x + (1)xx0 (1)xs
|x
=1
2n+1
xIFn2
(1)xx0 1 + (1)xs |xMartin Rotteler NEC Laboratories America Introduction to Quantum Algorithms
Computing the Hadamard TransformWe apply Hn2 to the collapsed states |x0,s:
n 1 x y 1
http://goforward/http://find/http://goback/ -
7/29/2019 Roetteler All
95/247
Hn2|x0,s
=
1
2n/2 x,yIFn2(1)xy
|x
y
|1
2(
|x0
+
|x0
s
)
=1
2n+1
xIFn2(1)xx0 |x +
xIFn2
(1)x(x0s) |x
= 12n+1
xIFn2
(1)xx0 |x + (1)xx0xs) |x=
12n+1 xIFn2
(1)xx0 |x + (1)xx0 (1)xs
|x
=1
2n+1
xIFn2
(1)xx0 1 + (1)xs |xMartin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Computing the Hadamard TransformWe apply Hn2 to the collapsed states |x0,s:
Hn1
( 1)x y1
( )
http://find/ -
7/29/2019 Roetteler All
96/247
Hn2|x0,s
=
1
2n/
2 x,yIFn2(1)xy
|x
y
|1
2(
|x0
+
|x0
s
)
=1
2n+1
xIFn2(1)xx0 |x +
xIFn2
(1)x(x0s) |x
= 12n+1
xIFn2
(1)xx0 |x + (1)xx0xs) |x=
12n+1 xIFn2
(1)xx0 |x + (1)xx0 (1)xs
|x
=1
2n+1
xIFn2
(1)xx0 1 + (1)xs |xMartin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Computing the Hadamard TransformWe apply Hn2 to the collapsed states |x0,s:
Hn1
( 1)xy1
( )
http://find/ -
7/29/2019 Roetteler All
97/247
Hn2|x0,s
= 2n/2 x,yIFn2(1)
xy
|x
y
|2 (|x0 + |x0 s)=
12n+1
xIFn2(1)xx0 |x +
xIFn2
(1)x(x0s) |x
= 12n+1
xIFn2
(1)xx0 |x + (1)xx0xs) |x=
12n+1 xIFn2
(1)xx0 |x + (1)xx0 (1)xs
|x
=1
2n+1
xIFn2
(1)xx0 1 + (1)xs |xMartin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Computing the Hadamard TransformWe apply Hn2 to the collapsed states |x0,s:
Hn1
( 1)xy1
( + )
http://find/ -
7/29/2019 Roetteler All
98/247
Hn2|x0,s
= 2n/2 x,yIFn2(1)
xy
|x
y
|2 (|x0 + |x0 s)=
12n+1
xIFn2(1)xx0 |x +
xIFn2
(1)x(x0s) |x
= 12n+1
xIFn2
(1)xx0 |x + (1)xx0xs) |x=
12n+1 xIFn2
(1)xx0 |x + (1)xx0 (1)xs
|x
=1
2n+1
xIFn2
(1)xx0 1 + (1)xs |xMartin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem: Destructive InterferenceWhat have we gained by doing this?
1
http://find/ -
7/29/2019 Roetteler All
99/247
Hn
2 |x0,s =1
2n+1 xIFn2
(1)x
x0 1 + (1)xs |x
=1
2n+1
xIFn
2xs=0
(1)xx0 |x
Hence measuring this state yields a random element in
s = {x IFn2|x s = 0}.
What we really want...
... are elements from s itself (there is only 0 and s itself sinces is one-dimensional). How can we compute s from s?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem: Destructive InterferenceWhat have we gained by doing this?
1
http://find/ -
7/29/2019 Roetteler All
100/247
Hn
2 |x0,s =1
2n+1 xIFn2
(1)x
x0 1 + (1)xs |x
=1
2n+1
xIFn
2xs=0
(1)xx0 |x
Hence measuring this state yields a random element in
s = {x IFn2|x s = 0}.
What we really want...
... are elements from s itself (there is only 0 and s itself sinces is one-dimensional). How can we compute s from s?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem: Destructive InterferenceWhat have we gained by doing this?
1
http://find/ -
7/29/2019 Roetteler All
101/247
Hn
2 |x0,s =1
2n+1 xIFn2
(1)x
x0 1 + (1)xs |x
=1
2n+1
xIFn
2xs=0
(1)xx0 |x
Hence measuring this state yields a random element in
s = {x IFn2|x s = 0}.
What we really want...
... are elements from s itself (there is only 0 and s itself sinces is one-dimensional). How can we compute s from s?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem: Destructive InterferenceWhat have we gained by doing this?
1
http://find/ -
7/29/2019 Roetteler All
102/247
Hn
2 |x0,s =1
2n+1 xIFn2
(1)x
x0 1 + (1)xs |x
=1
2n+1
xIFn
2xs=0
(1)xx0 |x
Hence measuring this state yields a random element in
s = {x IFn2|x s = 0}.
What we really want...
... are elements from s itself (there is only 0 and s itself sinces is one-dimensional). How can we compute s from s?
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Solution to Simons ProblemQuantum algorithm
Given: Function f : {0, 1}n {0, 1}n with Simon promise, i. e., preimages ofa fixed image have the form x0 and x0 s.
http://find/ -
7/29/2019 Roetteler All
103/247
g
Task: Find the unknown bit-string s IFn
2.Repeat the following steps n 1 times:
1. Initialize two quantum registers: |0 |0
2. Equal distribution on first register: 12n
P
x{0,1}n |x |0
3. Compute f in superposition: 12n
P
x{0,1}n |x |f(x)4. Measure second register: 1
2(|x0 + |x0 s) = |x0,s
5. Compute Hn2 on first register:1
2n+1
X
xIFn2
xs=0
(1)xx0 |x
6. Measure first register: Sample y IFn2 with y s = 0.
Further classical post-processing is necessary!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Solution to Simons ProblemQuantum algorithm
Given: Function f : {0, 1}n {0, 1}n with Simon promise, i. e., preimages ofa fixed image have the form x0 and x0 s.
http://find/ -
7/29/2019 Roetteler All
104/247
Task: Find the unknown bit-string s IFn
2.Repeat the following steps n 1 times:
1. Initialize two quantum registers: |0 |0
2. Equal distribution on first register: 12n
P
x{0,1}n |x |0
3. Compute f in superposition: 12n
P
x{0,1}n |x |f(x)4. Measure second register: 1
2(|x0 + |x0 s) = |x0,s
5. Compute Hn2 on first register:1
2n+1
X
xIFn2
xs=0
(1)xx0 |x
6. Measure first register: Sample y IFn2 with y s = 0.
Further classical post-processing is necessary!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Solution to Simons ProblemQuantum algorithm
Given: Function f : {0, 1}n {0, 1}n with Simon promise, i. e., preimages ofa fixed image have the form x0 and x0 s.
http://find/ -
7/29/2019 Roetteler All
105/247
Task: Find the unknown bit-string s IFn
2.Repeat the following steps n 1 times:
1. Initialize two quantum registers: |0 |0
2. Equal distribution on first register: 12n
P
x{0,1}n |x |0
3. Compute f in superposition: 12n
P
x{0,1}n |x |f(x)4. Measure second register: 1
2(|x0 + |x0 s) = |x0,s
5. Compute Hn2 on first register:1
2n+1
X
xIFn2
xs=0
(1)xx0 |x
6. Measure first register: Sample y IFn2 with y s = 0.
Further classical post-processing is necessary!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Solution to Simons ProblemQuantum algorithm
Given: Function f : {0, 1}n {0, 1}n with Simon promise, i. e., preimages ofa fixed image have the form x0 and x0 s.
http://find/ -
7/29/2019 Roetteler All
106/247
Task: Find the unknown bit-string s IFn
2.Repeat the following steps n 1 times:
1. Initialize two quantum registers: |0 |0
2. Equal distribution on first register: 12n
P
x{0,1}n |x |0
3. Compute f in superposition: 12n
P
x{0,1}n |x |f(x)4. Measure second register: 1
2(|x0 + |x0 s) = |x0,s
5. Compute Hn2 on first register:1
2n+1
X
xIFn2
xs=0
(1)xx0 |x
6. Measure first register: Sample y IFn2 with y s = 0.
Further classical post-processing is necessary!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Solution to Simons ProblemQuantum algorithm
Given: Function f : {0, 1}n {0, 1}n with Simon promise, i. e., preimages ofa fixed image have the form x0 and x0 s.
n
http://find/ -
7/29/2019 Roetteler All
107/247
Task: Find the unknown bit-string s IFn
2.Repeat the following steps n 1 times:
1. Initialize two quantum registers: |0 |0
2. Equal distribution on first register: 12n
P
x{0,1}n |x |0
3. Compute f in superposition: 12n
P
x{0,1}n |x |f(x)4. Measure second register: 1
2(|x0 + |x0 s) = |x0,s
5. Compute Hn2 on first register:1
2n+1
X
xIFn2
xs=0
(1)xx0 |x
6. Measure first register: Sample y IFn2 with y s = 0.
Further classical post-processing is necessary!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Solution to Simons ProblemQuantum algorithm
Given: Function f : {0, 1}n {0, 1}n with Simon promise, i. e., preimages ofa fixed image have the form x0 and x0 s.
n
http://find/ -
7/29/2019 Roetteler All
108/247
Task: Find the unknown bit-string s IFn
2.Repeat the following steps n 1 times:
1. Initialize two quantum registers: |0 |0
2. Equal distribution on first register: 12n
P
x{0,1}n |x |0
3. Compute f in superposition: 12n
P
x{0,1}n |x |f(x)4. Measure second register: 1
2(|x0 + |x0 s) = |x0,s
5. Compute Hn2 on first register:1
2n+1
X
xIFn2
xs=0
(1)xx0 |x
6. Measure first register: Sample y IFn2 with y s = 0.
Further classical post-processing is necessary!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Solution to Simons Problem
Quantum algorithm
Given: Function f : {0, 1}n {0, 1}n with Simon promise, i. e., preimages ofa fixed image have the form x0 and x0 s.
T k Fi d th k bit t i n
http://find/ -
7/29/2019 Roetteler All
109/247
Task: Find the unknown bit-string s IF
n
2.
Repeat the following steps n 1 times:1. Initialize two quantum registers: |0 |0
2. Equal distribution on first register: 12n
P
x{0,1}n |x |0
3. Compute f in superposition: 12nP
x{0,1}n |x |f(x)4. Measure second register: 1
2(|x0 + |x0 s) = |x0,s
5. Compute Hn2 on first register:1
2n+1
X
xIFn2
xs=0
(1)xx0 |x
6. Measure first register: Sample y IFn2 with y s = 0.
Further classical post-processing is necessary!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Solution to Simons Problem
Quantum algorithm
Given: Function f : {0, 1}n {0, 1}n with Simon promise, i. e., preimages ofa fixed image have the form x0 and x0 s.
Task: Find the unknown bit string s IFn
http://find/ -
7/29/2019 Roetteler All
110/247
Task: Find the unknown bit-string s
IFn2
.
Repeat the following steps n 1 times:1. Initialize two quantum registers: |0 |0
2. Equal distribution on first register: 12n
P
x{0,1}n |x |0
3. Compute f in superposition: 12nP
x{0,1}n |x |f(x)4. Measure second register: 1
2(|x0 + |x0 s) = |x0,s
5. Compute Hn2 on first register:1
2n+1
X
xIFn2
xs=0
(1)xx0 |x
6. Measure first register: Sample y IFn2 with y s = 0.
Further classical post-processing is necessary!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Solution to Simons Problem
Quantum algorithm
Given: Function f : {0, 1}n {0, 1}n with Simon promise, i. e., preimages ofa fixed image have the form x0 and x0 s.
Task: Find the unknown bit string s IFn
http://find/ -
7/29/2019 Roetteler All
111/247
Task: Find the unknown bit-string s
IFn2
.
Repeat the following steps n 1 times:1. Initialize two quantum registers: |0 |0
2. Equal distribution on first register: 12n
P
x{0,1}n |x |0
3. Compute f in superposition: 12nP
x{0,1}n |x |f(x)4. Measure second register: 1
2(|x0 + |x0 s) = |x0,s
5. Compute Hn2 on first register:1
2n+1
X
xIFn2
xs=0
(1)xx0 |x
6. Measure first register: Sample y IFn2 with y s = 0.
Further classical post-processing is necessary!
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Classical Postprocessing in Simons Algorithm
Classical post-processing
After n 1 iterations: y1, . . . , yn1 IFn2 with yi s = 0.
http://find/ -
7/29/2019 Roetteler All
112/247
We have to infer s by a purely classical computation.Show high probability of success over the choice of yi.
Linear algebra over IF2
We are given the linear system of equations
A s =
y1...
yn
1
s = 0
Hence, we have to compute the kernel of A IF(n1)n2 . If thekernel is one-dimensional, then s is uniquely determined.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Classical Postprocessing in Simons Algorithm
Classical post-processing
After n 1 iterations: y1, . . . , yn1 IFn2 with yi s = 0.
http://find/ -
7/29/2019 Roetteler All
113/247
We have to infer s by a purely classical computation.Show high probability of success over the choice of yi.
Linear algebra over IF2
We are given the linear system of equations
A s =
y1...
yn
1
s = 0
Hence, we have to compute the kernel of A IF(n1)n2 . If thekernel is one-dimensional, then s is uniquely determined.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Classical Post-Processing in Simons Algorithm
The probability of success
Since dim(s) = 1 we have that dim(s) = n1. Hence we have to boundthe probability that n 1 random vectors in IFn2 are linear independent:
http://find/ -
7/29/2019 Roetteler All
114/247
Pr(rk(A) = n1) =
2n1 12n1
2n1 22n1
. . . . . .
2n1 2n22n1
=
1 12n1
1 12n2
. . . . . .
1 14
12
1
1
2n1 + . . . +1
4
1
2
1 1
2
1
2 1
4
Complexity of the quantum algorithm
We have used n iterations and each individual run uses one query, 2n
Hadamard transforms, and n+ 1 single qubit measurements
Postprocessing: Computing the kernel of a matrix of size n n is linearalgebra and can be solved in time O(n3).
Overall we have found a polynomial-time quantum algorithm.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Classical Post-Processing in Simons Algorithm
The probability of success
Since dim(s) = 1 we have that dim(s) = n1. Hence we have to boundthe probability that n 1 random vectors in IFn2 are linear independent:
http://find/ -
7/29/2019 Roetteler All
115/247
Pr(rk(A) = n1) =
2n1 12n1
2n1 22n1
. . . . . .
2n1 2n22n1
=
1 12n1
1 12n2
. . . . . .
1 14
12
1
1
2n1 + . . . +
1
4
1
2
1 1
2
1
2 1
4
Complexity of the quantum algorithm
We have used n iterations and each individual run uses one query, 2n
Hadamard transforms, and n+ 1 single qubit measurements
Postprocessing: Computing the kernel of a matrix of size n n is linearalgebra and can be solved in time O(n3).
Overall we have found a polynomial-time quantum algorithm.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Classical Post-Processing in Simons Algorithm
The probability of success
Since dim(s) = 1 we have that dim(s) = n1. Hence we have to boundthe probability that n 1 random vectors in IFn2 are linear independent:
http://find/ -
7/29/2019 Roetteler All
116/247
Pr(rk(A) = n1) =
2n1 12n1
2n1 22n1
. . . . . .
2n1 2n22n1
=
1 12n1
1 12n2
. . . . . .
1 14
12
1
1
2n1 + . . . +
1
4
1
2
1 1
2
1
2 1
4
Complexity of the quantum algorithm
We have used n iterations and each individual run uses one query, 2n
Hadamard transforms, and n+ 1 single qubit measurements
Postprocessing: Computing the kernel of a matrix of size n n is linearalgebra and can be solved in time O(n3).
Overall we have found a polynomial-time quantum algorithm.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Classical Post-Processing in Simons Algorithm
The probability of success
Since dim(s) = 1 we have that dim(s) = n1. Hence we have to boundthe probability that n 1 random vectors in IFn2 are linear independent:
http://find/ -
7/29/2019 Roetteler All
117/247
Pr(rk(A) = n1) =
2n1 12n1
2n1 22n1
. . . . . .
2n1 2n22n1
=
1 12n1
1 12n2
. . . . . .
1 14
12
1
1
2n1 + . . . +
1
4
1
2
1 1
2
1
2 1
4
Complexity of the quantum algorithm
We have used n iterations and each individual run uses one query, 2n
Hadamard transforms, and n+ 1 single qubit measurements
Postprocessing: Computing the kernel of a matrix of size n n is linearalgebra and can be solved in time O(n3).
Overall we have found a polynomial-time quantum algorithm.
Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem: Classical Lower Bound
Theorem
Let A be a classical probabilistic algorithm which determines susing k queries to the function f. Then k = (2n/2).
http://find/ -
7/29/2019 Roetteler All
118/247
Computational complexity theory lingo
Hence there exists an oracle O with respect which we have aseparation between classical and quantum computation:
BPPO = BQPOThis is a so-called relativized result, i. e., it holds in a
world in which calls to the oracle cost only one query.
Whether this also holds for our world, i. e., without oracles,
is a major open problem in theoretical computer science.
Looking ahead: Why does the fact that FACTORING is in
BQP, whereas no classical algorithm is known for it, does
not imply that BPP = BQP?Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem: Classical Lower Bound
Theorem
Let A be a classical probabilistic algorithm which determines susing k queries to the function f. Then k = (2n/2).
http://find/ -
7/29/2019 Roetteler All
119/247
Computational complexity theory lingo
Hence there exists an oracle O with respect which we have aseparation between classical and quantum computation:
BPPO = BQPOThis is a so-called relativized result, i. e., it holds in a
world in which calls to the oracle cost only one query.
Whether this also holds for our world, i. e., without oracles,
is a major open problem in theoretical computer science.
Looking ahead: Why does the fact that FACTORING is in
BQP, whereas no classical algorithm is known for it, does
not imply that BPP = BQP?Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem: Classical Lower Bound
Theorem
Let A be a classical probabilistic algorithm which determines susing k queries to the function f. Then k = (2n/2).
http://find/ -
7/29/2019 Roetteler All
120/247
Computational complexity theory lingo
Hence there exists an oracle O with respect which we have aseparation between classical and quantum computation:
BPPO = BQPOThis is a so-called relativized result, i. e., it holds in a
world in which calls to the oracle cost only one query.
Whether this also holds for our world, i. e., without oracles,
is a major open problem in theoretical computer science.
Looking ahead: Why does the fact that FACTORING is in
BQP, whereas no classical algorithm is known for it, does
not imply that BPP = BQP?Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem: Classical Lower Bound
Theorem
Let A be a classical probabilistic algorithm which determines susing k queries to the function f. Then k = (2n/2).
http://find/ -
7/29/2019 Roetteler All
121/247
Computational complexity theory lingo
Hence there exists an oracle O with respect which we have aseparation between classical and quantum computation:
BPPO = BQPOThis is a so-called relativized result, i. e., it holds in a
world in which calls to the oracle cost only one query.
Whether this also holds for our world, i. e., without oracles,
is a major open problem in theoretical computer science.
Looking ahead: Why does the fact that FACTORING is in
BQP, whereas no classical algorithm is known for it, does
not imply that BPP = BQP?Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem: Classical Lower Bound
Theorem
Let A be a classical probabilistic algorithm which determines susing k queries to the function f. Then k = (2n/2).
http://find/ -
7/29/2019 Roetteler All
122/247
Computational complexity theory lingo
Hence there exists an oracle O with respect which we have aseparation between classical and quantum computation:
BPPO = BQPOThis is a so-called relativized result, i. e., it holds in a
world in which calls to the oracle cost only one query.
Whether this also holds for our world, i. e., without oracles,
is a major open problem in theoretical computer science.
Looking ahead: Why does the fact that FACTORING is in
BQP, whereas no classical algorithm is known for it, does
not imply that BPP = BQP?Martin Rotteler, NEC Laboratories America Introduction to Quantum Algorithms
Simons Problem: Classical Lower Bound
Sketch of proof of the (2n/2) l