Phase estimation. p. 1/24

Similar documents
Shor s Prime Factorization Algorithm

Ph 219b/CS 219b. Exercises Due: Wednesday 4 December 2013

Figure 1: Circuit for Simon s Algorithm. The above circuit corresponds to the following sequence of transformations.

Shor s Algorithm. Elisa Bäumer, Jan-Grimo Sobez, Stefan Tessarini May 15, 2015

Shor Factorization Algorithm

Ph 219b/CS 219b. Exercises Due: Wednesday 11 February 2009

Math Lecture 23 Notes

Introduction to Quantum Information Processing QIC 710 / CS 768 / PH 767 / CO 681 / AM 871

Classical RSA algorithm

Lecture 10: Eigenvalue Estimation

3 Finite continued fractions

Introduction to Quantum Information Processing CS 467 / CS 667 Phys 667 / Phys 767 C&O 481 / C&O 681

Quantum computing. Shor s factoring algorithm. Dimitri Petritis. UFR de mathématiques Université de Rennes CNRS (UMR 6625) Rennes, 30 novembre 2018

Quantum algorithms (CO 781, Winter 2008) Prof. Andrew Childs, University of Waterloo LECTURE 1: Quantum circuits and the abelian QFT

Quantum Phase Estimation using Multivalued Logic

Ph 219b/CS 219b. Exercises Due: Wednesday 22 February 2006

Partial Fractions. June 27, In this section, we will learn to integrate another class of functions: the rational functions.

QFT, Period Finding & Shor s Algorithm

The Postulates of Quantum Mechanics Common operators in QM: Potential Energy. Often depends on position operator: Kinetic Energy 1-D case: 3-D case

1 Continued Fractions

Rotations in Quantum Mechanics

MATH 2400 LECTURE NOTES: POLYNOMIAL AND RATIONAL FUNCTIONS. Contents 1. Polynomial Functions 1 2. Rational Functions 6

Logic gates. Quantum logic gates. α β 0 1 X = 1 0. Quantum NOT gate (X gate) Classical NOT gate NOT A. Matrix form representation

The Schrodinger Equation and Postulates Common operators in QM: Potential Energy. Often depends on position operator: Kinetic Energy 1-D case:

Lecture 9: Phase Estimation

Quantum Computing Lecture 6. Quantum Search

Math /Foundations of Algebra/Fall 2017 Foundations of the Foundations: Proofs

Cool Results on Primes

Short Course in Quantum Information Lecture 5

QUANTUM PHASE ESTIMATION WITH ARBITRARY CONSTANT-PRECISION PHASE SHIFT OPERATORS

Chapter 2. Limits and Continuity 2.6 Limits Involving Infinity; Asymptotes of Graphs

Shor s Quantum Factorization Algorithm

2. As we shall see, we choose to write in terms of σ x because ( X ) 2 = σ 2 x.

Introduction to Quantum Computing

Math 425 Fall All About Zero

22. The Quadratic Sieve and Elliptic Curves. 22.a The Quadratic Sieve

Lecture 3: Constructing a Quantum Model

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Quantum algorithms (CO 781/CS 867/QIC 823, Winter 2013) Andrew Childs, University of Waterloo LECTURE 13: Query complexity and the polynomial method

#26: Number Theory, Part I: Divisibility

Quantum Computers. Peter Shor MIT

Lecture 4: Elementary Quantum Algorithms

The Euclidean Algorithm and Multiplicative Inverses

arxiv:quant-ph/ v1 15 Jan 2006

A Gentle Introduction to Quantum Computing

Lecture 1: Introduction to Quantum Computing

Simplifying Rational Expressions and Functions

PRIME NUMBERS YANKI LEKILI

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER /2018

Ph 219b/CS 219b. Exercises Due: Wednesday 20 November 2013

More advanced codes 0 1 ( , 1 1 (

1 Overview and revision

Quantum Computing: Foundations to Frontier Fall Lecture 3

Q: How can quantum computers break ecryption?

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

6.2 Their Derivatives

Chapter 20. Countability The rationals and the reals. This chapter covers infinite sets and countability.

First, let's review classical factoring algorithm (again, we will factor N=15 but pick different number)

Chapter Five Notes N P U2C5

1 Measurement and expectation values

Chapter 1 A Survey of Divisibility 14

Grade 7/8 Math Circles. Continued Fractions

Lecture 2: From Classical to Quantum Model of Computation

Solutions to the Midterm Test (March 5, 2011)

Quantum measurements and the Abelian Stabilizer Problem

b) (5 points) Give a simple quantum circuit that transforms the state

Commutative Rings and Fields

Algorithms in the Quantum Computing Framework

Quadratic Equations Part I

arxiv: v2 [quant-ph] 1 Aug 2017

Grade 8 Chapter 7: Rational and Irrational Numbers

Number theory (Chapter 4)

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

You separate binary numbers into columns in a similar fashion. 2 5 = 32

MATH10040 Chapter 1: Integers and divisibility

The Stern-Gerlach experiment and spin

Factoring. there exists some 1 i < j l such that x i x j (mod p). (1) p gcd(x i x j, n).

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

Factoring integers with a quantum computer

Grover s algorithm. We want to find aa. Search in an unordered database. QC oracle (as usual) Usual trick

CPSC 467: Cryptography and Computer Security

Review Sheet for the Final Exam of MATH Fall 2009

QUANTUM COMPUTATION. Exercise sheet 1. Ashley Montanaro, University of Bristol H Z U = 1 2

Quantitative Aptitude

Compute the Fourier transform on the first register to get x {0,1} n x 0.

Quantum Computing Lecture Notes, Extra Chapter. Hidden Subgroup Problem

Mathematics 242 Principles of Analysis Solutions for Problem Set 5 Due: March 15, 2013

A group of figures, representing a number, is called a numeral. Numbers are divided into the following types.

not to be republished NCERT REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results

Big-oh stuff. You should know this definition by heart and be able to give it,

Section 2.5 : The Completeness Axiom in R

Quantum Gates, Circuits & Teleportation

Day 6: 6.4 Solving Polynomial Equations Warm Up: Factor. 1. x 2-2x x 2-9x x 2 + 6x + 5

Brief review of Quantum Mechanics (QM)

10 Concrete candidates for public key crypto

Introduction to Techniques for Counting

Ch. 12 Rational Functions

CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010

Dividing Polynomials: Remainder and Factor Theorems

Fourier Sampling & Simon s Algorithm

Transcription:

p. 1/24 Phase estimation Last time we saw how the quantum Fourier transform made it possible to find the period of a function by repeated measurements and the greatest common divisor (GCD) algorithm. We will now look at this same problem again, but using the QFT in a more sophisticated way: by Kitaev s phase estimation algorithm. By itself, the phase estimation algorithm is a solution to a rather artificial problem. But this solution turns out to be useful as a piece of several other algorithms, to solve much more natural and important problems. Suppose we are given a unitary operator Û on n q-bits, which has a known eigenstate u with an unknown eigenvalue exp(2πiφ). We wish to find the phase φ with some precision (say, m bits).

p. 2/24 Not Global Phase The first thing we might try is to prepare n q-bits in the state u, and carry out the unitary transformation Û on them: Is there a measurement on the bits which will give us information about the phase φ? The answer, of course, is no: Û just produces an overall phase on the state, with no observable consequences.

p. 3/24 Expectation Value Here is a more sophisticated approach to the problem. Suppose we perform the following circuit: Instead of performing the operation Û, we do a controlled- Û, and then measure the control bit. We can find that the expectation of Ẑ on the control bit is Ẑ = u (Û +Û ) u /2 = 1 2 ( e 2πiφ +e 2πiφ) = cos(2πφ).

p. 4/24 The n bits are left in state u, so we can perform this circuit N times with different control bits and get an estimate of cos(2πφ) with an accuracy of roughly 1/ N. By starting the control bit in state 1, we can get a similar estimate of sin(2πφ). Unfortunately, the convergence of this algorithm is very slow. To estimate φ with m bits of accuracy requires 1/ N 2 m, so the circuit would have to be repeated O(2 2m ) times. In fact, for some problems we can t do much better than that. But with a few extra assumptions, we can improve performance enormously.

p. 5/24 Exact Estimation The main assumption is that we can not only do controlled- Û efficiently, we can also do controlled-û2, controlled-û4, and so on, up to controlled-û2t 1. We might, e.g., have t different oracles that perform these operations. We can then carry out this circuit: After this circuit, the n target bits are still left in the state u, and the t control bits are left in the state 2 t/2( 0 +e 2πiφ 1 ) ( 0 +e 4πiφ 1 ) ( ) 0 +e 2tπiφ 1.

p. 6/24 Now that we have prepared this state, what do we do with it? Let us suppose that there is an exact t-bit expression for the phase, φ = 0.φ 1 φ 2...φ t. Then, e 2πiφ = e 2πi0.φ 1...φ t. e 4πiφ = e 2πiφ 1.φ 2...φ t = e 2πiφ 1+2πi0.φ 2...φ t = e 2πi0.φ 2...φ t. e 2j πiφ = e 2πi0.φ j...φ t. The state of the control bits can be written 2 t/2( 0 +e 2πi0.φ 1...φ t 1 ) ( 0 +e 2πi0.φ t 1 ), which is the Fourier transform of the basis state φ 1 φ t = 2 t φ!

p. 7/24 Rewriting our expression for the state of the t control bits, we get 1 2 t 2 t 1 j=0 e 2πiφj j. This has the form of a Fourier-transformed state. Applying the inverse Fourier transform, we get Ψ 2 t φ. If φ has an exact t-bit expression, then this estimate will also be exact. If not, it will be quite close. How close is quite close? We want the probability to measure a number significantly different from 2 t φ to be small.

p. 8/24 Error Bounds Let 2 t φ be the correct number, and 2 t φ the number that is actually measured. Define a to be our desired accuracy bound (i.e., we want 2 t φ φ a). It is not difficult to show that the probability of being outside this bound is p(2 t φ φ 1 > a) 2(a 1). This implies that if we want an accuracy of at least m bits with probability at least (1 ǫ) we need to use t control bits with ( ) t = m+log 1+ 1 2ǫ where we round this down to the next lowest integer.,

p. 9/24 We now see the complete phase estimation procedure: 1. Prepare the t-bit control register in state 0, and the n-bit target register in state u. 2. Perform Hadamards on the control bits. 3. Do a controlled-û2j from the jth control bit onto the n target bits for each of the control q-bits in succession. 4. Do an inverse Fourier transform on the t control bits, and measure them in the computational basis. The measured bit values φ 1,...,φ t give an estimate of the phase φ 0.φ 1...φ t.

p. 10/24 Costs and assumptions Assuming that the controlled-û2j unitaries are given by oracles (and hence free), the complexity of this algorithm is basically that of the inverse Fourier transform, O(t 2 ). If, though, we have to perform circuits for the controlled- Û unitaries, they will tend to dominate the complexity. Even if we have an efficient circuit for controlled-û, we need efficient circuits for all the gates as controlled-û2j well; just repeating the controlled-û 2j times will make the complexity exponential.

p. 11/24 There is another somewhat artificial assumption as well. It is assumed that we don t know the eigenvalue e 2πiφ, but that we can prepare the eigenvector u. While this may sometimes be true, in most cases it will not be. In spite of these limitations, phase estimation is at the heart of many other quantum algorithms! We design our procedures to work around these assumptions, or to render them unnecessary.

p. 12/24 Period-finding: Take 2 Now let s look again at our problem from last time: finding the period of a periodic function. Recall that the first steps of this algorithm involved preparing an input and output register in the state 1 2 n 2 n 1 x=0 x f(x). Last time, we applied a Fourier transform to the input register, and then measured it; we will now analyze an almost identical procedure in a somewhat different way.

p. 13/24 First, we define the inverse Fourier transform state f(l) = 1 r 1 r x=0 e 2πilx/r f(x), where r is the (unknown) period of f(x). We can invert this expression to get f(x) = 1 r 1 r l=0 e 2πilx/r f(l), which we will substitute for f(x) in the initial state.

p. 14/24 The initial state then becomes 1 2 n 2 n 1 x f(x) 1 r2 n r 1 2 n 1 e 2πilx/r x f(l), x=0 l=0 x=0 where the approximation is necessary when 2 n is not an exact multiple of r (which it generally won t be). However, the same bounds on accuracy that we deduced for phase-estimation work here, as well; so it doesn t matter that 2 n is not a multiple of r so long as n is big enough. The first register has the form of a Fourier-transformed state; we can apply the inverse Fourier transform to it.

p. 15/24 The inverse Fourier transform on the first register yields 1 r 1 r l=0 2 n l/r f(l). If we measure the first register, we will get 2 n l/r for some value of l, chosen at random from 0,...,r 1. Last time we used Euclid s GCD algorithm to find the period r, but we didn t determine its accuracy in the case when 2 n /r was not a whole number. We will look at another, more direct way of extracting the period in a moment. First, let s see the connection between period-finding and phase estimation.

p. 16/24 The shift operator Let Û be the unitary transformation that translates the argument of f(x) by one: Û f(x) = f(x+1mod2 n ). If the range of f(x) doesn t include all numbers from 0 to 2 m 1, we define the action of Û on any numbers not in the range in such a way as to make Û unitary. For example, we could leave the numbers not in the range of f(x) unchanged this makes Û a permutation, and hence unitary. We can now rewrite the transformation x 0 x f(x) in terms of controlled-û operations, as follows:

p. 17/24 1. Shift the output register to f(0). 2. Apply a controlled-û operation from the least significant bit of the input register to the output register: x f(0) x f(x 0 ). 3. Apply a controlled-û2 operation from the second bit: x f(x 0 ) x f(2x 1 +x 0 ). 4. Successively apply controlled-û2j from bits j = 2,...,n 1. The final state is x f(2 n 1 x n 1 + +x 0 ) x f(x).

p. 18/24 This has the form of the phase-estimation circuit, except that in phase estimation the output register is prepared in an eigenstate u of Û. What are the eigenstates of Û? It is easy to check that they are in fact the states f(l) that we introduced before, with eigenvalues Û f(l) = e 2πil/r f(l). Since we don t know the value r, we can t actually prepare the second register in the state f(l). But in fact, this doesn t matter for the purposes of period finding!

p. 19/24 By preparing the register in state 0 (or f(0) ), we are actually preparing a superposition of all eigenstates f(l). When we make the final meaurement, one of these states is picked out at random; but our ability to solve the problem won t depend on which l is selected, as we will see below. Note also that for this problem, the ability to efficiently perform x 0 x f(x) implies the ability to efficiently perform the controlled-û2j transformation for any j. So that seemingly very strong assumption is true in this case.

p. 20/24 The continued fraction algorithm We will now see a different way of extracting the period r from an approximate expression for 2 n l/r, that gives an n-bit approximation to the fraction l/r. If we had an expression for l/r as a fraction in its most reduced form, then the denominator of the fraction would be r, except in the improbable event that l and r shared a common factor. (It is easy to check that the denominator really is the period just by computing some values of f(x+kr) for various x and k. If it is not, we run the program to get a new value of l and check again.) We would like to find the fraction which is closest to our n-bit expression, and check if its denominator is the period. We do this using continued fractions.

p. 21/24 Continued fractions are expressions of the form [a 0,...,a M ] a 0 + 1 a 1 + 1 a 2 + 1 + 1 a M, where a 0,...,a M are integers. Any rational number can be put in this form with some finite set of a j. Irrational numbers can also be expressed in this form; however, their expansion is infinite. Suppose we truncate the series [a 0,...,a M ] at a point m < M. This smaller continued fraction [a 0,...,a m ] is an approximation to the full fraction, called the mth convergent of the fraction. The convergents are the best fractional approximations to any number.

p. 22/24 The utility of the continued fraction approach comes from the following theorem. Suppose that φ is the n-bit approximate result from our measurement, and l/r is the true fraction we are trying to find. If l r φ 1 2r 2, then l/r is a convergent of the continued fraction for φ. We construct the continued fraction in a series of steps. Let φ = 0.φ 1...φ n. Then we start with φ = 1 = 1 1 1/φ. 0.φ 1...φ n

p. 23/24 We let a 1 be the integer part of 1/φ, and f 1 be the remaining fractional part: 1/φ = a 1 +f 1. Then φ = 1 a 1 +f 1 = 1 a 1 + 1 1/f 1. We similarly define a 2 to be the integer part of 1/f 1 and f 2 to be the remaining fractional part, and get the fraction φ = 1 a 1 + 1 a 2 +f 2 = 1, 1 a 1 + a 2 + 1 1/f 2 and continue on in the same manner for as many steps as necessary.

p. 24/24 We get the mth convergent by setting f m to zero and reducing the fraction to its simplest form. As we go through this proceduce, we check the denominator of each convergent to see if it is the period of the function. In fact, Euclid s algorithm is closely related to the continued fraction approach. At each step in the procedure, we divide one number by another and get the remainder. The successive quotients form a continued fraction expansion for the original fraction p/q. Next time: the factoring algorithm.