Introduction to Quantum Computation

Similar documents
Seminar 1. Introduction to Quantum Computing

Single qubit + CNOT gates

Quantum information and quantum computing

Quantum Error Correcting Codes and Quantum Cryptography. Peter Shor M.I.T. Cambridge, MA 02139

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

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

SUPERDENSE CODING AND QUANTUM TELEPORTATION

QLang: Qubit Language

Quantum Computing. Quantum Computing. Sushain Cherivirala. Bits and Qubits

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

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

Lecture 1: Overview of quantum information

Quantum Gates, Circuits & Teleportation

Introduction to Quantum Computing

10.2 Introduction to quantum information processing

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

Quantum Information Processing and Diagrams of States

Quantum Computing: Foundations to Frontier Fall Lecture 3

Chapter 10. Quantum algorithms

Quantum Computation. Michael A. Nielsen. University of Queensland

6.2 Introduction to quantum information processing

CS/Ph120 Homework 1 Solutions

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

10.2 Introduction to quantum information processing

Chapter 10. Superconducting Quantum Circuits

Lecture 1: Introduction to Quantum Computing

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

*WILEY- Quantum Computing. Joachim Stolze and Dieter Suter. A Short Course from Theory to Experiment. WILEY-VCH Verlag GmbH & Co.

Introduction to Quantum Computing. Lecture 1

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

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

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

Short introduction to Quantum Computing

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

6.896 Quantum Complexity Theory September 9, Lecture 2

An Introduction to Quantum Information. By Aditya Jain. Under the Guidance of Dr. Guruprasad Kar PAMU, ISI Kolkata

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

QUANTUM COMPUTER SIMULATION

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

Quantum Computing. Joachim Stolze and Dieter Suter. A Short Course from Theory to Experiment. WILEY-VCH Verlag GmbH & Co. KGaA

quantum mechanics is a hugely successful theory... QSIT08.V01 Page 1

1.0 Introduction to Quantum Systems for Information Technology 1.1 Motivation

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

Some Introductory Notes on Quantum Computing

4th year Project demo presentation

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

Quantum Computation: From Quantum Teleportation to the Shor s Algorithm

Lecture 4: Postulates of quantum mechanics

CSCI 2570 Introduction to Nanocomputing. Discrete Quantum Computation

MAA509: Quantum Computing and Information Introduction

Quantum Information Processing

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

Lecture 3: Hilbert spaces, tensor products

Quantum Information & Quantum Computation

An Introduction to Quantum Information and Applications

Teleportation of Quantum States (1993; Bennett, Brassard, Crepeau, Jozsa, Peres, Wootters)

Quantum Computing. Thorsten Altenkirch

Architecture. Chapter 5. Noson S. Yanofsky c March 24, 2007

An Introduction to Quantum Computation and Quantum Information

Advanced Cryptography Quantum Algorithms Christophe Petit

Introduction to Quantum Information Hermann Kampermann

Lecture 21: Quantum communication complexity

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

Instantaneous Nonlocal Measurements

Basics on quantum information

6.896 Quantum Complexity Theory September 18, Lecture 5

Introduction to Quantum Computing for Folks

Chapter 13: Photons for quantum information. Quantum only tasks. Teleportation. Superdense coding. Quantum key distribution

Quantum Computer. Jaewan Kim School of Computational Sciences Korea Institute for Advanced Study

Physics ; CS 4812 Problem Set 4

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

2. Introduction to quantum mechanics

Lecture: Quantum Information

Lecture 6: Quantum error correction and quantum capacity

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

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

Introduction to Quantum Error Correction

An introduction to Quantum Computing using Trapped cold Ions

A Gentle Introduction to Quantum Computing

Quantum Teleportation Pt. 1

Introduction to Quantum Information Processing

Lecture 11 September 30, 2015

Quantum cryptography. Quantum cryptography has a potential to be cryptography of 21 st century. Part XIII

Quantum computing! quantum gates! Fisica dell Energia!

CS257 Discrete Quantum Computation

Quantum Computers. Peter Shor MIT

DEVELOPING A QUANTUM CIRCUIT SIMULATOR API

QUANTUM INFORMATION -THE NO-HIDING THEOREM p.1/36

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

Unitary Dynamics and Quantum Circuits

Lecture 3: Constructing a Quantum Model

Basics on quantum information

Quantum Computing 101. ( Everything you wanted to know about quantum computers but were afraid to ask. )

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

How quantum computation gates can be realized in terms of scattering theory approach to quantum tunneling of charge transport

Factoring on a Quantum Computer

The information content of a quantum

Lecture 1: Introduction to Quantum Computing

Introduction to Quantum Computing

INTRODUCTION TO QUANTUM ALGORITHMS, POROTOCOLS AND COMPUTING

Transcription:

Chapter 1 Introduction to Quantum Computation 1.1 Motivations The main task in this course is to discuss application of quantum mechanics to information processing (or computation). Why? Education:Asingleq-bitisthesmallestpossiblequantummechanical system. Just a few q-bits are enough to describe (almost) everything that is known. Science:Acollectionofeven0q-bitsiswelldefined,butpoorly understood. Analysis of such systems can bring you to frontiers of (theoretical and experimental) physics. Engineering: Quantum computer is not science fiction, but a technological challenge. 1.1.1 History (1930 s - 1940 s) Development of classical computers hypothetical computer (universal Turing machine) foundation of computer science (Church-Turing thesis) modeling of a computer (von Neumann) information theory (Shannon) development of transistors (Bardeen, Brattain, Shockley) 1

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION (1950 s - 1960 s) Production of classical computers commercial computers (IBM) high level programming language (Fortran) internet (ARPAnet), etc. (1970 s) Development of experimental techniques single atom trapping (trapping of small quantum systems) scanning tunneling microscope (moving around small quantum systems) electronic devices to transfer single electrons, etc. (1980 s - 1990 s) Development of theoretical basis for quantum computes hard to simulate quantum systems (Feynman) non-cloning theorem (Wooters, Zurek) quantum cryptography (Bennett, Bassard) universal quantum computer (Deutsch) factoring algorithm (Shor) search algorithm (Grover) 1.1. Big picture Crisis of the 19th century classical physics gave birth to three types of 0th century physics QuantumPhysics:usuallythestudyofnatureofsmallscales. (last, this and next semester) (000 s-010 s) Production of small noncommercial quantum computers StatisticalMechanics:usuallythestudyofnatureonintermediate scales. (last semester) GeneralRelativity:usuallythestudyofnatureonlargescales. (next semester)

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 3 For the past century quantum mechanics was applied to almost everything with enormous success, but QuantumFieldTheory:givesasatisfactorydescriptionofonly perturbative physics on small scales. QuantumStatisticalMechanics:givesasatisfactorydescription of only equilibrium physics on intermediate scales. QuantumGravity: gives a satisfactory description of physics on large scales. Crisis of the 0th century quantum physics is likely to give birth to some new theories, but it remain unclear what these theories will be. StringTheory/StringFluids? Supersymmetry/Supergravity? QuantumComputation/Information? Whatever it is one should expect it to include all of the 19th and 0th century physics (i.e. perturbative, equilibrium) and perhaps more (e.g. non-perturbative, non-equilibrium) 1.1.3 Q-bit High-EnergyPhysics(e.g. quantum chromodynamics) Cosmology(e.g. eternal inflation) GeneralRelativity(e.g. black holes) CondensedMatter(e.g. superfluids) Biophysics(e.g. polymers) Classical bit can be in one of two states which can be parametrized (or labeled) by 0 or 1. In contrast quantum bit (or qubit, or q-bit) can be in (uncountably) many states which can be parametrized by complex numbers α and β such that α + β = α α + β β = Re(α) + Im(α) + Re(β) + Im(β) =1. (1.1) The reason for the above constraint will become clear shortly. For now note that this implies that the configuration space (or Hilbert space) or a single q-bit is isomorphic to S 3.

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 4 The construction of quantum systems usually (but not always) starts with defining a Hilbert space with vectors (also known as ket vectors) are denoted by Greek letters (e.g. ψ, φ, etc.)andareoftenwrittenusing Dirac notations (e.g. ψ, φ, etc.). The smallest possible quantum system (or a single q-bit) consists of only two basis vectors denoted by 0 and 1 (known as computational basis) and all other vectors are constructed from linear combinations of these vectors (or superposition state) ψ = α 0 + β 1 (1.) where α and β are complex numbers. Furthermore, one defines inner product ( ψ, φ ) =(α 0 + β 1,γ 0 + δ 1 ) α γ + β δ (1.3) and demands that all physical states correspond to vectors with unit norm ψ ( ψ, ψ ) =α α + β β =1. (1.4) (compare with Eq. (1.1)). Note that the inner product can be used to define bra-vectors ψ, as amapfromket-vectorstocomplexnumbers, ψ ( φ ) ( ψ, φ ) (1.5) and the bra-vectors together with ket-vectors can be used to define outer product ψ φ, asamapfromket-vectorstoket-vectors, ψ φ ( χ ) =( φ, χ ) ψ (1.6) Upon measurement of the ket-vector ψ = α 0 + β 1 one can only get classical values of bits (i.e. 0 or 1) withprobabilities p(0) = α α (1.7) p(1) = β β (1.8) so that probabilities add up to one. Clearly most of the (infinite) information about the state is lost after measurement, but by constructing a clever state and designing a clever measurement one can learn relevant information. This is what quantum computation is all about.

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 5 Consider the following parametrization of the state of a single q-bit ( ψ = e iγ cos θ 0 + eiϕ sin θ ) 1 (1.9) with γ [0, π),ϕ [0, π) and θ (0,π]. Itturnsoutthatthe overall phase γ is unobservable which reduces the configuration space of S 3 to only S parametrized by spherical coordinates (θ, φ). This is the so-called Bloch sphere which is nothing but a Hopf fibration of S 3 into S with fiber S 1.NogeneralizationoftheBlochsphereexistformany q-bits, but it turns out that Hopf fibration play an important role for the system of two and three q-bits. Consider a system with two classical bits with only four possible states {00, 01, 10, 11}. Then the Hilbert space of two q-bits has four basis vectors (denotes by 00, 01, 10 and 11 ) and arbitrary ket-vector is represented by superposition with normalization ψ = α 00 00 + α 01 01 + α 10 10 + α 11 11 (1.10) ψ x {0,1} α x = x {0,1} α x α x =1. (1.11) An important example of a state of two q-bits is the Bell state or EPR state 00 + 11. (1.1) Upon measurement of only a single bit (let s say the first bit) the system with end up in either state ψ = α 00 00 + α 01 01 α00 + α 01 (1.13) with probability or state p(0) = α 00 + α 01 (1.14) ψ = α 10 10 + α 11 11 α10 + α 11 (1.15) with probability p(1) = α 10 + α 11. (1.16) (Note, that if we measured the state but did not look at the result of the measurement, then the system is not in a pure state, but in a mixed state described by density matrix ρ = p(0) ψ ψ + p(1) ψ ψ.)

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 6 1. Quantum Computation 1..1 Single q-bit gate Classical information carried by classical bits are manipulated using classical logic gates and quantum information is manipulated using quantum gates. For a single classical bit the only non-trivial gate is the NOT gate given by the following truth table a NOT a 0 1 1 0 (1.17) and the quantum NOT gate is given by or as an operator X X : α 0 + β 1 β 0 + α 1. (1.18) X(α 0 + β 1 ) =( 0 1 + 1 0 )(α 0 + β 1 ) =β 0 + α 1. (1.19) In the matrix representation the ket-vectors are given by column vectors ( ) α α 0 + β 1 (1.0) β bra-vectors are given by row vectors α 0 + β 1 ( α β ) (1.1) and quantum gates are given by square matrices ( U00 U U 00 0 0 + U 01 0 1 + U 10 1 0 + U 11 1 1 01 U 10 U 11 ) (1.) For example quantum NOT gate is given by ( 0 1 X = 1 0 + 1 0 1 0 ). (1.3) The only constraint on the quantum gates is that they must be unitary U U = I. (1.4)

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 7 Clearly the quantum NOT gate satisfies the unitarity condition ( )( ) ( ) 0 1 0 1 1 0 X X = = = I (1.5) 1 0 1 0 0 1 but (in contrast to classical case) there are many others. Some important gates are the Z gate ( ) 1 0 Z (1.6) 0 1 and the Hadamard gate H 1 ( 1 1 1 1 ). (1.7) These quantum gates act on a general state as described in the table below X : α 0 + β 1 β 0 + α 1 (1.8) Z : α 0 + β 1 α 0 β 1 (1.9) H : α 0 + β 1 (α + β) (α β) 0 + 1. (1.30) 1.. Multiple q-bits gates Classical gates are summarized as follows:

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 8 Truth tables are given by. NOT: AND: OR a NOT a 0 1 1 0 a b aandb 0 0 0 0 1 0 1 0 0 1 1 1 a b aorb 0 0 0 0 1 1 1 0 1 1 1 1 (1.31) (1.3) (1.33)

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 9 XOR NAND a b axorb 0 0 0 0 1 1 1 0 1 1 1 0 a b anandb 0 0 1 0 1 1 1 0 1 1 1 0 (1.34) (1.35) NOR XNOR a b anorb 0 0 1 0 1 0 1 0 0 1 1 0 a b axorb 0 0 1 0 1 0 1 0 0 1 1 1 (1.36) (1.37) It can be shown by direct construction that NAND and NOR gates are universal (i.e. arbitrary gate can be constructed out of only NAND gates or out of only NOR gates). For example, NOT(a) = ananda aandb = (anandb) NAND(aNANDb) aorb = (ananda) NAND(bNANDb) anorb = ((ananda) NAND(bNANDb)) NAND((aNANDa) NAND(bNANDb)) axorb = ((anand(anandb)) NAND(bNAND(aNANDb)) anorb = ((anand(anandb)) NAND(bNAND(aNANDb)) NAND ((anand(anandb)) NAND(bNAND(aNANDb))

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 10 Hilbert space of multiple q-bit is formed by tensor product. For example a ket vector of two q-bits can be represented by a four component column vector ψ = α 00 00 + α 01 01 + α 10 10 + α 11 11 α 00 α 01 α 10 α 11 (1.38) Quantum gates for two q-bits are unitary four-by-four matrices. For example, CNOT (or controlled NOT)gate is given by 1 0 0 0 U CNOT = 0 1 0 0 0 0 0 1 (1.39) 0 0 1 0 such that a, b a, a b (1.40) where is sum module two. It can be shown that the CNOT gate and single q-bit gates form a universal set of quantum gates in quantum computing similar to how NAND and NOR gates are universal in classical computing. The CNOT gate can be generalized to create a controlled U gate from arbitrary U gate. Quantum circuit is built from a collection of quantum gates. For example, a, b a, a b (1.41) a (a b),a b = b, a b b, (a b) b = b, a

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 11 Note that unitarity of quantum mechanics puts restrictions onquantum circuits. In particular the two q-bits cannot be looped nor copied. Suppose we try to copy first q-bit ψ = α 0 + β 1 (1.4) into second q-bit (whose initial state without loss of generality may be 0 ) sothatthecombinedstateis ψ 0 = α 00 + β 10. (1.43) After applying the CNOT gate we seem to have copied the classical bit but not the q-bit ψ which would have given us α 00 + β 11 (1.44) ψ ψ = (α 0 + β 1 )(α 0 + β 1 ) (1.45) = α 00 + αβ 01 + αβ 10 + β 11. Unless αβ =0the q-bit was not copied which is in agreement with the so-called non-cloning theorem (proved only in early 80 s). An important class of Bell states can be formed by applying thehadamard gate to the first q-bits which is then used as a control but for the second q-bit a, b β ab 0,b +( 1)a 1,b 1 (1.46)

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 1 1..3 Quantum Teleportation Let us assume that Alice and Bob have q-bits a and b that are in state β 00. Now let say Alice want to send to Bob an arbitrary q-bit c which can be written as ψ = α 0 + β 1 (1.47) which can be teleported using the following quantum circuit. Then the overall initial state is ψ 0 =(α 0 + β 1 ) 1 ( 00 + 11 ) (1.48) after CNOT gate ψ 1 = 1 (α 0 ( 00 + 11 )+β 1 ( 10 + 01 )) (1.49) after Hadamard gate ψ = 1 (α ( 0 + 1 )( 00 + 11 )+β ( 0 1 )( 10 + 01 ))(1.50) = 1 ( 00 (α 0 + β 1 )+ 01 (α 1 + β 0 )) + 1 ( 10 (α 0 β 1 )+ 11 (α 1 β 0 )). Then Alice can measure both q-bits (c and a) andsendtheresultofmeasurements M 1 and M to Bob. What Bob must do to recover the original unknown state ψ is to pass his own bit through M of X gates and M 1 of Z gates.

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 13 1..4 Superdense coding Let us assume that Alice and Bob have q-bits a and b that are in the same state β 00,butnowAlicewantstosendBobtwobitsofclassicalinformation. Depending of what the two bits are she can perform a certain transformation on her bit I if x =00 Z if x =01 U(x) = X if x =10 iy if x =11 then the final state is ( where 1 0 0 1 ) ( ) 1 0 0 1 U(x)β 00 = ( ) 0 1 1 0 ( ) 0 i i i 0 00 + 11 = 00 + 11 = β 00 if x =00 00 + 11 = 00 11 = β 10 if x =01 00 + 11 = 01 + 10 = β 01 if x =10 00 + 11 = 01 10 = β 11 if x =11 β ab 0,b +( 1)a 1,b 1 (1.51) are the Bell states. Then the Alice can send her q-bit and Bob should be able to recover both classical bits since all of Bell states are orthogonal. Indeed CNOT (with the first q-bit being control bit)followed by Hadamard gate on the first q-bit gives us HU CNOT ( 00 + 11 ) = H ( 00 + 10 ) = 00 ( ) 00 11 ( ) HU CNOT = H 00 10 = 10 ( ) 01 + 10 ( ) HU CNOT = H 01 + 11 = 01 ( ) 01 10 ( ) HU CNOT = H 01 11 = 11

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 14 1.3 Quantum Algorithms 1.3.1 Classical computation To show that one can preform classical computations on quantum computer it is sufficient to show that one can simulate NAND and FANOUT gates using unitary transformations. This can be accomplished using Toffoli gate with truth table Then NAND is given by a b c a b c ab 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 0 (1.5) and FANOUT is given by

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 15 1.3. Quantum parallelism. The main advantage of quantum computation is that superposition states (of computational basis) can be used to simultaneously evaluate the same function at different values. For example, consider a binary function f : {0, 1} {0, 1}. (1.53) Let say we built a circuit which evaluates with function, i.e. U f : x, y x, y f(x) (1.54) then ( ) 0 + 1 0,f(0) + 1,f(1) U f 0 =. (1.55) 1.3.3 Deutsch s algorithm We now implement a simple algorithm to demonstrate how quantum circuits can outperform classical ones.

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 16 Then the initial state ψ 0 = 01 (1.56) after passing through Hadamard gates ψ 1 = 1 ( 0 + 1 )( 0 1 ) (1.57) after U f ψ = 1 ( ( 1) f(0) 0 ( 0 1 )+( 1) f(1) 1 ( 0 1 ) ) (1.58) or ψ = 1 ( 0 + 1 ) 1 ( 0 1 ) if f(0) = f(1) = 0 1 ( 0 + 1 ) 1 ( 0 1 ) if f(0) = f(1) = 1 1 ( 0 1 ) 1 ( 0 1 ) if f(0) f(1) = 1 1 ( 0 1 ) 1 ( 0 1 ) if f(0) f(1) = 0 (1.59) and after running the first bit through Hadamard gate 0 1 ( 0 1 ) if f(0) = f(1) = 0 0 1 ψ 3 = ( 0 1 ) if f(0) = f(1) = 1 1 1 ( 0 1 ) if f(0) f(1) = 1 1 1 ( 0 1 ) if f(0) f(1) = 0 (1.60) However and we can rewrite f(0) f(1) = 0 f(0) = f(1) (1.61) ψ 3 = ± f(0) f(1) 1 ( 0 1 ). (1.6)

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 17 Thus by measuring the first q-bit we can find out a global property of our function (i.e. f(0) f(1)) withonlyasingleevaluationoff(x). Aclassical computer would require at least two evaluations. 1.3.4 Deutsch-Jozsa Algorithm Using quantum parallelism even functions of many bits f : {0, 1} n {0, 1} (1.63) can be evaluated using essentially the same quantum gate (1.54) where x is now a multicomponent (or multi-bit) vector. In general the transformation of Hadamard gates is described by H n y = n ( 1) x y x (1.64) x {0,1} n and thus the superposition state can be prepared from 0 n 0000... by passing through Hadamard gates, H n 0 = n x. (1.65) x {0,1} n Then we can generalize the Deutsch circuit to multiple input gates ψ 0 = 000... 1 (1.66) ( ) ψ 1 = n 0 1 (1.67) x {0,1} n x ψ = n ( 1) f(x) x x {0,1} n ψ 3 = n z {0,1} n ( ) 0 1 x {0,1} n ( 1) x z+f(x) z (1.68) ( ) 0 1. (1.69) Now let us suppose that we know for sure that f is either constant f(x) =constant (1.70) or balanced x {0,1} n f(x) = n 1. (1.71)

CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 18 Then, assuming f(x) is constant, if we measure the query bits and if, we would get zero for the first n bits (the last bit is in state 0 1 and need not be measured) with amplitude { 0 n ( 1) x 0+f(x) +1 if f(x) =0 0 = (1.7) 1 if f(x) =1 x {0,1} n and thus due to normalization n x {0,1} n ( 1) x 0+f(x) 0 = { +1 if f(x) =0 1 if f(x) =1. (1.73) On the other hand if f(x) is balanced, we would get zero for all bits with amplitude 0 n x {0,1} n ( 1) x 0+f(x) 0 = 0 0 0 =0 (1.74) Thus if we get zero for all n bits the function must be constant and if we get at least one bit nonzero the function must be balance. To run the same test on the function using classical computers would require not one, but (in the worst case scenario) n 1 +1evaluations of the function.