Review of basic quantum and Deutsch-Jozsa. Can we generalize Deutsch-Jozsa algorithm? Marek Perkowski, Department of Electrical Engineering, Portland State.

Slides:



Advertisements
Similar presentations
Department of Computer Science & Engineering University of Washington
Advertisements

Quantum Computation and Quantum Information – Lecture 3
University of Queensland
Reversible Gates in various realization technologies
Quantum Computing MAS 725 Hartmut Klauck NTU
Quantum Packet Switching A. Yavuz Oruç Department of Electrical and Computer Engineering University of Maryland, College Park.
Midterm Exam for Quantum Computing Class Marek Perkowski.
Designing Oracles for Grover Algorithm
Calculating Spectral Coefficients for Walsh Transform using Butterflies Marek Perkowski September 21, 2005.
Derivatives of Perkowski’s Gate k f2 g h t t De Vos gates  f1f1  A B P Q Feynman gates A B P f 2f 2  C Q R Toffoli gates Q P f 2 A C R B S D 0.
Department of Computer Science & Engineering University of Washington
Phase in Quantum Computing. Main concepts of computing illustrated with simple examples.
1 Quantum Computing: What’s It Good For? Scott Aaronson Computer Science Department, UC Berkeley January 10,  John.
Grover. Part 2. Components of Grover Loop The Oracle -- O The Hadamard Transforms -- H The Zero State Phase Shift -- Z O is an Oracle H is Hadamards H.
University of Queensland
Review from last lecture: A Simple Quantum (3,1) Repetition Code
Ternary Deutsch’s, Deutsch-Jozsa and Affine functions Problems All those problems are not published yet.
Grover. Part 2 Anuj Dawar. Components of Grover Loop The Oracle -- O The Hadamard Transforms -- H The Zero State Phase Shift -- Z.
Quantum Behaviors: synthesis and measurement Martin Lukac Normen Giesecke Sazzad Hossain and Marek Perkowski Department of Electrical Engineering Portland.
CSEP 590tv: Quantum Computing
Balanced and constant functions as seen by Hadamard = Matrix M Vector V Vector S This is number of minterms “0” in the function.
Anuj Dawar.
1 Recap (I) n -qubit quantum state: 2 n -dimensional unit vector Unitary op: 2 n  2 n linear operation U such that U † U = I (where U † denotes the conjugate.

Grover’s Algorithm in Machine Learning and Optimization Applications
Lecture 3. Boolean Algebra, Logic Gates
Dirac Notation and Spectral decomposition
New Approach to Quantum Calculation of Spectral Coefficients Marek Perkowski Department of Electrical Engineering, 2005.
ROM-based computations: quantum versus classical B.C. Travaglione, M.A.Nielsen, H.M. Wiseman, and A. Ambainis.
Propositional Calculus Math Foundations of Computer Science.
Classical Versus Quantum. Goal: Fast, low-cost implementation of useful algorithms using standard components (gates) and design techniques Classical Logic.
Quantum Error Correction Jian-Wei Pan Lecture Note 9.
Generalized Deutsch Algorithms IPQI 5 Jan Background Basic aim : Efficient determination of properties of functions. Efficiency: No complete evaluation.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
Department of Computer Engineering
October 1 & 3, Introduction to Quantum Computing Lecture 2 of 2 Richard Cleve David R. Cheriton School of Computer Science Institute for Quantum.
Lecture 7 Topics –Boolean Algebra 1. Logic and Bits Operation Computers represent information by bit A bit has two possible values, namely zero and one.
Algorithms Artur Ekert. Our golden sequence H H Circuit complexity n QUBITS B A A B B B B A # of gates (n) = size of the circuit (n) # of parallel units.
October 1 & 3, Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2
Karnaugh Maps References:
Mathematical Induction I Lecture 4: Sep 16. This Lecture Last time we have discussed different proof techniques. This time we will focus on probably the.
You Did Not Just Read This or did you?. Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 3:
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Nothing Here. or How we learned to put our pants on two legs at a time. Fast Quantum Algorithms Dave Bacon Institute for Quantum Information California.
College Algebra Sixth Edition James Stewart Lothar Redlin Saleem Watson.
Lecture 4 Boolean Algebra. Logical Statements °A proposition that may or may not be true: Today is Monday Today is Sunday It is raining °Compound Statements.
1 Introduction to Quantum Information Processing CS 467 / CS 667 Phys 667 / Phys 767 C&O 481 / C&O 681 Richard Cleve DC 653 Lecture.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
Quantum Computation Stephen Jordan. Church-Turing Thesis ● Weak Form: Anything we would regard as “computable” can be computed by a Turing machine. ●
Quantum Circuits and Algorithms l Modular Arithmetic, XOR l Reversible Computation revisited l Quantum Gates revisited l A taste of quantum algorithms:
Intro to Quantum Algorithms SUNY Polytechnic Institute Chen-Fu Chiang Fall 2015.
Attendance Syllabus Textbook (hardcopy or electronics) Groups s First-time meeting.
Richard Cleve DC 2117 Introduction to Quantum Information Processing CS 467 / CS 667 Phys 667 / Phys 767 C&O 481 / C&O 681 Lecture.
Introduction to Quantum Computing Lecture 1 of 2
Quantum Circuits and Algorithms
Trigonometric Identities
Propositional Calculus: Boolean Algebra and Simplification
Quantum Computing Dorca Lee.
A Ridiculously Brief Overview
Chap 4 Quantum Circuits: p
OSU Quantum Information Seminar
Quantum Computation and Information Chap 1 Intro and Overview: p 28-58
Grover. Part 2 Anuj Dawar.
ECE 352 Digital System Fundamentals
Presentation transcript:

Review of basic quantum and Deutsch-Jozsa. Can we generalize Deutsch-Jozsa algorithm? Marek Perkowski, Department of Electrical Engineering, Portland State University, 2005

Basic quantum circuits Reversible functions Gates. NOT, CNOT, CCNOT General controlled gates. Hadamard, square root of not Kronecker Product. Parallel and serial connections of gates. Analysis of quantum circuits in Heisenberg and Dirac notations. –Tricks for fast computing. Entanglement. Toffoli gate from quantum primitives. These topics were illustrated on the blackboard:

Deutsch’s Problem … everything started with small circuit of Deutsch…...

Deutsch’s Problem David Deutsch Delphi Deutsch’s Problem Determine whether f(x) is constant or balanced using as few queries to the oracle as possible. (1985) (Deutsch ’85)

Classical Deutsch Classically we need to query the oracle two times to solve Deutsch’s Problem  f f f(0)  f(1) 1 for balanced, 0 for constants 0 1

How would we use a Classical Oracle?  f f f(0)  f(1) 1 for balanced, 0 for constants Patterns of constants Patterns of balanced functions of single variable Classical circuit Classification means recognizing patterns and separating them to categories.

Hadamard Transform Single qubit H H H Parallel connection of two Hadamard gates is calculated by Kronecker Product (tensor product)  /2 = = Here I calculated Kronecker product of two Hadamards

Use of Hadamard gate In Deutsch Circuit to create “Karnaugh Map” measure  = / = 1 -1 How to calculate the state after Hadamard How to calculate the initial state State after Hadamard State before Hadamards Transform of Hadamards State after Hadamards in Heisenberg notation State after Hadamards in Dirac notation State after oraqcle in Dirac notation

Remarks We use both Heisenberg and Dirac notation because some things are easier to prove in Dirac and some in Heisenberg. You can verify everything in Heisenberg, which is easy, but takes many matrix calculations. Dirac notation introduces many transformations that may be not obvious, if you are in doubt, just verify in Heisenberg notation. Because Dirac notation introduces symbol manipulation, you can avoid repeated calculation. In next stages some standard transforms of Dirac notation will be useful, but they are useful only to prove facts, rather than invent facts. You can verify the state after oracle by yourself from definition, but on the next page we will show everything step-by-step. In future we will skip sometimes such obvious transformations.

Deutsch Circuit measure |xy>  |x y  f(x)> |00>  |0 0  f(0)> = |0 f(0)> |01>  |0 1  f(x)> = |0 f(0)> |10>  |1 0  f(1)> = |1 f(1)> |11>  |1 1  f(1)> = |1 f(1)> ½ (|00> - |01> + |10> - |11>)  ½ (|0 f(0)> - |0 f(0)> + |1 f(1)> - |1 f(1)> ) How to calculate state after oracle? Derivation of formula from previous page Such derivations should be done for every quantum algorithm.

Important general principle measure Here, after oracle we have all information about the function (Kmap) but we cannot access it as is Common to many quantum algorithms Here, is the place to build a circuit that transforms phase- encoded information to find some boolean properties, here we use Hadamard again. We will discuss how can be generalized!

Deutsch Circuit: four possible oracles measure x f(x)

Quantum Deutsch: first explanation % |01> 100 % |11> Substitute f

Conclusion from Deutsch Quantum computer can distinguish in a single function evaluation (measurement) two classes of Boolean functions that would require two evaluations (measurements) in a classical computer. Quantum computer is fundamentally faster than classical computer, because the number of function evaluations is the most basic way of evaluating algorithm complexity. Complexity of calculation is not a mathematical but physical property.

Quantum Deutsch: second explanation This kind of proof is often faster and more intuitive but it is better to check using matrices because you likely can make errors This circuit is replaced by this Here we present case of constant f(x) = 1 Z rotation

Quantum Deutsch: second explanation This is obtained after connecting Hadamards and simplifying

Generalize these ideas So, we can distinguish by measurement between first two circuits from bottom and second two circuits from bottom. This method is very general, we can build various oracles and check : –how they can be distinguished? –distinguished by how many tests? In this case, we just need one test, but in a more general case we can have a decision tree for decision making. f(0) = 0 f(1) = 0 yesno yes no yes no ConstantBalanced

Find using only 1 evaluation of a reversible “black-box” circuit for Quantum Deutsch: third explanation |y> |y  f(x)> This method introduces the concept of phase kickback or encoding information in phase

Phase “kick-back” trick The phase depends on function f(x) Remember that for |y>: |0>  f(x) |1>  f(x)  1

Check for f(x)=0: |0> - |1> Because 0  1 = 1 Check for f(x)=1: |1> - |0> Because 1  1 = 0 and next (- 1) (|0>-|1>) For careful proof checkers. In next slide we will rewrite this formulat for |x>=0 and |x>=1, since H creates all possible values of cells.

A Deutsch quantum algorithm: third explanation continued …here we reduce the number of H gates... We apply one Hadamard to create all cells (minterms) In Hilbert space After measurement …we have also only one measurement... Remember that phase is lost in measurement

Deutsch Algorithm Philosophy Since we can prepare a superposition of all the inputs, we can learn a global property of f (i.e. a property that depends on all the values of f(x)) by only applying f once interferometry The global property is encoded in the phase information, which we learn via interferometry Classically, one application of f will only allow us to probe its value on one input We use just one quantum evaluation by, in effect, computing f(0) and f(1) simultaneously The Circuit: M H H H y  f(x) y x x UfUf Not always Many variants of Deutsch algorithm can be created to provide explanation of various principles

Deutsch’s Algorithm M H H H y  f(x) y x x UfUf Initialize with |  0  = |01  |0|0 |1|1 |0|0 Create superposition of x states using the first Hadamard (H) gate. Set y control input using the second H gate |1|1 Compute f(x) using the special unitary circuit U f |2|2 Interfere the |  2  states using the third H gate |3|3 Measure the x qubit |0  = constant; |1  = balanced measurement

M y  f(x) y x x UfUf |0|0 |1|1 |0|0 |1|1 |2|2 |3|3 HHH if f(0) = f(1) if f(0) ≠ f(1) if f(0) = f(1) if f(0) ≠ f(1) Deutsch’s Algorithm with single qubit measurement

Deutsch In Perspective Quantum theory allows us to do in a single query what classically requires two queries. What about problems where the computational complexity is exponentially more efficient?

Balanced Functions Balanced functions have each possible value equal number of times. In binary, half zeros, half ones In ternary, 1/3 rd zeros, 1/3 ones, 1/3 twos. 2 n Constant one balanced Global property

Extended Deutsch’s Problem Given black-box f:{0,1} n  {0,1}, –and a guarantee that f is either constant or balanced (1 on exactly ½ of inputs) –Which is it? –Minimize number of calls to f. Classical algorithm, worst-case: –Order 2 n time! What if the first 2 n-1 cases examined are all 0? –Function could be either constant or balanced. Case number 2 n-1 +1: if 0, constant; if 1, balanced. Quantum algorithm is exponentially faster! –(Deutsch & Jozsa, 1992.)

Deutsch-Jozsa Problem Determine whether f(x) is constant or balanced using as few queries to the oracle as possible. (1992)

Classical Deutsch Jozsa x x This slide only presents another way of visualizing constant and balanced functions. Both visualization as a waveform (as above) and as Karnaugh Map (truth Table) have heuristic value to find analogies with signal processing and logic design

Getting good feeling Before we prove formally Deutsch-Jozsa, we will analyze few examples for few variables, just to get intuitive feeling. Next we will prove the theorem formally, using Dirac notation. You can use Heisenberg notation as well, but it takes more space. 1.As you remember, we encode information in phase. 2.We will encode Boolean “0” using phase plus (complex number 1) 3.We will encode Boolean “1” using phase minus (complex number -1). 4.This is the so-called S encoding of spectral theory. It is better for many applications than R encoding that I do not introduce yet.

Balanced and constant functions as seen by Hadamard = Matrix M Vector V Vector S This is number of minterms “0” in the function This is measure of correlation with other rows of M Constant 0 Ones in Kmap encoded by “-1”, zeros by “1”

Observations The first row of the Hadamard matrix has all ones. This means that we calculate the global value corresponding to the number of ones in the first spectral parameter. The other than first rows of Hadamard matrix have equal number of ones and minus ones, which means that they check correlations of data vectors to certain balanced functions.

Balanced and constant functions as seen by Hadamard = Matrix M Vector V Vector S This is number of minterms “1” in the function This is measure of correlation with other rows of M Constant 1

Balanced and constant functions as seen by Hadamard = Matrix M of Hadamard transform Vector V of encoded data Vector S of spectral coefficients (normalization coeficient removed) balanced This means we have half “1” and half “0s” This row describes certain balanced function

What are those balanced functions? Matrix M a b a b a b a b Function 0 Function b Function a  b Function a

Conclusion on Hadamard Matrix First row represents function (constant) 0 All other rows represent linear functions. Linear functions 0abab0abab 1  0 1  a 1  b 1  a  b Negated Linear functions Affine functions

Quantum DJ Now we additionally apply Hadamard in output of the function This just comes from generalization of third method example This slide shows that I can read function in phase encoding. But this is of not much use itself. Now formal proof

This is like a Kmap with every true minterm (1) encoded by -1 And every false minterm (0) encoded by 1 We can say that Hadamard gates before the oracle create the Kmap of the function, setting the function in each of its possible minterms (cells) in parallel

Motivating calculations for 3 variables As we remember, these are transformations of Hadamard gate: H |0>|0> + |1> H |1>|0> - |1> H |x>|0> + (-1) x |1> In general: For 3 bits, vector of 3 Hadamards works as follows: (|0>+(-1) a |1>)(|0>+(-1) b |1>)(|0>+(-1) c |1>) = From multiplication |000> +(-1) c |001> +(-1) b |001>+(-1) b+c |001>000> +(-1) a |001> + (-1) a+c |001> + (-1) a+b |001> (-1) a+b+c |001> |abc>  We can formalize this as in the next slide:

Here we use normalizing coefficient An n-bit Hadamard transform can be written in the following form: We were able to observe these properties in the 2- variable example = Matrix M Vector V *= Thus we get |0> in measurement Recall our example

Full Quantum DJ - conclusion Solves DJ with a SINGLE query vs 2 n-1 +1 classical deterministic!!!!!!!!! If the reading is |00..0> then function is constant If reading is other than |00..)> then the function is balanced

Deutsch-Josza Algorithm (contd) in one evaluationThis algorithm distinguishes constant from balanced functions in one evaluation of f, versus 2 n–1 + 1 evaluations for classical deterministic algorithms Balanced functions have many interesting and some useful properties –K. Chakrabarty and J.P. Hayes, “Balanced Boolean functions,” IEE Proc: Digital Techniques, vol. 145, pp , Jan

Conclusion on Deutsch-Jozsa We can test in one measurement if the circuit is balanced or not, assuming that we know that the circuit is balanced or constant. We can test in one measurement if the circuit is affine or not, assuming that we know that the circuit is affine (including constants). We can test with some probability what the circuit is if we have no any knowledge of the circuit. How to design methods to learn about the circuit if we do not know anything about it?

Can you build a classical computer which will distinguish patterns like these in one evaluation?

The answer is: No, you cannot on a standard (classical) computer You can, using a ternary quantum computer I leave this exercise to you, or it will be shown next lecture.

Local patterns for Affine functions ab cd a  b  c  d  1 Classically we need 5 tests (arbitrary cell and its all 4 Hamming distance-1 neighbors. Quantumly we need just one test. In red we show cells for which measurements should be done in classical computing to find the pattern.

Conclusion and questions We can test in one measurement if the circuit is balanced or not, assuming that we know that the circuit is balanced or constant. We can test in one measurement if the circuit is affine or not, assuming that we know that the circuit is affine (including constants). We can test with some probability what the circuit is if we have no any knowledge of the circuit. How to design methods to learn about the circuit if we do not know anything about it.

Open Research Questions What if other transform are used? –Reed-Muller, Haar, Fourier, Chrestenson? How to use these methods for decomposition and synthesis of Boolean functions? Can this be extended to multiple-valued functions? How to build oracles for other NP problems: –Graph coloring –Set covering –SAT –Hamiltonian path –ESOP minimization

Open Research Questions How to build Quantum Hough Transform? How to build efficient image processing algorithms? How to emulate them on standard FPGAs? How to emulate General Quantum Computers and Grover – like algorithms using FPGAs? How to use heuristic knowledge, such as a chromatic number to improve the speed of Grover Algorithm?

Open Research Questions How to test quantum circuits? How to design quantum circuits to make them even more highly testable? How to simulate quantum circuits more efficiently? How to invent quantum circuits for problems of Computational Intelligence? How to use quantum circuits to control robots?

The end