Quantum Algorithms Lecture #1ias.huji.ac.il/sites/default/files/quantum_algorithms_lecture1.pdf ·...

Post on 18-Jul-2020

0 views 0 download

Transcript of Quantum Algorithms Lecture #1ias.huji.ac.il/sites/default/files/quantum_algorithms_lecture1.pdf ·...

Quantum AlgorithmsLecture #1

Stephen Jordan

1994: Shor's Algorithm

1997: Grover's Algorithm

Other Quantum Algorithms?● Simulating quantum systems.

[R. Feynman, Int. J. Theor. Phys. 21:467, 1982]

● Approximating Jones Polynomials.[M. Freedman, A. Kitaev, and Z. Wang, Comm. Math. Phys. 227:587, 2002]

● Evaluating NAND Trees.[Theory of Computing 4:169-190, 2008]

● Many more.[math.nist.gov/quantum/zoo/]

Building Blocks for Quantum Algorithms

● Lecture 1: Universality of Quantum Circuits and Simulation of Physical Systems

● Lecture 2: Quantum Fourier Transforms and Beyond

● Lecture 3: Topological Invariants

How much physics do we need?Trapped Ions Superconducting Circuits

Quantum DotsNV Centers in Diamond

[ Wineland group, NIST ] [ Mooij group, TU Delft]

[Paul group, U. Glasgow ][ Awshalom group, UCSB ]

Not Much Physics

● Threshold Theorem: If noise per operation is below ~0.1%, one can do arbitrarily long computations with only logarithmic overhead.

We can pretend operations are noiseless.

● Big-O notation: How does the number of operations scale as a function of problem size (e.g. linear, quadratic, exponential)?

We don't care about exact gate counts or how long it takes to perform each gate.

Big-O Notation

if and only if such that

Exercise #1: TRUE or FALSE:

Big-O Notation

if and only if such that

Exercise #1: TRUE or FALSE:

● TRUE● TRUE● TRUE● FALSE

Not Much Physics

● Threshold Theorem: If noise per operation is below ~0.1%, one can do arbitrarily long computations with only logarithmic overhead.

We can pretend operations are noiseless.

● Big-O notation: How does the number of operations scale as a function of problem size (e.g. linear, quadratic, exponential)?

We don't care about exact gate counts or how long it takes to perform each gate.

Physics-Free Notation

● For every state of the classical system, we have a basis vector.

Two bits: 00 01 10 11

Two qubits:

● These are orthonormal:

● Arbitrary state:

Quantum Circuits

● Quantum mechanics is linear and norm-preserving.

● Thus a quantum computation on n qubits is a unitary matrix.

● We build these out of gates, such as:

● The number of gates is the computation time.

Reading Quantum Circuits

Reading Quantum Circuits

Reading Quantum Circuits

Reading Quantum Circuits

Reading Quantum Circuits

Exercise #2

Q. What does this circuit do?

Exercise #2

Q. What does this circuit do?

A. It “swaps” the two qubits.

Exercise #3

Q. What does this circuit do?

Exercise #3

Q. What does this circuit do?

A. It induces a minus sign if .

Controlled-unitaries

Similarly,

Applies U to the target qubit only ifboth control qubits are .

Controlled-unitaries

Similarly,

Applies U to the target qubit only ifboth control qubits are .

“the quantum if-statement”

A Neat Trick

● Doubly-controlled U can be made from 2-qubit gates. Let .

● The doubly-controlled U is a 2-level unitary.

Implementing 3-qubit Gates

● A 3-qubit gate is an 8x8 unitary matrix.● It can be decomposed into a product of 2-level

unitaries, basically by Gaussian elimination.● Each 2-level unitary can be decomposed into

singly-controlled operations as in the previous slide.

Implementing 3-qubit Unitaries

● A 3-qubit gate is an 8x8 unitary matrix.● It can be decomposed into a product of 2-level

unitaries, basically by Gaussian elimination.● Each 2-level unitary can be decomposed into

singly-controlled operations as in the previous slide.

Including 3-qubit gates in ourgate-set adds no computational power.

Implementing n-qubit Unitaries

● An n-qubit unitary is a matrix.● It can be decomposed into a product of

2-level unitaries, essentially by Gaussian elimination.

● A 2-level unitary here is a (n-1)-fold controlled gate.

● We can implement these from singly-controlled unitaries using a not-very-obvious trick.

[Barenco, et al. Phys. Rev. A 52:3457 (1995)]

Implementing n-qubit Unitaries

● An n-qubit unitary is a matrix.● It can be decomposed into a product of

2-level unitaries, essentially by Gaussian elimination.

● A 2-level unitary here is a (n-1)-fold controlled gate.

● We can implement these from singly-controlled unitaries using a not-very-obvious trick.

[Barenco, et al. Phys. Rev. A 52:3457 (1995)]

This is exercise 4.30 inNielsen & Chuang.(Anomalously difficult!)

Some Things are Hard● Most n-qubit (i.e. ) unitaries require

exponentially many gates to implement.● This can be seen by a counting argument:

● There are only exponentially many quantum circuits composable from polynomially many gates.

● There are unitaries of size

such that .

But...everything worth doing is easy.

Church-Turing-Deutsch Thesis:

Every physically realizable computation can be simulated by quantum circuits with polynomial overhead.

● A bold claim! Might not be true!● The rest of this lecture will provide evidence currently-

accessible laboratory physics can be efficiently simulated by quantum circuits.

● Assuming this thesis gives us a well-defined framework for quantum algorithms.

Our Framework

● We can perform arbitrary 1-qubit and 2-qubit gates (elements of SU(2) and SU(4)).

● Can interact any pair of qubits. (No geometry.)● Computation time is number of gates.● State preparation and measurement is in

computational basis.

● How does number of gates scale with problem size (number of bits of input).

Gate-set Independence

This is a complete gate set. Adding more gates adds no computational power!

Gate-set Independence

This is a complete gate set. Adding more gates adds no computational power!

See:Solovay-Kitaev Thm.

Exercise #4

Q. If we have a quantum circuit for

can we make ?

Exercise #4

Q. If we have a quantum circuit for

can we make ?

A. Yes, like this:

By universality, this canbe decomposed into2-qubit gates.

Simulating Classical Circuits

● We have not shown that quantum computers are even as powerful as classical computers!

● Standard classical logic gates are not unitary.

● Universal classical logic can be done reversibly.

[C. Bennett. IBM J. Research and Dev. 17:525, 1973]

The Toffoli Gate is Universal

AND:

Proof:

NOT:

Reversible Subroutines

● Suppose can be computed by a classical circuit of G elementary gates such as {NOT, AND, OR}.

● Then we can construct a quantum circuit of O(G) elementary gates implementing:

● Work qubits are called “ancillas”.

Reversible Subroutines

● Suppose can be computed by a classical circuit of G elementary gates such as {NOT, AND, OR}.

● Then we can construct a quantum circuit of O(G) elementary gates implementing:

● Work qubits are called “ancillas”.

Can do bitwise addition mod 2 oraddition mod .

Phase Kickback

Let

Then:

and

Phase Kickback

Let

Then:

and

So:

Simulating Diagonal Hamiltonians

● Suppose H is diagonal and time-independent:

● The solution to Schrodinger's equation is:

Simulating Diagonal Hamiltonians● The solution to Schrodinger's equation is:

● More generally:

● Use phase kickback:

Simulating Diagonal Hamiltonians● The solution to Schrodinger's equation is:

● More generally:

● Use phase kickback:

State Preparation

Q. How do we make ?

A1. Invoke gate universality.

is an m-qubit state:

Kicked-back phase has m bits of precision.

Logarithmic m is good enough. Exponentially-scalinguniversal construction is ok.

State Preparation

Q. How do we make ?

A2. Use a quantum Fourier transform.

Speed: (overkill)

Simulating Hamiltonian Dynamics

Undergraduate Quantum Mechanics doesn't look much like our gate model.

1) Specify a Hamiltonian H.2) Specify an initial state .3) Solve:

Can quantum circuits simulate this efficiently for all physically realistic H?

Simulating Chemistry

We can store the wavefunction using qubitsif we suitably discretize the particle coordinates:

Suppose we have n particles. (Nuclei + electrons).We'll neglect spin for now.

Our main task is to simulate Schrodingertime-evolution:

Simulating Chemistry

Goal: Construct a quantum circuit for , where:

Main trick: Trotter's formula

Simulating Chemistry

By Trotter's formula, our task reduces to simulating

and where:

Observation 1: V is diagonal in the position basis.We have chosen the position basis to correspondto the computational basis. Hence we can simulate by reversible computing and phase kickback.

Simulating Chemistry

Observation 2: T is diagonal in the momentum basis:

Thus:

where D is a diagonal matrix easily implemented byreversible computing and phase kickback.

Simulating Chemistry

n times

For large n, this approximates:

Simulating Chemistry

n times

For large n, this approximates:

Polynomial complexity: (uses quantum gates

Simulating Chemistry

n times

For large n, this approximates:

state preparation measurement

Some Measurements

The most obvious choice is to measure in thecomputational basis. This lets us sample from:

We could also apply quantum Fourier transformsto each coordinate, and then measure in thecomputational basis. We thereby sample fromthe momentum-space distribution.

Phase Estimation

Often we wish to measure in the eigenbasis of anobservable such as energy. We can do this usingKitaev's phase estimation algorithm.

Phase Estimation

Often we wish to measure in the eigenbasis of anobservable such as energy. We can do this usingKitaev's phase estimation algorithm.

Suppose

Phase Estimation

Often we wish to measure in the eigenbasis of anobservable such as energy. We can do this usingKitaev's phase estimation algorithm.

Suppose

Phase Estimation

Often we wish to measure in the eigenbasis of anobservable such as energy. We can do this usingKitaev's phase estimation algorithm.

Suppose

Phase Estimation

Often we wish to measure in the eigenbasis of anobservable such as energy. We can do this usingKitaev's phase estimation algorithm.

A superposition

yields with probability

Exercise #7

Q. Given that we know how to implement , how do we implement

?

Exercise #7

Q. Given that we know how to implement , how do we implement

?

A. Use place-value.

Exercise #8

Q. How do we make ?

Exercise #8

Q. How do we make ?

A1. Apply a quantum Fourier transform to

Exercise #8

Q. How do we make ?

A1. Apply a quantum Fourier transform to

A2.

so start with and apply H to each qubit.

Recall:

Simulating Spin Systems

Example Hamiltonian:

General Trotter Formula:

Individual factors such as can be simulatedby invoking gate universality.

Simulating Spin Systems

Example Hamiltonian:

General Trotter Formula:

Individual factors such as can be simulatedby invoking gate universality.

Polynomial complexity:

quantum gates.

Bosons and Fermions

I have discussed simulation in first-quantized formalism.

In this case, fermionic or bosonic statistics are a problemfor the state-generation stage. You can construct(anti-)symmetrized states efficiently using:

Sometimes second-quantized representation is moreefficient. In that case, you can efficiently simulate the(anti-)commuting creation and annihilation operators using:

[D. Abrams and S. Lloyd, Phys. Rev. Lett. 79:2586, 1997]

[S. Bravyi and A. Kitaev, Ann. Phys. 298:210, 2002]

Summary

● The quantum circuit model is made by the composition of “gates”: unitary transformations acting on a constant number of qubits.

● We can make any unitary transformation on n qubits by composition sufficiently many gates.

● This seemingly limited model seems to capture all dynamics achievable in laboratories – that is, all other systems can be simulated with polynomial overhead.

● Henceforth quantum circuits will be our working definition of quantum computers.

Building Blocks

● Gate universality● Controlled-unitaries● Reversible computing● Phase kickback● Phase estimation

Further References

● Kuperberg's Sieve for Dihedral HSP[G. Kuperberg, SIAM J. Comp., 35(1):170, 2005]

● Ambainis' Algorithm for Element Distinctness[A. Ambainis, SIAM J. Comp., 37:210, 2007]

● Adiabatic Optimization Algorithms

[E. Farhi et al. Science, 292(5516):472, 2001]● Span Programs and Learning Graphs

[B. Reichardt and R. Spalek, Theor. Comp., 8:291, 2012][A. Belovs, arXiv:1105.4024, 2011]