Download Small-Depth Quantum Circuits

Document related concepts

Instanton wikipedia , lookup

Bell test experiments wikipedia , lookup

Quantum dot cellular automaton wikipedia , lookup

Ensemble interpretation wikipedia , lookup

Renormalization wikipedia , lookup

Bohr–Einstein debates wikipedia , lookup

Topological quantum field theory wikipedia , lookup

Relativistic quantum mechanics wikipedia , lookup

Basil Hiley wikipedia , lookup

Double-slit experiment wikipedia , lookup

Renormalization group wikipedia , lookup

Delayed choice quantum eraser wikipedia , lookup

Theoretical and experimental justification for the Schrödinger equation wikipedia , lookup

Particle in a box wikipedia , lookup

Scalar field theory wikipedia , lookup

Max Born wikipedia , lookup

Quantum decoherence wikipedia , lookup

Quantum field theory wikipedia , lookup

Measurement in quantum mechanics wikipedia , lookup

Bell's theorem wikipedia , lookup

Hydrogen atom wikipedia , lookup

Quantum dot wikipedia , lookup

Copenhagen interpretation wikipedia , lookup

Coherent states wikipedia , lookup

Quantum entanglement wikipedia , lookup

Path integral formulation wikipedia , lookup

Quantum fiction wikipedia , lookup

Density matrix wikipedia , lookup

Many-worlds interpretation wikipedia , lookup

Quantum electrodynamics wikipedia , lookup

Probability amplitude wikipedia , lookup

Orchestrated objective reduction wikipedia , lookup

History of quantum field theory wikipedia , lookup

EPR paradox wikipedia , lookup

Interpretations of quantum mechanics wikipedia , lookup

Quantum computing wikipedia , lookup

Quantum machine learning wikipedia , lookup

Quantum key distribution wikipedia , lookup

Symmetry in quantum mechanics wikipedia , lookup

Quantum teleportation wikipedia , lookup

Quantum group wikipedia , lookup

Quantum cognition wikipedia , lookup

Hidden variable theory wikipedia , lookup

Quantum state wikipedia , lookup

Canonical quantization wikipedia , lookup

T-symmetry wikipedia , lookup

Transcript
Small-Depth
Quantum Circuits
Frederic Green
Department of Math/CS
Clark University
Worcester, MA
Some Background
• Computers (as we know them) obey the laws of
classical physics.
• But Nature is quantum mechanical!
• Feynman (ca. 1981) noted that “quantum mechanical
computers” can probably simulate physical systems
more efficiently than classical ones.
• Deutsch (1985) introduced quantum Turing machines,
and found evidence that they can solve hard problems
more efficiently than classical Turing machines.
• Shor (1994) found an efficient quantum algorithm
to factor a number. No known classical algorithm can
do this.
Two Important Questions:
• Can we build a quantum computer?
• If we could build one, would it be useful?
In This Talk:
• Ignore first question above; concentrate on second.
• What is quantum computation?
(Answer: Quantum circuits.)
• How do we measure its efficiency?
(Answer: Computational complexity theory.)
Start with an intro to quantum computing…
What is quantum computation?
Approach from the point of view of classical
probabilistic computation.
Example: Miller-Rabin primality test. Very roughly
stated:
To determine if n is prime:
Randomly generate a bunch of numbers m < n.
Check that mk = 1 (mod n), or -1, for
certain (carefully chosen!) k.
If so, return TRUE, else FALSE.
As we generate more and more bits of m, the number of
possible “configurations of memory” increases exponentially.
But the right answer is obtained with very high probability.
A picture of this process:
time
“possible configuration of memory”
(only one when we start out)
t=0
t=1
t=2
t=3
2|n|
|n|
Desired configurations
2|n|
m
|n|
Interpretation:
• At any step of the computation, memory
can be in any one of a large number of
configurations.
• Each configuration occurs with a certain
probability; represent this set of probabilities
as a vector (2n components for n bits).
• The vector of probabilities evolves over time
according to a certain set of rules determined
by the algorithm.
“Vector of probabilities”
t=0
t=1
t=2
t=3
t=4
Evolution of probabilities (classical formulation):
Let v(t) = vector of probabilities at time t.
vi(t) = probability that we are in configuration
i at time t.
It’s not hard to see that v(t) evolves linearly.
I.e., there is a matrix M such that,
v(t+1) = Mv(t)
Mi j is simply the probability that configuration j
yields configuration i.
So (of course!) Mi j is a real number in [0,1].
M must leave ivi(t) invariant (probabilities sum to 1).
Evolution of probabilities (quantum formulation):
Let v(t) = vector of probability amplitudes at time t.
vi(t) is a complex number whose norm squared |vi(t)|2
= probability that we are in configuration i at time t.
As in the classical case, v(t) evolves linearly.
I.e., there is a matrix U such that,
v(t+1) = Uv(t)
Ui j is a complex number whose norm squared is the
probability that configuration j yields configuration i.
So (of course!) Ui j is not necessarily a real number in [0,1].
U must leave i |vi(t)|2 invariant (probabilities sum to 1).
Hence U is unitary: UU† = 1.
Measurement
After the computation has evolved, we
may measure the configuration.
The matrix U, applied to the initial configuration,
determines the probability that we end up in
any given configuration.
Once the bits of the configuration have been
measured, they will retain their measured value
until acted on again (“collapse of the wavefunction”).
WHY?
Don’t ask!
Consequences
• Configurations can actually cancel!
• Because of unitarity, quantum computation
is reversible!
t=0
t=1
Cancel
t=2
Cancel
t=3
t=4
Left with exactly
what we want!
(we hope!)
t=4
Building Blocks of Quantum Information
Bits:
Computational basis state:
(Column vector with one non-zero entry corresponding
to a single (classical) configuration of memory.)
Qubit:
More generally, a quantum state is a linear
combination, or “superposition” of
computational basis states.
Building Blocks of Quantum Computation
• Construct our unitary transformations from
one of a set of quantum gates.
• The following are universal: sufficient for realizing
any unitary transformation!
Building Blocks of Quantum Computation
• Construct our unitary transformations from
one of a set of quantum gates.
• The following are universal: sufficient for realizing
any unitary transformation!
Controlled-Not (“CNOT”)
Building Blocks of Quantum Computation
• Construct our unitary transformations from
one of a set of quantum gates.
• The following are universal: sufficient for realizing
any unitary transformation!
Controlled-Not (“CNOT”)
Toffoli
Building Blocks of Quantum Computation
• Construct our unitary transformations from
one of a set of quantum gates.
• The following are universal: sufficient for realizing
any unitary transformation!
Controlled-Not (“CNOT”)
Hadamard
H
=
Toffoli
Building Blocks of Quantum Computation
• Construct our unitary transformations from
one of a set of quantum gates.
• The following are universal: sufficient for realizing
any unitary transformation!
Controlled-Not (“CNOT”)
Hadamard
H
Toffoli
Phase
=
S
=
What Quantum Circuits Can Do: Entanglement
0
0
H
What Quantum Circuits Can Do: Entanglement
0
H
0
• Measure one bit, and know that the other has the same value
instantaneously, even if it is at the other end of the universe!
• Einstein called this “spooky action at a distance” and believed
that it could prove the absurdity of quantum mechanics.
• But it has been observed in the laboratory, and appears to
be useful for quantum computation.
What Quantum Circuits Can Do: Deutsch Algorithm
Suppose f is a boolean function f : {0,1}
{0,1}.
Classically, to evaluate the exclusive-or of f(0) and f(1) requires two evaluations.
With quantum circuits, we can compute it with only one!
What Quantum Circuits Can Do: Deutsch Algorithm
Suppose f is a boolean function f : {0,1}
{0,1}.
Classically, to evaluate the exclusive-or of f(0) and f(1) requires two evaluations.
With quantum circuits, we can compute it with only one!
Uf
Classical circuit to evaluate f
Note it’s just evaluated once
What Quantum Circuits Can Do: Deutsch Algorithm
Suppose f is a boolean function f : {0,1}
{0,1}.
Classically, to evaluate the exclusive-or of f(0) and f(1) requires two evaluations.
With quantum circuits, we can compute it with only one!
H
H
Uf
H
H
What Quantum Circuits Can Do: Deutsch Algorithm
Suppose f is a boolean function f : {0,1}
{0,1}.
Classically, to evaluate the exclusive-or of f(0) and f(1) requires two evaluations.
With quantum circuits, we can compute it with only one!
H
H
Uf
H
H
What Quantum Circuits Can Do: Deutsch Algorithm
Suppose f is a boolean function f : {0,1}
{0,1}.
Classically, to evaluate the exclusive-or of f(0) and f(1) requires two evaluations.
With quantum circuits, we can compute it with only one!
H
H
Uf
H
H
Destructive interference and entanglement (of x with f(x))
are crucial in this algorithm.
What Quantum Circuits Can Do: Factor Numbers
(Shor’s Algorithm)
Factoring reduces to period finding:
Start by “guessing” an m < n with gcd(m, n) = 1.
If we find gcd(m, n) > 1, we have a factor!
Otherwise, it is useful to find the minimum r
such that mr = 1 (mod n), the period of m mod n.
This is the hard part. All other steps (including
the guessing of m) are classical, based on elementary
number theory.
• Crucial tool for finding the period: Fourier Transform
• This is the only quantum part of Shor’s algorithm!
The Quantum Fourier Transform (QFT)
Let
g =e
2r i/2 k
(2k-th root of unity)
The Quantum Fourier Transform (QFT)
Let
g =e
2r i/2 k
(2k-th root of unity)
The QFT acts on an k-bit quantum register:
The Quantum Fourier Transform (QFT)
g =e
Let
2r i/2 k
(2k-th root of unity)
The QFT acts on an k-bit quantum register:
a
1
2 k/ 2
QFT
2k - 1
!
g ab b
b =0
k bits
Apply QFT (twice) to obtain a superposition with
states whose probability amplitudes depend on
sums of powers of .
g
g
The powers of
are arranged so that….
For those states in which
b doesn’t help us determine
the period, they (mostly)
cancel.
(In fact, when r is a power of 2, the “bad” states cancel exactly.)
g
The powers of
are arranged so that….
For those states in which
b doesn’t help us determine
the period, they (mostly)
cancel.
For those states in which
b does help us determine
the period, they add.
(In fact, when r is a power of 2, the “bad” states cancel exactly.)
Some Remarks on Complexity
Shor’s algorithm is exponentially faster than any known
classical algorithm for factoring.
But this does not prove that quantum computers would
be exponentially faster. It is possible we have just not
been clever enough to think up a polynomial-time
classical algorithm for factoring.
Grover’s database search algorithm (1996) does give a
provable quadratic speed-up over classical algorithms, but
not exponential.
There is one realm in which quantum circuits give
a provable exponential improvement over classical
circuits, and that is for constant-depth circuits.
Classical Circuits
Building blocks:
AND
x1
•
•
•
xn
n
i=1
OR
x1
•
•
•
xi
NOT
n
i=1
xi
x
xn
A typical question in computational complexity:
How many of these gates are needed to compute
an explicit Boolean function of n inputs, as n increases?
Generally very difficult to answer such questions, especially
when you introduce more powerful circuit elements.
x
Some Classical Circuit Complexity
Suppose we would like to compute parity:
x1 5 x 2 5 g 5 x n
(i.e., is the number of ones odd?)
…but we only have AND, OR, and NOT gates,
and, as an added bonus, MOD3 gates, that determine if
the number of 1’s in the input is divisible by 3.
Plus our circuits can only have constant depth.
Can it be done with a polynomial number of gates?
Answer (Razborov/Smolensky, 1987): No. Exponential size!
More generally, Smolensky proved that if q, p are distinct
primes, computing the MOD q function requires exponential
size constant-depth circuits with AND, OR, and MOD p gates.
Analogous Quantum Circuits [Green, Homer, Moore & Pollett 2002]
Imagine (someday) we could have unbounded fan-in Toffoli gates,
and gates that could reversibly fan out bits (classical only; qubits
cannot be copied by the no-cloning theorem).
Analogous Quantum Circuits [Green, Homer, Moore & Pollett 2002]
Imagine (someday) we could have unbounded fan-in Toffoli gates,
and gates that could reversibly fan out bits (classical only; qubits
cannot be copied by the no-cloning theorem).
x1
x2
xn
b
•
•
•
•
•
•
•
•
x1
x2
xn
b
Generalized Toffoli
n
xi
i=1
Analogous Quantum Circuits [Green, Homer, Moore & Pollett 2002]
Imagine (someday) we could have unbounded fan-in Toffoli gates,
and gates that could reversibly fan out bits (classical only; qubits
cannot be copied by the no-cloning theorem).
x1
x2
xn
b
•
•
•
•
•
•
•
•
x1
x2
xn
b
Generalized Toffoli
x1
x2
n
xi
i=1
•
•
•
•
•
•
•
•
b
b
•
=
b
b
xn
b
x1
x2
xn
•
•
Fanout
Constant depth circuits built out of these gates alone are equivalent to
those built out of AND, OR and NOT (in constant depth).
What happens if we also allow the single-qubit gates
(e.g., Hadamard and phase)?
Fanout Gates are Powerful!
•
•
•
•
•
•
•
•
Fanout Gates are Powerful!
H
H
H
•
•
•
•
•
•
•
•
H
H
H
H
H
Fanout Gates are Powerful!
H
H
•
•
•
•
•
•
•
•
H
H
H
H
H
H
•
=
•
H
H
H
H
H
H
•
H
H
Fanout Gates are Powerful!
H
H
•
•
•
•
•
•
•
•
H
H
H
H
H
H
•
=
•
H
H
H
H
H
H
•
•
=
H
H
•
•
Fanout Gates are Powerful!
H
H
•
•
•
•
•
•
•
•
H
H
H
H
H
H
•
=
•
H
H
H
H
H
H
This is a parity gate!
•
•
=
H
H
•
•
Fanout Gates are Powerful!
H
H
•
•
•
•
•
•
•
•
H
H
H
H
H
H
•
=
•
H
H
H
H
H
H
This is a parity gate!
•
•
•
•
•
•
•
•
2
•
•
=
H
H
•
•
Fanout Gates are Powerful
H
H
•
•
•
•
•
•
•
•
H
H
H
H
H
H
•
=
•
H
H
H
H
H
H
•
•
=
H
•
•
H
This is a parity gate!
•
•
•
•
•
•
•
•
2
In the quantum circuit
world, the mere presence
of fanout allows us to
compute parity…
Fanout Gates Allow Parallelization
Suppose we have a controlled unitary operator M that we
would like to apply n times:
Fanout Gates Allow Parallelization
Suppose we have a controlled unitary operator M that we
would like to apply n times:
M
M
M
n layers
M
Fanout Gates Allow Parallelization
Suppose we have a controlled unitary operator M that we
would like to apply n times. With fanout, we can do it in
constant depth:
First diagonalize M, writing M = T†DT.
Thus Mn = T†DnT. The following does this in 5 layers:
Fanout Gates Allow Parallelization
Suppose we have a controlled unitary operator M that we
would like to apply n times. With fanout, we can do it in
constant depth:
First diagonalize M, writing M = T†DT.
Thus Mn = T†DnT. The following does this in 5 layers:
T†
T
D
D
D
Fanout Gates Allow Parallelization
Suppose we have a controlled unitary operator M that we
would like to apply n times. With fanout, we can do it in
constant depth:
First diagonalize M, writing M = T†DT.
Thus Mn = T†DnT. The following does this in 5 layers:
T†
T
D
D
D
layer 1
Fanout Gates Allow Parallelization
Suppose we have a controlled unitary operator M that we
would like to apply n times. With fanout, we can do it in
constant depth:
First diagonalize M, writing M = T†DT.
Thus Mn = T†DnT. The following does this in 5 layers:
T†
T
D
D
D
layer 2
Fanout Gates Allow Parallelization
Suppose we have a controlled unitary operator M that we
would like to apply n times. With fanout, we can do it in
constant depth:
First diagonalize M, writing M = T†DT.
Thus Mn = T†DnT. The following does this in 5 layers:
T†
T
D
D
D
layer 3
Fanout Gates Allow Parallelization
Suppose we have a controlled unitary operator M that we
would like to apply n times. With fanout, we can do it in
constant depth:
First diagonalize M, writing M = T†DT.
Thus Mn = T†DnT. The following does this in 5 layers:
T†
T
D
D
D
layer 4
Fanout Gates Allow Parallelization
Suppose we have a controlled unitary operator M that we
would like to apply n times. With fanout, we can do it in
constant depth:
First diagonalize M, writing M = T†DT.
Thus Mn = T†DnT. The following does this in 5 layers:
T†
T
D
D
D
layer 5
Consequence: Fanout Gates are REALLY Powerful!
• Computing MOD q reduces to fanout and vice versa,
for any q, in poly. size/constant depth.
• For quantum circuits, MOD q is as good as MOD p,
for any q, p (prime or otherwise), up to polynomial
size and constant depth.
(Contrast with the classical results of Razborov/Smolensky,
where Mod q requires exponential size circuits with Mod p!)
(But wait, there’s more….)
Consequence: Fanout Gates are REALLY REALLY Powerful!
• Høyer and Spalek (2003) use a clever adaptation of
our parallelization method to show that threshold gates
reduce to fanout.
For constant depth quantum circuits, “EVERYTHING”
reduces to fanout!
• The Quantum Fourier Transform can be done
in constant depth, poly. size with just single-qubit
and fanout gates.
• Hence, IF we could implement fanout gates, we
could do the quantum part of Shor’s algorithm in
constant time. (But that’s a big “if”!)
Open Problems, Current Work
• For physicists: Can we implement fanout?
(One candidate technology: Ion trap)
• For complexity theorists: Can we implement
fanout using single qubits and Toffoli gates?
(Ongoing work of Fang, Fenner, Green, Homer, Zhang
strongly suggests “no”)
• For everyone: Can we come up with new
quantum algorithms?