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

Similar documents
Chapter 10. Quantum algorithms

Introduction to Quantum Computing

Introduction to Quantum Computing

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

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

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

Introduction to Quantum Computing

Introduction to Quantum Information Processing

Lecture 22: Quantum computational complexity

Lecture 3: Constructing a Quantum Model

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

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).

. Here we are using the standard inner-product over C k to define orthogonality. Recall that the inner-product of two vectors φ = i α i.

CSCI 2570 Introduction to Nanocomputing. Discrete Quantum Computation

Quantum computing! quantum gates! Fisica dell Energia!

Lecture 3: Hilbert spaces, tensor products

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

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

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

Lecture 2: From Classical to Quantum Model of Computation

Short Course in Quantum Information Lecture 2

Errata list, Nielsen & Chuang. rrata/errata.html

Quantum Computing Lecture 3. Principles of Quantum Mechanics. Anuj Dawar

Fourier Sampling & Simon s Algorithm

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

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

Linear Algebra and Dirac Notation, Pt. 1

Quantum Complexity Theory and Adiabatic Computation

Introduction to Quantum Information, Quantum Computation, and Its Application to Cryptography. D. J. Guan

1 Quantum Circuits. CS Quantum Complexity theory 1/31/07 Spring 2007 Lecture Class P - Polynomial Time

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

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

arxiv: v1 [quant-ph] 31 Dec 2015

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

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

Quantum Computation. Michael A. Nielsen. University of Queensland

6.080/6.089 GITCS May 6-8, Lecture 22/23. α 0 + β 1. α 2 + β 2 = 1

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

Quantum Computation, NP-Completeness and physical reality [1] [2] [3]

6.896 Quantum Complexity Theory October 2, Lecture 9

Unitary evolution: this axiom governs how the state of the quantum system evolves in time.

Volume 2, Issue 9, September 2014 International Journal of Advance Research in Computer Science and Management Studies

Simulating classical circuits with quantum circuits. The complexity class Reversible-P. Universal gate set for reversible circuits P = Reversible-P

Seminar 1. Introduction to Quantum Computing

Quantum Circuits and Algorithms

Factoring on a Quantum Computer

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

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

Quantum Computing Lecture 6. Quantum Search

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

6.896 Quantum Complexity Theory September 9, Lecture 2

Unitary Dynamics and Quantum Circuits

ADVANCED QUANTUM INFORMATION THEORY

Quantum Information & Quantum Computing

CS257 Discrete Quantum Computation

Introduction to Quantum Computing for Folks

Reversible and Quantum computing. Fisica dell Energia - a.a. 2015/2016

Computational Complexity: A Modern Approach. Draft of a book: Dated January 2007 Comments welcome!

Simulation of quantum computers with probabilistic models

Extended Superposed Quantum State Initialization Using Disjoint Prime Implicants

Simon s algorithm (1994)

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

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

Chapter 2. Basic Principles of Quantum mechanics

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

Deutsch s Algorithm. Dimitrios I. Myrisiotis. MPLA CoReLab. April 26, / 70

Quantum Information & Quantum Computation

arxiv: v3 [cs.dm] 13 Feb 2018

QLang: Qubit Language

Discrete Quantum Theories

Introduction into Quantum Computations Alexei Ashikhmin Bell Labs

Semiconductors: Applications in spintronics and quantum computation. Tatiana G. Rappoport Advanced Summer School Cinvestav 2005

Basics on quantum information

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

Quantum Computing Lecture 2. Review of Linear Algebra

arxiv: v4 [cs.dm] 19 Nov 2018

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

Lecture 4: Postulates of quantum mechanics

Lecture 1: Introduction to Quantum Computing

)j > Riley Tipton Perry University of New South Wales, Australia. World Scientific CHENNAI

Basics on quantum information

Short introduction to Quantum Computing

Advanced Cryptography Quantum Algorithms Christophe Petit

Introduction to Quantum Computation

QUANTUM COMPUTING. Part II. Jean V. Bellissard. Georgia Institute of Technology & Institut Universitaire de France

Quantum Computation. Alessandra Di Pierro Computational models (Circuits, QTM) Algorithms (QFT, Quantum search)

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

Great Ideas in Theoretical Computer Science. Lecture 28: A Gentle Introduction to Quantum Computation

Quantum Gates, Circuits & Teleportation

COMPUTATIONAL COMPLEXITY

Computational Complexity: A Modern Approach

6.896 Quantum Complexity Theory 30 October Lecture 17

. An introduction to Quantum Complexity. Peli Teloni

2.0 Basic Elements of a Quantum Information Processor. 2.1 Classical information processing The carrier of information

2. Introduction to quantum mechanics

A Glimpse of Quantum Computation

Quantum Computational Complexity

Some Recent Research Issues in Quantum Logic

Quantum Computing. Winter Quarter, 2011 and Spring Quarter, 2013

Quantum Computing. Thorsten Altenkirch

Transcription:

Chapter 0 Quantum algorithms Complex numbers: a quick review / 4 / 4 Definition: C = { a + b i : a, b R } where i = Polar form of z = a + b i is z = re iθ, where r = z = a + b and θ = tan y x Alternatively, if z = re iθ, then z = a + b i with a = r cos θ and b = r sin θ 3 / 4 4 / 4

Multiplication/division: easy in polar form: Let z = a + b i and z = a + b i Then For z = a + bi: Complex conjugate z = a bi z z = r r e i(θ +θ ) and z z = r r e i(θ θ ) Magnitude z = z z = a + b Arithmetic: as one would expect Let z = a + b i and z = a + b i Then z ± z = (a ± a ) + (b ± b )i z z = (a b a b ) + (a b + a b )i z z = z z z = a a + b b + (a b a b )i a + b 5 / 4 6 / 4 Dirac Notation Reference: Emma Strubell, An ntroduction to Quantum Algorithms Dirac notation is an alternative to usual vector notation: v 0 v v = = v v n This column vector is called ket-v ts dual vector is given by v = v T = [ v 0 v v n ] and is called bra-v 7 / 4 8 / 4

Quick review Dirac notation is useful for working in C n, a Hilbert space under the inner product defined as with norm n u v = u T v = u j v j u, v C n, v = v v = v T v = ( n ) / v j v j = j=0 j=0 ( n ) / u, v C n v j j=0 nner product properties: Positive definiteness: v v 0, with equality iff v = 0 Antisymmetry: u v = v u for any u, v Linearity: if α C, then u αv = α u v and u v + w = u v + u w for any u, v, w Norm properties of v = v v : Positive definiteness: v 0, with equality iff v = 0 Homogeneity: f α C, then α v = α v Triangle inequality: v + w v + w 9 / 4 0 / 4 Outer product (also known as tensor product or Kronecker product): v u = v 0 v v n [ ] u0 u u m v 0 u 0 v 0 u v 0 u m v u 0 v u v u m = v n u 0 v n u v n u m Outer product defines a linear transformation ( v u ) w = v u w = u w v from C n to C m Tensor product u v of u C m and v C n, generally written u v = uv = [ ] [ ] u 0 u u m v0 v v n = u 0 v 0 u 0 v u 0 v n u v 0 u v u v n u m v 0 u m v u m v n / 4 / 4

Qubits Superpositions f a quantum system can be in one of two states, then it can also be in any linear superposition of those two states Classical bit: base- number taking either 0 or as its value Quantum bit (qubit): superposition of measurable quantities 0 and State of a qubit is a two-dimensional state space C with orthonormal basis vectors 0 and Standard choice of basis vectors is 0 = [ ] 0 and = [ ] 0 For instance, p 0i + p i, or p 0i or an infinite number of other combination of the form 0 0i + i The s can be even complex numbers, provided ie, they are normalized For example 0 + =, p 0i + p i i 5 5 p i; Such a superposition is the basic unit of encoded information in quantum computers, called a qubit 3 / 4 4 / 4 Measurement The whole concept of a superposition suggests that the electron does not make up its mind about whether it is in the ground or excited state, and the amplitude 0 is a measure of its inclination toward the ground state Continuing along this line of thought, it is tempting to think of 0 as the probability that the electron is in the ground state But then how are we to make sense of the fact that 0 can be negative, or even worse, imaginary? We don t understand this, but get used to it This linear superposition is the private world of the electron For us to get a glimpse of the electron s state we must make a measurement to get asinglebit of information 0 or f the state of the electron is 0 0i + i, thentheoutcomeofthe measurement is 0 with probability 0 and with probability Moreover, the act of measurement causes the system to change its state: if the outcome of the measurement is 0, then the new state of the system is 0i (the ground state), and if the outcome is, the new state is i (the excited state) 5 / 4 6 / 4

k-level systems k-level systems (cont d) The superposition principle holds not just for -level systems, but in general for k-level systems n reality the electron in the hydrogen atom can be in one of many energy levels, starting with the ground state, the first excited state, the second excited state, and so on A k-level system consists of the ground state and the first k denoted by 0i, i, i,, k i excitedstates The general quantum state of the system is where P k j=0 j = 0 0i + i + + k k i, Measuring the state of the system would now reveal a number between 0 and k, and outcome j would occur with probability j The measurement would disturb the system, and the new state would actually become ji or the jth excited state 7 / 4 8 / 4 Quantum Logic Gates Reference: Emma Strubell, An ntroduction to Quantum Algorithms Classical circuits: use classical logic gates (such as,,, ) Using {,, }, along with a fanout gate, we can realize any Boolean function f : {T, F} n {T, F} Can get by with {, }, since p q ( p q) Can even get by with { }, since p p p and p q (p q) 9 / 4 0 / 4

Quantum circuits use quantum logic gates State ψ of quantum system: evolves via Schrödinger s equation i d ψ = H ψ dt where the matrix H is Hermitian, ie, H = H = H T Schrödinger s equation has solution ψ (t) = U t ψ (0), where U t = exp( ith) is unitary A matrix U is unitary if U = U The composition of two unitary operators is unitary All quantum gates must be unitary Single-cubit Hadamard operator ( fair coin flip ): H = [ ] 0 + 0 = 0 + When applied to qubit with value 0 or, induces equal superposition of states 0 and Upon observation, equal probability of being in these states Many quantum algorithms apply H to each cubit in a size n register, giving each of the n possible configurations an equal probability of n upon observation / 4 / 4 Amplitudes vs probabilities: H 0 = H = 0 + 0 Probability distributions are exactly the same, differing only by the phase of Apply Hadamard to each of these H 0 = 0 and H = very different distributions Pauli gates: Pauli X -gate swaps amplitudes of 0 and : represented by matrix [ ] 0 X = = 0 + 0 0 Pauli Y -gate swaps amplitudes of 0,multiplies each amplitude by i, and negates amplitude of : represented by matrix [ ] 0 i Y = = i 0 i 0 i 0 Pauli Z-gate negates amplitude of : represented by matrix Z = [ ] 0 = 0 0 0 3 / 4 4 / 4

Phase-shift gate with angle θ, changes phase of by factor of e iθ : represented by [ ] 0 R θ = 0 e iθ = 0 + e iθ 0 Special cases: Pauli Z-gate: Z = R π Phase gate, changes phase of by factor of π/: [ ] 0 S = R π/ = = 0 + i 0 0 i π/8-gate: Why π/8-gate? T = R π/4 = [ ] 0 = 0 + i 0 0 i [ ] T = e iπ/8 e iπ/8 0 0 e iπ/8 Controlled gates Controlled-NOT (CNOT) gate: swaps amplitudes of 0 and if controlling qubit c has the value Any unitary operation U can be controlled 5 / 4 6 / 4 Toffoli gate Since Toffoli is universal for classical circuits (ie, it can do logical and, or, not, fanout), and a valid transformation of quantum circuits it follows that quantum computation is at least as powerful as classical computation Complexity classes P: decision problems solvable in polynomial time by deterministic Turing machine NP: decision problems solvable in polynomial time by nondeterministic Turing machine NPC: NP-complete problems: f P NPC, then any P NP has a polynomial reduction to P Hence P = NP iff P NPC P PSPACE: decision problems solvable in polynomial space by deterministic Turing machine BPP: bounded-error probabilistic polynomial time, Prob(incorrect answer) < 3 Believed that P = BPP BQP: bounded-error quantum polynomial time Believed that P BQP 7 / 4 8 / 4

Grover s Algorithm 9 / 4 Problem Description 30 / 4 Grover s Algorithm nput: Quantum oracle O, which performs the operation O xi = ( )f (x), Search in an unordered database where Given: N = n and a function f : {0,,, N } {0, } such that f (x0 ) = for some x0 {0,,, N } ( 0 f (x) = Find: said x0 for x {0,,, n } \ {x0 }, if x = x0 n qubits initialized to the state 0i Output: x0 Runtime: Θ N = Θ n, with probability O() of success This is a sublinear algorithm 3 / 4 3 / 4

Uses the Grover iteration where Note that and thus ψ = G ψ, G = UO and U = ψ ψ U 0 = 0 and U x = x U = H n H n = H n UH n, ie, U equals the diffusion transform, which does inversion about the average Procedure: nitial state: 0 n Apply Hadamard transform to all qubits ψ = H n 0 = n x n x=0 3 Let R 4 π n times Apply the Grover iteration R times: 4 Measure the register x 0 x 0 G R ψ 33 / 4 34 / 4 Worked Example Explanation of runtime: Since oracle is a black box, view oracle call as one elementary operation Single Grover iteration consists of oracle call, two Hadamard transforms, and one phase shift, at cost Θ(n) So Grover consists of Θ( N) = Θ( n/ ) iterations, each having runtime Θ(n) So overall runtime is Θ(n n/ ), which is asymptotically close to Θ( n/ ) Remark: This is known to be optimal Consider system with N = 8 = 3 states, and suppose we re looking for state x 0 represented by bit string 0 Using n = 3 qubits, we describe system as x =α 0 000 + α 00 + α 00 + α 3 0 + α 4 00 Apply Hadamard: + α 5 0 + α 6 0 + α 7 H 3 000 = 7 x x=0 We ll do 4 π 8 = π = iterations, which rounds to iterations 35 / 4 36 / 4

teration #: Call quantum oracle O, then perform inversion about the average Oracle query negates amplitude of x 0, giving configuration x = O x 0 = 0 y<8 y 3 y 0 Diffusion transform increases amplitudes by difference from average, decreasing if difference is negative: U x = [ ψ ψ ] x = [ ψ ψ ] [ ψ ψ ] 0 = ψ ψ ψ ψ ψ ψ 0 + 0 = ψ + 0 Diffusion transform (cont d) U x = [ 7 ] y + 0 y=0 = 4 = 4 0 y 7 y 3 0 y 7 y 3 =: ψ = 0 y 7 y + 4 0 + 0 y + 5 4 0 α y y (a new ψ) The amplitudes of ψ satisfy 4 if y 0, α y = 5 4 if y = 0 37 / 4 38 / 4 teration #: Apply same two transformations as in iteration # After oracle query: x = O ψ = 4 = 4 0 y 7 y 3 7 y=0 y 5 4 0 y 6 4 0 = ψ 3 0 After applying diffusion transform: [ U ψ 3 ] 0 = 4 ψ + 3 0 When system is observed, = 8 0 y 7 y 3 y + 8 0 Prob(measure correct state 0 ) = 8 945% 7 Prob(measure incorrect state) = 8 55% and so Grover is more than 7 times more likely to give the correct answer 39 / 4 40 / 4

Quantum factoring algorithm The algorithm to factor a large integer N can be viewed as a sequence of reductions: Factoring is reduced to finding a nontrivial square root of modulo N Finding such a root is reduced to computing the order of a random integer modulo N The order of an integer is precisely the period of a particular periodic superposition Finally, periods of superpositions can be found by the quantum FFT 4 / 4