Chapter 10. Quantum algorithms

Similar documents
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

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

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 Complexity Theory and Adiabatic Computation

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]

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

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

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

6.896 Quantum Complexity Theory October 2, Lecture 9

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

Factoring on a Quantum Computer

CS257 Discrete Quantum Computation

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

Introduction to Quantum Computing for Folks

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 Lecture 2. Review of Linear Algebra

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

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

Basics on quantum information

Lecture 1: Introduction to Quantum Computing

Introduction to Quantum Computation

Advanced Cryptography Quantum Algorithms Christophe Petit

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

Quantum Gates, Circuits & Teleportation

Computational Complexity: A Modern Approach

Short introduction to Quantum Computing

6.896 Quantum Complexity Theory 30 October Lecture 17

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

2. Introduction to quantum mechanics

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

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

Principles of Quantum Mechanics Pt. 2

Quantum Information Processing with Liquid-State NMR

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

Transcription:

Chapter 10. Quantum algorithms

Complex numbers: a quick review

Definition: C = { a + b i : a, b R } where i = 1. Polar form of z = a + b i is z = re iθ, where r = z = a 2 + b 2 and θ = tan 1 y x Alternatively, if z = re iθ, then z = a + b i with a = r cos θ and b = r sin θ

For z = a + bi: Complex conjugate z = a bi. Magnitude z = z z = a 2 + b 2 Arithmetic: as one would expect. Let z 1 = a 1 + b 1 i and z 2 = a 2 + b 2 i. Then z 1 ± z 2 = (a 1 ± a 2 ) + (b 1 ± b 2 )i z 1 z 2 = (a 1 b 1 a 2 b 2 ) + (a 1 b 2 + a 2 b 1 )i z 1 z 2 = z 1 z 2 z 2 2 = a 1a 2 + b 1 b 2 + (a 1 b 2 a 2 b 1 )i a 2 2 + b2 2

Multiplication/division: easy in polar form: Let z 1 = a 1 + b 1 i and z 2 = a 2 + b 2 i. Then z 1 z 2 = r 1 r 2 e i(θ 1+θ 2 ) and z 1 z 2 = r 1 r 2 e i(θ 1 θ 2 )

Dirac Notation Reference: Emma Strubell, An Introduction to Quantum Algorithms

Dirac notation is an alternative to usual vector notation: v 0 v 1 v =.. = v v n 1 This column vector is called ket-v. Its dual vector is given by and is called bra-v. v = v T = [ v 0 v 1... v n ]

Dirac notation is useful for working in C n, a Hilbert space under the inner product defined as with norm n 1 u v = u T v = u j v j u, v C n, v = v v = v T v = ( n 1 ) 1/2 v j v j = j=0 j=0 ( n 1 ) 1/2 u, v C n v j 2. j=0

Quick review Inner 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: If α C, then α v = α v. Triangle inequality: v + w v + w.

Outer product (also known as tensor product or Kronecker product): v u = v 0 v 1.. v n 1 [ ] u0 u 1... u m 1 v 0 u 0 v 0 u 1... v 0 u m 1 v 1 u 0 v 1 u 1... v 1 u m 1 =........ v n 1 u 0 v n 1 u 1... v n 1 u m 1 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 1... u m 1 ] [ v0 v 1... v n 1 ] = u 0 v 0 u 0 v 1.. u 0 v n 1 u 1 v 0 u 1 v 1... u 1 v n 1... u m 1 v 0 u m 1 v 1... u m 1 v n 1

Qubits Classical bit: base-2 number taking either 0 or 1 as its value. Quantum bit (qubit): superposition of measurable quantities 0 and 1. State of a qubit is a two-dimensional state space C 2 with orthonormal basis vectors 0 and 1. Standard choice of basis vectors is 0 = [ ] 1 0 and 1 = [ ] 0. 1

Superpositions If a quantum system can be in one of two states, then it can also be in any linear superposition of those two states. For instance, 1 p 0i + p 1 1i, 2 2 or 1 p 2 0i 1 p 2 1i; or an infinite number of other combination of the form 0 0i + 1 1i. The s can be even complex numbers, provided i.e., they are normalized. For example 0 2 + 1 2 =1, 1 p 0i + 2 p i 1i. 5 5 Such a superposition is the basic unit of encoded information in quantum computers, called a qubit.

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.

Measurement 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 1. If the state of the electron is 0 0i + 1 1i, thentheoutcomeofthe measurement is 0 with probability 0 2 and 1 with probability 1 2. 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 1, the new state is 1i (the excited state).

k-level systems The superposition principle holds not just for 2-level systems, but in general for k-level systems. In 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, 1i, 2i,..., k 1i. 1excitedstates

k-level systems (cont d) The general quantum state of the system is where P k 1 j=0 j 2 =1. 0 0i + 1 1i +...+ k 1 k 1i, Measuring the state of the system would now reveal a number between 0 and k 1, and outcome j would occur with probability j 2. The measurement would disturb the system, and the new state would actually become ji or the jth excited state.

Quantum Logic Gates Reference: Emma Strubell, An Introduction 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)

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, i.e., 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 1 = U. The composition of two unitary operators is unitary. All quantum gates must be unitary.

Single-cubit Hadamard operator ( fair coin flip ): H = 1 [ ] 1 1 0 + 1 0 1 = 0 + 1 2 1 1 2 2 When applied to qubit with value 0 or 1, induces equal superposition of states 0 and 1. 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 2 n possible configurations an equal probability of 2 n upon observation.

Amplitudes vs. probabilities: H 0 = H 1 = 0 + 1 2 0 1 2 Probability distributions are exactly the same, differing only by the phase of 1. Apply Hadamard to each of these H 2 0 = 0 and H 2 1 = 1... very different distributions.

Pauli gates: Pauli X -gate swaps amplitudes of 0 and 1 : represented by matrix [ ] 0 1 X = = 1 0 + 0 1 1 0 Pauli Y -gate swaps amplitudes of 0,multiplies each amplitude by i, and negates amplitude of 1 : represented by matrix [ ] 0 i Y = = i 1 0 i 0 1 i 0 Pauli Z-gate negates amplitude of 1 : represented by matrix Z = [ ] 1 0 = 1 0 0 1 0 1

Phase-shift gate with angle θ, changes phase of 1 by factor of e iθ : represented by [ ] 1 0 R θ = 0 e iθ = 1 0 + e iθ 0 1 Special cases: Pauli Z-gate: Z = R π. Phase gate, changes phase of 1 by factor of π/2: [ ] 1 0 S = R π/2 = = 1 0 + i 0 1 0 i π/8-gate: Why π/8-gate? T = R π/4 = [ ] 1 0 = 1 0 + i 0 1 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 1 if controlling qubit c has the value 1. Any unitary operation U can be controlled

Toffoli gate Since Toffoli is universal for classical circuits (i.e., 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: If 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) < 1 3. Believed that P = BPP. BQP: bounded-error quantum polynomial time. Believed that P BQP.

Grover s Algorithm

Problem Description Search in an unordered database Given: N = 2 n and a function f : {0, 1,..., N 1} {0, 1} such that f (x 0 ) = 1 for some x 0 {0, 1,..., N 1} Find: said x 0

Grover s Algorithm Input: Quantum oracle O, which performs the operation O x = ( 1) f (x), where f (x) = { 0 for x {0, 1,..., 2 n 1} \ {x 0 }, 1 if x = x 0 n qubits initialized to the state 0 Output: x 0 Runtime: Θ ( N ) = Θ ( 2 n), with probability O(1) of success This is a sublinear algorithm.

Uses the Grover iteration ψ = G ψ, where Note that G = UO and U = 2 ψ ψ I and thus U 0 = 0 and U x = x U = 2H n H n I = H n UH n, i.e., U equals the diffusion transform, which does inversion about the average.

Procedure: 1. Initial state: 0 n 2. Apply Hadamard transform to all qubits ψ = H n 0 = 1 2 n 1 x 2 n x=0 3. Let R 1 4 π 2 n times. Apply the Grover iteration R times: 4. Measure the register x 0 x 0 G R ψ

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) = Θ(2 n/2 ) iterations, each having runtime Θ(n). So overall runtime is Θ(n2 n/2 ), which is asymptotically close to Θ(2 n/2 ). Remark: This is known to be optimal.

Worked Example Consider system with N = 8 = 2 3 states, and suppose we re looking for state x 0 represented by bit string 011. Using n = 3 qubits, we describe system as x =α 0 000 + α 1 001 + α 2 010 + α 3 011 + α 4 100 Apply Hadamard: + α 5 101 + α 6 110 + α 7 111 H 3 000 = 1 2 2 7 x x=0 We ll do 1 4 π 8 = 1 2 π 2. = 2.22 iterations, which rounds to 2 iterations.

Iteration #1: Call quantum oracle O, then perform inversion about the average. Oracle query negates amplitude of x 0, giving configuration x = O x 0 = 1 2 2 0 y<8 y 3 y 1 2 2 011 Diffusion transform increases amplitudes by difference from average, decreasing if difference is negative: U x = [ 2 ψ ψ I ] x = [ 2 ψ ψ I ] [ ψ ψ 2 ] 2 2 011 = 2 ψ ψ ψ ψ 2 2 ψ ψ 011 + 1 2 011 = 1 2 ψ + 1 2 011

Diffusion transform (cont d) U x = 1 [ 1 7 ] 2 2 y + 1 011 2 y=0 2 = 1 4 2 = 1 4 2 0 y 7 y 3 0 y 7 y 3 =: ψ = 0 y 7 y + 1 4 2 011 + 1 2 011 y + 5 4 2 011 α y y (a new ψ). The amplitudes of ψ satisfy 1 4 if y 011, 2 α y = 5 4 if y = 011. 2

Iteration #2: Apply same two transformations as in iteration #1. After oracle query: x = O ψ = 1 4 2 = 1 4 2 0 y 7 y 3 7 y=0 y 5 4 2 011 y 6 4 2 011 = 1 2 ψ 3 2 2 011

After applying diffusion transform: [ 1 U 2 ψ 3 ] 2 2 011 = 1 4 ψ + 3 2 2 011 When system is observed, = 1 8 2 0 y 7 y 3 y + 11 8 2 011 Prob(measure correct state 011 ) = 11 8 2 2 94.5% 7 2 Prob(measure incorrect state) = 8 5.5% 2 and so Grover is more than 17 times more likely to give the correct answer.

Quantum factoring algorithm The algorithm to factor a large integer N can be viewed as a sequence of reductions: I Factoring is reduced to finding a nontrivial square root of 1 modulo N. I I I 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.