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

Similar documents
Lecture 4: Elementary Quantum Algorithms

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

Fourier Sampling & Simon s Algorithm

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

Quantum Computing Lecture 6. Quantum Search

Introduction to Quantum Computing

6.896 Quantum Complexity Theory September 18, Lecture 5

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

Quantum Algorithms Lecture #2. Stephen Jordan

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

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

Introduction to Quantum Information Processing

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

Quantum Computation CMU BB, Fall Week 6 work: Oct. 11 Oct hour week Obligatory problems are marked with [ ]

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

The query register and working memory together form the accessible memory, denoted H A. Thus the state of the algorithm is described by a vector

Simulation of quantum computers with probabilistic models

Quantum Computing: Foundations to Frontier Fall Lecture 3

The Classification of Clifford Gates over Qubits

Quantum information and quantum computing

An Introduction to Quantum Information and Applications

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

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

Chapter 10. Quantum algorithms

Quantum algorithms for testing Boolean functions

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

Short introduction to Quantum Computing

Shor s Prime Factorization Algorithm

Nothing Here. Fast Quantum Algorithms

Physics ; CS 4812 Problem Set 4

Principles of Quantum Mechanics Pt. 2

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

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

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

Quantum Information & Quantum Computation

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

Lecture 10: Eigenvalue Estimation

Is Quantum Search Practical?

Quantum boolean functions

Lecture 1: Overview of quantum information

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

Single qubit + CNOT gates

Extended Superposed Quantum State Initialization Using Disjoint Prime Implicants

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

Short Course in Quantum Information Lecture 5

An Introduction to Quantum Computation and Quantum Information

Lecture 3: Superdense coding, quantum circuits, and partial measurements

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

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

Lecture 3: Hilbert spaces, tensor products

Quantum Gates, Circuits & Teleportation

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

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

6.896 Quantum Complexity Theory October 2, Lecture 9

Discrete Quantum Theories

Quantum Information & Quantum Computing

ADVANCED QUANTUM INFORMATION THEORY

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

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

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

Lecture 2: From Classical to Quantum Model of Computation

QLang: Qubit Language

Lecture 1: Introduction to Quantum Computing

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

Quantum Computation. Michael A. Nielsen. University of Queensland

Quantum Circuits and Algorithms

Quantum Information & Quantum Computing

Quantum Communication Complexity

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

Introduction to Quantum Computing

6.896 Quantum Complexity Theory Oct. 28, Lecture 16

1111: Linear Algebra I

Quantum Computing Lecture Notes, Extra Chapter. Hidden Subgroup Problem

Quantum advantage with shallow circuits. arxiv: Sergey Bravyi (IBM) David Gosset (IBM) Robert Koenig (Munich)

Lecture 7: Quantum Fourier Transform over Z N

Quantum Computation 650 Spring 2009 Lectures The World of Quantum Information. Quantum Information: fundamental principles

1 Bernstein-Vazirani Algorithm

92 CHAPTER III. QUANTUM COMPUTATION. Figure III.11: Diagram for swap (from NC).

Ph 219b/CS 219b. Exercises Due: Wednesday 21 November 2018 H = 1 ( ) 1 1. in quantum circuit notation, we denote the Hadamard gate as

Introduction to Quantum Computing

Quantum Computer Algorithms: basics

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

Stanford University CS254: Computational Complexity Handout 8 Luca Trevisan 4/21/2010

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

Lecture 21: Quantum communication complexity

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

Lecture 9: Phase Estimation

Quantum gate. Contents. Commonly used gates

Quantum Information & Quantum Computation

2 A Fourier Transform for Bivariate Functions

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

Exponential algorithmic speedup by quantum walk

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

CS 151 Complexity Theory Spring Solution Set 5

Lecture 4: Postulates of quantum mechanics

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

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

arxiv:quant-ph/ v1 17 Jul 1997

Last revised 4/5/06 LECTURE NOTES ON QUANTUM COMPUTATION. Cornell University, Physics , CS 483; Spring, 2006 c 2006, N.

Quantum Information Processing and Diagrams of States

Transcription:

School of Mathematics Spring 017 QUANTUM COMPUTATION Exercise sheet 1 Ashley Montanaro, University of Bristol ashley.montanaro@bristol.ac.uk 1. The quantum circuit model. (a) Consider the following quantum circuit C: Z i. Write down the matrix of the unitary operation U corresponding to C, with respect to the computational basis. Answer: The answer can be obtained either by just multiplying out the matrices corresponding to the gates, or by tracking each computational basis state through the circuit, e.g.: 0 0 1 ( 0 + 1 ) 0 1 ( 00 + 11 ) 1 ( 0 ( 0 + 1 ) 1 ( 0 1 )) 1 ( 00 + 01 10 + 11 ). The final answer is U = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1. ii. Write down a quantum circuit corresponding to the inverse operation U 1. Answer: As each gate in the circuit is its own inverse, U 1 can be implemented by running the circuit in reverse order, i.e.: Z 1

iii. If C is applied to the initial state 0 0 and is followed by a measurement of each qubit in the computational basis, what is the distribution on measurement outcomes? Answer: The distribution on measurement outcomes is obtained by squaring the first column of U, and is hence uniform on {0, 1}. (b) The SWAP gate for qubits is defined as SWAP x y = y x for x, y {0, 1} and is denoted by the circuit element. Show that SWAP can be implemented as a product of CNOT gates and write down the corresponding circuit. Answer: The matrix for SWAP in the computational basis is 1 0 0 0 0 0 1 0 0 1 0 0. 0 0 0 1 By direct calculation, the following circuit corresponds to the same matrix: (c) Show that a CZ gate can be implemented using a CNOT gate and adamard gates and write down the corresponding circuit. Answer: Recall from Quantum Information Theory that Z = X. As CNOT is a controlled-x operation, we would expect that CZ = (I )CNOT(I ). And indeed this is the case, as can be verified from writing out the matrices and multiplying them together. The corresponding circuit is (d) The classical OR gate takes as input a pair of bits x, y {0, 1} and outputs 1 if either x or y is equal to 1, and 0 otherwise. Use the generic construction of reversible functions discussed in the lecture notes to write down a unitary operation on 3 qubits which corresponds to a reversible implementation of the OR gate. Answer: Following the same construction as for AND, we obtain the map x y z x y z (x OR y). Written explicitly as a matrix with respect to

the computational basis, this is 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0. 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0. The Bernstein-Vazirani algorithm. A parity function f s : {0, 1} n {0, 1}, for some s {0, 1} n, is a function of the form f s (x) = x s, where the inner product is taken modulo. For example, with n = 3, f 110 (x) is the function x 1 x. (a) Show that f s is a balanced function for all s 0 n. Answer: We have f s (x) = i x is i mod. If s 0 n, then there exists i such that s i 0. So, for all x, f s (x) f s (x i ), where x i is the string obtained from x by inverting bit i. ence f s is balanced. (b) Imagine we apply the circuit for the Deutsch-Jozsa algorithm with the oracle U fs. Show that the measured output is precisely the string s. Answer: The final state in the Deutsch-Jozsa algorithm is y {0,1} n 1 n x {0,1} n ( 1) fs(x)+x y y. We have ( 1) fs(x)+x y = x {0,1} n ( 1) x s+x y = ( 1) x (s+y). x {0,1} n x {0,1} n By the same argument as part (a), this evaluates to zero unless s + y = 0 n (mod ), or in other words unless s = y. (c) Consider the following problem: given oracle access to a parity function f s, determine s using the minimal number of queries to f s. i. Conclude from (b) that there is a quantum algorithm that solves this problem with one query to f s. 3

Answer: We perform the Deutsch-Jozsa algorithm, using the oracle U fs, and measure the final result. The answer is s with certainty and the algorithm uses one query to U fs and hence one query to f s. ii. Give a tight bound on the number of queries to f s required for a classical algorithm to solve the problem with certainty. Answer: Each classical query has two outcomes, so reduces the space of possibilities for s by at most a factor of 1/. As there are n possible strings s, the classical algorithm must make at least n queries. This is tight, because we can evaluate f s on the strings x (i), i = 1,..., n where x (i) is 1 at position i, and 0 elsewhere. Then f s (x (i) ) = s i, so each query reveals one bit of s. 3. Simulation of various kinds. (arder) (a) Show that the phase oracle U f as defined in the lecture notes cannot be used to implement the bit oracle O f in general, even if f only has 1 bit output. Answer: Consider the two functions on one bit f(x) = 0 and f(x) = 1. Then in the first case, U f x = x, and in the second case U f x = x ; thus either U f = I or U f = I. These two operations are indistinguishable by any operations we might perform around them, because they only differ by a global phase of 1. But in the case of the bit oracle O f x y = x y f(x), these two functions are indeed distinguishable (we could simply query O f on x = 0). So U f cannot be used to implement O f in general. (b) Imagine we are given a quantum circuit on n qubits which consists of poly(n) gates picked from the (universal) set {, X, CNOT, T }, followed by a final measurement of all the qubits. Assume that at each step in the computation the quantum state is unentangled (i.e. is a product state of the n qubits). Show that the circuit can be simulated efficiently classically: that is, there is an efficient classical algorithm for exactly sampling from the probability distribution on the final measurement outcomes. Answer: Imagine we start with a product state ψ 1 ψ... ψ n. A description of this state can be written down in O(n) space by writing down a description of each state ψ i separately. We simulate the effect of each gate in the circuit on this state in turn. If we have, X or T on qubit i, this can be done by multiplying ψ i by the corresponding matrix, and updating the description of ψ i accordingly. On the other hand, the CNOT gate involves two qubits i, j. So, once the gate has been applied, we need to find a new product state representation for the state of these qubits. This can be achieved by solving a system of equations in 4 variables corresponding to the amplitudes of the product states. At the end of the circuit, we have some product state of n qubits. To simulate sampling from the distribution on final outcomes x, we can sample each bit x i from the distribution 4

corresponding to state ψ i. 5