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

Similar documents
Fourier Sampling & Simon s Algorithm

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

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

Introduction to Quantum Computing

Algebraic Methods in Combinatorics

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

Algebraic Methods in Combinatorics

Hyperreal Numbers: An Elementary Inquiry-Based Introduction. Handouts for a course from Canada/USA Mathcamp Don Laackman

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

Quantum Computing: Foundations to Frontier Fall Lecture 3

Chapter 10. Quantum algorithms

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

Linear Algebra, Summer 2011, pt. 3

MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST

Lecture 4: Elementary Quantum Algorithms

Quantum gate. Contents. Commonly used gates

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

Lecture 1: Overview of quantum information

6.080/6.089 GITCS May 13, Lecture 24

Simulation of quantum computers with probabilistic models

MATH 221: SOLUTIONS TO SELECTED HOMEWORK PROBLEMS

Lecture 7: Quantum Fourier Transform over Z N

Lecture 22: Quantum computational complexity

Extended Superposed Quantum State Initialization Using Disjoint Prime Implicants

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

Quantum Computing Lecture 6. Quantum Search

Unit 2, Section 3: Linear Combinations, Spanning, and Linear Independence Linear Combinations, Spanning, and Linear Independence

MAT2342 : Introduction to Applied Linear Algebra Mike Newman, fall Projections. introduction

Topic 14 Notes Jeremy Orloff

The Gram-Schmidt Process

LECTURES 14/15: LINEAR INDEPENDENCE AND BASES

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

Orthogonality and Algebraic Lambda-Calculus

And for polynomials with coefficients in F 2 = Z/2 Euclidean algorithm for gcd s Concept of equality mod M(x) Extended Euclid for inverses mod M(x)

2 so Q[ 2] is closed under both additive and multiplicative inverses. a 2 2b 2 + b

Pr[X = s Y = t] = Pr[X = s] Pr[Y = t]

MTH Linear Algebra. Study Guide. Dr. Tony Yee Department of Mathematics and Information Technology The Hong Kong Institute of Education

MATH 225 Summer 2005 Linear Algebra II Solutions to Assignment 1 Due: Wednesday July 13, 2005

Short introduction to Quantum Computing

LINEAR ALGEBRA: THEORY. Version: August 12,

Introduction to Quantum Information Processing

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

Shor s Prime Factorization Algorithm

SOLUTIONS TO EXERCISES FOR MATHEMATICS 133 Part 1. I. Topics from linear algebra

Topics in Computer Mathematics

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

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

Lecture 11 September 30, 2015

18.06 Professor Johnson Quiz 1 October 3, 2007

There are two things that are particularly nice about the first basis

Daniel J. Bernstein University of Illinois at Chicago. means an algorithm that a quantum computer can run.

Sydney University Mathematical Society Problems Competition Solutions.

Linear Algebra March 16, 2019

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

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

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

Lecture 3: Hilbert spaces, tensor products

Quantum Gates, Circuits & Teleportation

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

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

The Classification of Clifford Gates over Qubits

Answers in blue. If you have questions or spot an error, let me know. 1. Find all matrices that commute with A =. 4 3

A New Lower Bound Technique for Quantum Circuits without Ancillæ

1 Measurements, Tensor Products, and Entanglement

SYMBOL EXPLANATION EXAMPLE

(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ).

MATH 1130 Exam 1 Review Sheet

QLang: Qubit Language

2.2 Classical circuit model of computation

Lecture 10 - MAC s continued, hash & MAC

The following definition is fundamental.

Discrete Quantum Theories

1 Dirac Notation for Vector Spaces

Linear Independence x

Chapter 3: Theory Review: Solutions Math 308 F Spring 2015

Definition 1.2. Let p R n be a point and v R n be a non-zero vector. The line through p in direction v is the set

SUPERDENSE CODING AND QUANTUM TELEPORTATION

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

MATH 1120 (LINEAR ALGEBRA 1), FINAL EXAM FALL 2011 SOLUTIONS TO PRACTICE VERSION

The value of a problem is not so much coming up with the answer as in the ideas and attempted ideas it forces on the would be solver I.N.

Math 3191 Applied Linear Algebra

Lecture 2: Linear operators

4 ORTHOGONALITY ORTHOGONALITY OF THE FOUR SUBSPACES 4.1

Introduction to Quantum Computing

3. Vector spaces 3.1 Linear dependence and independence 3.2 Basis and dimension. 5. Extreme points and basic feasible solutions

Quantum Mechanics- I Prof. Dr. S. Lakshmi Bala Department of Physics Indian Institute of Technology, Madras

Lecture 3: Constructing a Quantum Model

Math 291-2: Lecture Notes Northwestern University, Winter 2016

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

Math 109 HW 9 Solutions

x + 2y + 3z = 8 x + 3y = 7 x + 2z = 3

1 Last time: multiplying vectors matrices

Linear Algebra II. 2 Matrices. Notes 2 21st October Matrix algebra

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

CSCI 2570 Introduction to Nanocomputing. Discrete Quantum Computation

36 What is Linear Algebra?

Recitation 8: Graphs and Adjacency Matrices

Bare-bones outline of eigenvalue theory and the Jordan canonical form

CS 151 Complexity Theory Spring Solution Set 5

Theorem 5.3. Let E/F, E = F (u), be a simple field extension. Then u is algebraic if and only if E/F is finite. In this case, [E : F ] = deg f u.

Transcription:

Quantum Computation CMU 15-859BB, Fall 2018 Week 6 work: Oct. 11 Oct. 18 12-hour week Obligatory problems are marked with [ ]

1. [CCNOT.] In class we showed how to simulate classical AND, OR, NOT, and FANOUT gates using only CSWAP gates (and ancillas that could be 0 or 1 ). Show how to do the same using only CCNOT gates (controlled-cnot gates, aka Toffoli gates).

2. [Controlled-Controlled-U.] Let U be a d-dimensional qudit gate (i.e., a unitary d d matrix). Define the controlled-controlled-u gate, which operates on 2 qubits and a qudit (call these the Control1 qubit, the Control2 qubit, and the Target qudit) as follows: 00 y 00 y, 01 y 01 y, 10 y 10 y, 11 y 11 (U y ). (a) [ ] How many rows/columns does this controlled-controlled-u gate have? (I.e., what is the dimension of space on which it operates?) (b) [ ] Prove that the gate is unitary. (c) [ ] Suppose V is a (unitary) qudit gate with V 2 = U. Show that controlled-controlled-u can be implemented as follows: ˆ Controlled-V on Control2 and Target. ˆ CNOT, with Control1 the control and Control2 the target. ˆ Controlled-V on Control2 and Target. ˆ CNOT, with Control1 the control and Control2 the target. ˆ Controlled-V on Control1 and Target. Figure 1: Building controlled-controlled-u (Remark: Earlier we saw the 1-qubit NOT gate. If you take this to be V in the above construction, you see that CCNOT can be built out of 2-qubit gates. Interestingly, the classical CCNOT gate cannot be computed by any circuit of classical 2-bit gates!)

3. [Deutsch s Algorithm.] David really enjoys the fact that one can easily take a classical circuit computing a Boolean function F, and convert it into a quantum circuit which implements the same Boolean function when given classical inputs but which also can accept quantum superpositions of classical inputs. For a whole bunch of small Boolean functions, David built a small quantum circuit that implements that function. Unfortunately, David forgot to label his quantum circuits, and now he forgets which one computes what! David runs across an old circuit Q ± he built which evidently sign-implements some 1-bit Boolean function F : {0, 1} {0, 1}. That is 1, for each x {0, 1} it holds that Q ± x = ( 1) F (x) x but David doesn t know what F is. Of courses there are only four possibilities: F (x) 0, F (x) 1, F (x) = x, and F (x) = NOT(x). Let s call the first two possibilities constant functions and the second two possibilities nonconstant functions. (a) [ ] Show that it is possible for David to tell whether F is a constant function or a nonconstant function by just using Q ± once. Specifically, you should describe a 1-qubit circuit, which may have various gates but only one instance of Q ± in it. Your circuit start with a qubit initialized to 0, and should end with a measurement gate. And it should have the property that based on the measurement outcome, David can know with 100% certainty whether F is a constant function or a nonconstant function. (Hint: Use the good old Rotate, Compute, Rotate paradigm.) (b) [ ] Show that if you have access to a classical circuit C computing one of the four possible F s, and you only run one bit through it, you cannot gain any information at all about whether F is a constant function or a nonconstant function. 1 Let s ignore ancillas, as always.

4. [Classical Query Complexity.] Pythia is holding a strange contest. She is selling a sealed (classical) circuit C that computes some Boolean function F : {0, 1} n {0, 1}. She promises that F 0; that is, there is at least one string x such that F (x) = 1. You can buy as many copies of C as you want, but each copy costs a drachma. Pythia promises you fame and fortune if you can build a (classical) circuit S that outputs a string x such that F (x) = 1. The inputs to your circuit S are simply ancillas. You should think of each copy of C that you buy as a big gate that can be used in your circuit S. You are not allowed to peer into the inner workings of C ; you can only incorporate it into your circuit as a black box. (a) [ ] Prove that you can attain fame and fortune by spending 2 n 1 drachmas. Actually, it would be too annoying for me to make you describe a circuit, so instead describe classical deterministic pseudocode that incorporates calls to a subroutine C. Your code should take no input, make at most 2 n 1 calls to C, and end by outputting an x such that F (x) = 1. (b) [ ] Prove rigorously that it is impossible for you to attain fame and fortune without spending at least 2 n 1 drachmas. To be very precise, show that any circuit S incorporating fewer than 2 n 1 copies of C cannot be correct, in the sense that there exists an F for which S fails. (No wishy-washiness in your solution; it should be an airtight proof.) (c) [ ] The famous SAT problem in theoretical computer science is equivalent to the following: Given as input the (description of) an n-input Boolean circuit C, with the promise that there is at least one string x {0, 1} n such that C(x ) = 1, output any string x such that C(x) = 1. If you were able to show that there is no classical algorithm solving this problem in fewer than 2 n 1 steps, then you would have shown P NP, and real-world fame and fortune would truly be yours. How come your solution to part (b) does not achieve this?

5. [Linear Algebra Modulo 2.] The integers modulo 2 constitute what s called a field in mathematics: a set of numbers (namely 0 and 1) for which all the standard operations of plus, minus, times, and division-by-nonzero work as expected. This field is sometimes denoted F 2. (Other examples of fields include the real numbers, the complex numbers, the rational numbers, and the integers modulo p whenever p is prime.) It s a wonderful fact that pretty much all of linear algebra works just as well when the underlying scalars come from any fixed field, like F 2. The set of all n-dimensional vectors in this case is denoted F n 2. (You re most used to the cases R n and C n, when the scalars are reals and complexes, respectively.) (a) [ ] There s pretty much only one pitfall to watch out for: Show that the dot product in F n 2, namely the operation u v = n i=1 u iv i (mod 2 of course), doesn t act like an inner product, in the sense that it s perfectly possible to have u u = 0 even though u 0. Because of this, notions like orthogonal basis or u and v are perpendicular don t make as much sense in F n 2. (We still frequently use the dot product operation anyway, though.) (b) [ ] Recall that a set of vectors u 1,..., u k is said to be linearly independent if the only linear combination c 1 u 1 + + c k u k that equals 0 is the trivial one with c 1 = c 2 = = c k = 0. As usual, the span (set of all linear combinations) of a set of k linearly independent vectors is called a k-dimensional subspace. Show that in F n 2, every k-dimensional subspace contains exactly 2 k vectors. (c) [ ] As usual in linear algebra, one can study solutions of systems of linear equations like Ax = 0 (where A F m n 2 is a matrix and x is a vector of n unknowns) or, more generally, Ax = b (where b F n 2 is a fixed right-hand side). The usual facts about Gaussian Elimination apply. Show that the set of solutions x to Ax = 0 forms a subspace of dimension equal to n r, where r is the maximum size of a linearly independent set of rows of A. (d) [ ] For a more general system Ax = b, prove that either there is no solution, or else there are 2 n r solutions, where again, r is the maximum size of a linearly independent set of rows of A.

6. [Real Quantum Computing.] So far in the course complex amplitudes have almost never arisen, even though they may, according to the laws of quantum mechanics. Almost all of our favorite quantum gates (NOT, H, Z, Rotations, CNOT, SWAP, CSWAP, CCNOT) are represented by unitary matrices with real entries, meaning they never create states with complex ( ) (non-real) amplitudes. We briefly mentioned the 1-qubit phase gate P, whose matrix 1 0 is ; i.e., it sends 0 to 0 and 1 to i 1. 0 i 2 It s a fact that if you want the ability to generate all complex unitary transformations, it s sufficient to: (i) be able to generate all real unitary transformations; and, (ii) be able to apply the P gate. For this problem, prove that real amplitudes are sufficient for universal quantum computation. Specifically, show how to take any quantum circuit that has T gates from the set {real unitaries, measurements, P } and simply convert it to an equivalent 3 quantum circuit with no P gates (and hence where all internal states have only real amplitudes). Your new circuit should have just one extra qubit, and it should still have T gates, though some of these gates might act on more qubits than they previously did. (Hint: (a + bi) x versus a x 0 + b x 1.) ( ) 0 i 2 One more popular gate with complex entries is the Y gate, which operates on 1 qubit via the matrix i 0 3 With respect to measurement outcomes, assuming inputs are initialized to unentangled 0 s and 1 s.

7. [The Birthday Attack.] (a) [ ] Let 1 k n be integers. Suppose that every time you press a button, a computer prints out a random integer between 1 and n (inclusive). Show that if you press the button k + 1 times, the probability that all the integers you see are distinct is p k,n = (1 1/n)(1 2/n)(1 3/n) (1 k/n). (b) [ ] Produce high quality plots of p k,n vs. k for each n = 10 i, i = 1... 6. In each case, let k range from.1 n to 4 n. (c) Prove that the function f : R R defined by f(x) = 2 x is convex. (This means that if you connect the points (a, f(a)) and (b, f(b)) on the graph of f by a straight line segment, the graph is below that straight line between x = a and x = b. It s also equivalent to the fact that just the midpoint value f(m) (for m = a+b 2 ) is below the midpoint of the line segment, f(a)+f(b) 2. You can prove the convexity claim either with calculus, or else by proving the midpoint statement using the more lowbrow inequality (A/ 2 B/ 2) 2 0 for well-chosen A and B.) (d) Deduce that if 0 x 1, then 1 + x 2 x. (e) Deduce that if 0 x 1, then 1 x 2 x. (f) Deduce that p k,n 2 k(k+1) 2n. (g) Deduce that if k 4 n, then p k,n 2 8. (h) Show that if x 1, x 2 0, then (1 x 1 )(1 x 2 ) 1 x 1 x 2. (i) Show that p k,n 1 k(k+1) 2n. Deduce that p k,n 1 k2 n. (j) Show that if k.1 n, then p k,n.99. (k) [ ] Dan goes to the hardware store and buys N/2 differently colored buckets of paint (N is even). He also buys N balls and an opaque urn. He groups the balls into N/2 pairs, and paints each pair a different color. He then puts all the balls into the urn. You come along and start pulling balls out of the urn, at random. Show that there is some absolute constant c > 0 such that the following is true: If you pull out fewer than c N balls, then the probability of you getting two balls of the same color is at most.01.

8. [The Probability of Coprimality.] Suppose that A and B are chosen independently and uniformly at random from the set {1, 2,..., S}. (a) For P a fixed prime, show that Pr[A, B both divisible by P ] 1/P 2. (b) Show that (c) Show that Pr[GCD(A, B) 1] primes P primes P 1/P 2.99, 1/P 2. thereby concluding that The probability that two random integers are coprime is at least 1%. (In fact, you don t need calculus; e.g., there s an elementary proof that primes P 5 1/P 2 2/5, and hence primes P 1/P 2.77... )