C/CS/Phys C191 Grover s Quantum Search Algorithm 11/06/07 Fall 2007 Lecture 21

Similar documents
α x x 0 α x x f(x) α x x α x ( 1) f(x) x f(x) x f(x) α x = α x x 2

Quantum Computing Lecture 6. Quantum Search

C/CS/Phys C191 Amplitude Amplification, Quantum Zeno, Vaidman s bomb 11/10/09 Fall 2009 Lecture 22

6.896 Quantum Complexity Theory October 2, Lecture 9

Quantum Searching. Robert-Jan Slager and Thomas Beuman. 24 november 2009

LECTURE NOTES ON QUANTUM COMPUTATION. Cornell University, Physics , CS 483; Spring, 2005 c 2006, N. David Mermin

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

Introduction to Quantum Computing

Introduction The Search Algorithm Grovers Algorithm References. Grovers Algorithm. Quantum Parallelism. Joseph Spring.

Quantum Information Processing and Diagrams of States

Quantum Circuits and Algorithms

Chapter 10. Quantum algorithms

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

C/CS/Phys 191 Quantum Gates and Universality 9/22/05 Fall 2005 Lecture 8. a b b d. w. Therefore, U preserves norms and angles (up to sign).

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

Complex numbers: a quick review. Chapter 10. Quantum algorithms. Definition: where i = 1. Polar form of z = a + b i is z = re iθ, where

Bounds for Error Reduction with Few Quantum Queries

Lecture 4: Elementary Quantum Algorithms

Richard Cleve David R. Cheriton School of Computer Science Institute for Quantum Computing University of Waterloo

Quantum algorithms. Andrew Childs. Institute for Quantum Computing University of Waterloo

1 Readings. 2 Unitary Operators. C/CS/Phys C191 Unitaries and Quantum Gates 9/22/09 Fall 2009 Lecture 8

QUANTUM COMPUTATION. Lecture notes. Ashley Montanaro, University of Bristol 1 Introduction 2

Lecture 12: Grover s Algorithm

Introduction to Quantum Computing

Quantum Permanent Compromise Attack to Blum-Micali Pseudorandom Generator

Quantum algorithms for testing Boolean functions

Short introduction to Quantum Computing

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

C/CS/Phys 191 Shor s order (period) finding algorithm and factoring 11/01/05 Fall 2005 Lecture 19

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

Lecture 3: Constructing a Quantum Model

Introduction to Quantum Algorithms Part I: Quantum Gates and Simon s Algorithm

Introduction to Quantum Computing

Lecture 10: Eigenvalue Estimation

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

Quantum Algorithms Lecture #2. Stephen Jordan

Quantum Computation. Michael A. Nielsen. University of Queensland

Simulation of quantum computers with probabilistic models

Concepts and Algorithms of Scientific and Visual Computing Advanced Computation Models. CS448J, Autumn 2015, Stanford University Dominik L.

Quantum algorithms (CO 781, Winter 2008) Prof. Andrew Childs, University of Waterloo LECTURE 11: From random walk to quantum walk

arxiv:quant-ph/ Sep 2001

Deleting a marked state in quantum database in a duality computing mode

Introduction to Quantum Information Processing

Quantum Algorithms. Andreas Klappenecker Texas A&M University. Lecture notes of a course given in Spring Preliminary draft.

arxiv:quant-ph/ v1 15 Mar 2006

Database Manipulation Operations on Quantum Systems

C/CS/Phy191 Problem Set 6 Solutions 3/23/05

ADVANCED QUANTUM INFORMATION THEORY

Quantum computers can search arbitrarily large databases by a single query

Lecture note 8: Quantum Algorithms

C/CS/Phys C191 Quantum Gates, Universality and Solovay-Kitaev 9/25/07 Fall 2007 Lecture 9

Lecture 2: From Classical to Quantum Model of Computation

An Introduction to Quantum Information and Applications

6.896 Quantum Complexity Theory September 18, Lecture 5

An Improved Phase Error Tolerance in a Quantum Search Algorithm

Fourier Sampling & Simon s Algorithm

A High Level Programming Language for Quantum Computing

arxiv:quant-ph/ v1 16 Jan 2003

Quantum walk algorithms

Lecture 13: Lower Bounds using the Adversary Method. 2 The Super-Basic Adversary Method [Amb02]

Hilbert Space, Entanglement, Quantum Gates, Bell States, Superdense Coding.

Quantum Computing: Foundations to Frontier Fall Lecture 3

Quantum Search on Strongly Regular Graphs

Tutorial on Quantum Computing. Vwani P. Roychowdhury. Lecture 1: Introduction

Quantum parity algorithms as oracle calls, and application in Grover Database search

Quadratic speedup for unstructured search - Grover s Al-

arxiv:quant-ph/ v1 23 May 1996

An improved phase error tolerance in quantum search algorithm

A Glimpse of Quantum Computation

arxiv: v1 [quant-ph] 16 Aug 2017

A fast quantum mechanical algorithm for estimating the median

Lecture 1: Overview of quantum information

Quantum Computing. 6. Quantum Computer Architecture 7. Quantum Computers and Complexity

Is Quantum Search Practical?

THE GENERALIZED QUANTUM DATABASE SEARCH ALGORITHM

Quantum Communication Complexity

Introduction to Quantum Logic. Chris Heunen

Discrete quantum random walks

Factoring on a Quantum Computer

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

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

*WILEY- Quantum Computing. Joachim Stolze and Dieter Suter. A Short Course from Theory to Experiment. WILEY-VCH Verlag GmbH & Co.

Quantum Counting. 1 Introduction. Gilles Brassard 1, Peter Høyer 2, and Alain Tapp 1

Extended Superposed Quantum State Initialization Using Disjoint Prime Implicants

arxiv: v1 [quant-ph] 15 Nov 2018

Hypothesis elimination on a quantum computer

Unitary Dynamics and Quantum Circuits

A New Lower Bound Technique for Quantum Circuits without Ancillæ

Quantum Computation and Communication

Quantum Computing Lecture 2. Review of Linear Algebra

Quantum search in a four-complex-dimensional subspace

A Quantum Associative Memory Based on Grover s Algorithm

The Bloch Sphere. Ian Glendinning. February 16, QIA Meeting, TechGate 1 Ian Glendinning / February 16, 2005

Geometric Modeling Summer Semester 2010 Mathematical Tools (1)

ROM-BASED COMPUTATION: QUANTUM VERSUS CLASSICAL

Chapter 2. Basic Principles of Quantum mechanics

A better lower bound for quantum algorithms searching an ordered list

Quantum Computing. Joachim Stolze and Dieter Suter. A Short Course from Theory to Experiment. WILEY-VCH Verlag GmbH & Co. KGaA

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

18.303: Introduction to Green s functions and operator inverses

Transcription:

C/CS/Phys C191 Grover s Quantum Search Algorithm 11/06/07 Fall 2007 Lecture 21 1 Readings Benenti et al, Ch 310 Stolze and Suter, Quantum Computing, Ch 84 ielsen and Chuang, Quantum Computation and Quantum Information, Ch 6 Literature: Grover, quant-ph/9605043, quant-ph/9706033; diffusion transform and other motivations from physics, quant-ph/0109116 2 Introduction The problem is to search for an item in an unstructured database For eample, suppose you are given a telephone number in LA and need to find out who it belongs to You will have to go through all the phone numbers and check the names of the registered owners in each case Searching an item in an unsorted database with size costs a classical computer O() running time, since on average /2 entries need to be checked Can a quantum computer search for a needle in a haystack much more efficiently than its classical counterpart? Grover, in 1996, affirmatively answered this question by proposing a search algorithm that consults the database only O( ) times In contrast to algorithms based on the quantum Fourier transform, with eponential speedups, the search algorithm only provides a quadratic improvement However, the algorithm is quite important because it has broad applications, and because the same technique can in principle be used to improve solutions of P-complete problems One might think of having better improvements over the search algorithm However, it turns out that Grover s search algorithm is optimal At least Ω( ) queries are needed to solve the problem Grover s algorithm uses parallelism and amplitude amplification We will discuss the amplitude amplification aspect in detail in the net lecture In the current lecture we will present a geometrical analysis of the quantum search algorithm 21 The quantum oracle Here s the search problem: You are given a boolean function f : {1,, } {0, 1}, and are promised that for eactly one a {1,,}, f(a) = 1 Think of this as a table of size, where eactly one element has value 1, and all the others are 0 f is effectively an oracle that can check/recognize the solution when this is given it as input So f acts like a detector of the target solution In the current analysis we shall assume that there is only 1 solution, but the arguments can be generalized to a finite number of solutions We construct a two register state, with the database register first and the oracle register second Then our oracle acts as follows (cf the Deutsch-Jozsa algorithm) O q = q f(), where we assume f can be computed classically in polynomial time Then we can also apply the oracle with C/CS/Phys C191, Fall 2007, Lecture 21 1

1 the database register in superposition: and α 0 α f() 2 with the oracle register in superposition: ( ) 0 α 1 2 ( ) f() f() α 2 ( ) = α f() f() 2 = α ( 1) f() ( 0 1 2 ) Here f() means the binary complement of f(), ie, if f() = 1, then f() = 0 ote that we have used the same phase kick-back as in Deutsch-Jozsa to go from lines 2 to 3 (Check: if f() = 0 the oracle qubit is 0 1 = ( 1) f(0) ( ) 0 1, while if f() = 1 the oracle qubit is 1 0 = ( 1) f(1) ( ) 0 1 ) So the oracle marks the solutions to the search problem by a minus sign, ie, by a phase (note, no measurement) While it is quite sloppy, we will follow many authors and summarize the action of the oracle on an arbitrary state ν = α as O ν ( 1) f() α, where we have omitted the oracle register on both sides of the equation because it is in the same state But don t forget that the oracle register is essential for this action of O on the database register to be realized! 22 Geometric analysis of search Grover s algorithm finds a in O( ) steps Consider the two dimensional subspace that consists of two states: a and the uniform superposition ψ 0 = 1 Let θ be the angle between ψ 0 and e, where e is the vector that is orthogonal to a (in the direction of ψ 0 ) in this subspace See Figure 1 a is the target and we can regard ψ 0 as the least biased initial state So we want to increase θ to go from ψ 0 to a How do we accomplish this? One way to rotate a vector is to make two reflections In particular, we can rotate a vector v by 2θ to the new vector v1 by first reflecting about e and then reflecting about ψ 0 This transformation is also illustrated in Figure 1 The first reflection transforms an arbitrary vector v to v2 and the second reflection transforms v2 to v1 C/CS/Phys C191, Fall 2007, Lecture 21 2

Figure 1: To rotate v by 2θ to v1, we reflect around e, reaching v2, and then reflect around ψ 0 Each step of our algorithm is thus a rotation by 2θ (we discuss the implementation of the two rotations involved in a step below) This means that we need at most π/2 2θ iterations for the algorithm to complete ow, what is θ? ψ 0 a = cos(π/2 θ) = sin(θ) but ψ 0 a = 1 a 1 = δ a = 1 Then since sin θ θ, we know that θ 1 Thus, we need O( )=O( ) iterations for the algorithm 2/ () to complete In the end, we get very close to a, and then with high probability, a measurement of the state in the computational basis (all qubits) yields a ote that one must not iterate beyond this point Subsequent iterations will rotate the vector v away from a again For large, we need to iterate r = π /4 times and the corresponding probability of error is O(1 cos 2 θ) = O(sin 2 θ) = O( 1 ) How do we implement the two reflections? 1 Reflection about e is easy e is the vector orthogonal to a so all we need to do is flip the phase of the component of the database wavefunction in the direction of a, ie, we send any component π/2 C/CS/Phys C191, Fall 2007, Lecture 21 3

a to a and leave all other components as is To accomplish this, we just act with the oracle: O v = ( 1) f() α α αa a = a = α 2αa a Ô a = Î 2 a a = R e The notation R e means a reflection about the vector e 2 What about the reflection about ψ 0? This uniform superposition state is just the zero vector from the computational basis transformed to the Hadamard basisso we first apply H 2 n, which maps ψ 0 000, then reflect around 00 0, and finally, apply H2 n to return to the original basis The reflection about the zero vector in the computation basis can easily be seen to be given by O 0 = I + 2 0 0 using similar analysis to that above for reflection about e The overall reflection about ψ 0 is then given by the product of the three transformations: D = (H n ) [ I + 2 0 0 ]H n = I + 2 ψ 0 ψ0 = R ψ0 where we have used the fact that H is self-adjoint (H = H ) and that ψ 0 = H n 0 This operator is referred to as the diffusion operator for reasons that will be eplained below To make one iteration step we combine the two reflections, yielding the Grover operator G = DO a = R ψ0 R a We apply this Grover operator O( ) times to rotate from ψ 0 to a otice the difference between the two reflections which arises from the fact that we have written one in terms of the vector about which we reflect (R ψ0 ) and the other in terms of the vector perpendicular to the vector about which we reflect (R a ) What about efficiency of implementation? Observe that D is epressed as the product of three unitary matrices: two Hadamard matrices separated by a conditional phase shift matri (minus one times a diagonal matri with values everywhere one ecept for the uniform superposition state when the value gains a relative phase shift e iπ ) Therefore, D is also unitary Regarding the implementation, both the Hadamard and the conditional phase shift transforms can be efficiently realized within O(n) gates 3 Amplitude amplification in Grover search The Diffusion operator D has two properties: C/CS/Phys C191, Fall 2007, Lecture 21 4

1 It is unitary and can be efficiently realized 2 It can be seen as an inversion about the mean We discussed the first property above We now analyze the second property For = 2 n, we can eplicitly evaluate D = I + 2 ψ 0 ψ0 = (H n ) [ I + 2 0 0 ]H n as: D +1 0 0 0 1 0 = H H 0 0 1 +2 0 0 0 0 0 = H + I H 0 0 0 +2 0 0 0 0 0 = H H I 0 0 0 2/ 2/ 2/ 2/ 2/ 2/ = I 2/ 2/ 2/ +2/ 1 +2/ +2/ +2/ +2/ 1 +2/ = +2/ +2/ +2/ 1 The indeing here is such that the first state (top left hand corner of the matrices) is the uniform superposition state ψ 0 Recall that the central matri in D is a conditional phase shift matri, ie, it puts a phase shift in front of all states ecept the target ow for large, the matri D has diagonal elements appro equal to (1 2/) and very small, positive and constant off-diagonal elements (2/) So in each step the amplitude of every basis state contributes by a small amount to all other basis states This is a generalization of the phenomenon of diffusion on a lattice Consider the action of D on a vector α to generate another vector β : C/CS/Phys C191, Fall 2007, Lecture 21 5

Figure 2: Inversion of amplitudes α i about their mean value µ D α 1 α i α = β 1 β i β Define µ = i α i / as the mean amplitude Then β i = 2 j α j α i = 2(µ α i ) = µ +(µ α i ) which corresponds to a reflection of α i about the mean value µ This is illustrated in Figure 1 below (note that if we start from the uniform superposition, the non-target states will have equal amplitude, we have just illustrated the principle for a general state here) Thus, the amplitude of β i = 2 j α j α i = 2µ α i can be considered an inversion about the mean with respect to α i ow if we first change the sign of the amplitude of the target state, by applying the oracle as in the previous lecture, the target state is now significantly further away from the mean The inversion about the mean further amplifies this, as shown in Figure 2 below This shows how quantum search algorithm iteratively improves the probability of measuring a solution by increasing the component of the target state at each iteration The overall procedure is summarized as follows 1 Start state is ψ 0 = 1 2 Invert the phase of a using f 3 Then invert about the mean using D C/CS/Phys C191, Fall 2007, Lecture 21 6

Figure 3: Application of oracle to invert sign of target state followed by Inversion of amplitudes α i about their mean value µ gives rise to amplification of the target component C/CS/Phys C191, Fall 2007, Lecture 21 7

Figure 4: The first three steps of Grover s algorithm We start with a uniform superposition of all basis vectors in the top panel In the middle panel we have used the function f to invert the phase of α k After running the diffusion operator D in the bottom panel, we have amplified α k while decreasing all other amplitudes C/CS/Phys C191, Fall 2007, Lecture 21 8

4 Repeat steps 2 and 3 O( ) times, so in each iteration α a increases by 2 Suppose we just want to find a with probability 1 2 Until this point, the rest of the basis vectors will have 1 amplitude at least 2 2 In each iteration of the algorithm, α a increases by at least 2 2 = Eventually, α a = 1 2 The number of iterations to get to this α a is C/CS/Phys C191, Fall 2007, Lecture 21 9