40
Quantum Algorithms Preliminaria Artur Ekert

Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

  • View
    224

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum AlgorithmsPreliminaria

Quantum AlgorithmsPreliminaria

Artur Ekert

Page 2: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Computation

INPUT OUTPUT

010101

11

0010

Physics Inside(and outside)

THIS IS WHAT OUR LECTURES WILL BE ABOUT

Page 3: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Classical deterministic computation

Initial configuration(input)

Final configuration(output)

Configuration = complete specification of the state of the computer and data

Physically allowed operations, computational steps

Intermediate configurations

Page 4: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Classical deterministic computation

0

10 1

0

0

0 0

0

1 1

1

000 001 101 110

Computational steps – moves from one configuration to another – are performed by elementary operations on bits

Page 5: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Boolean Networks

0

10 1

0

0

0 0

0

1 1

1

NOT

OR AND

OR

0

0

0

1

1

0

Page 6: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Basic operations = logic gates

01

01

01

10

AND1

0OR

Wire, identity

NOT

11

Logical AND

00

Logical OR

Output 0 apart from the (1,1) input

Output 1 apart from the (0,0) input

Fan out

X

X

X

Page 7: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Classical probabilistic computation

1P 2P

3P 4P 1 2 3 4P PP PP

Input Possible outputs

Page 8: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum computation

1A 2A

4A

1 2 3 4A A A A A

* *1 2

2

1 2 3 4

2 2

3

1 3 4

4

2

Re2

P A A A A

A A A

A A A

A

A

3A

Constructive or destructive interference: enhance correct outputssuppress wrong outputs

GOOD SIDE: extra computational powerBAD SIDE: sensitive to decoherence

Page 9: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum computation

0

0

0 10 1

2

0

0

10 1

2

0

Initial configurationof the three qubits

000

000

001

1

2

1

2

000

100

001

101

1

2

1

2

0

1

2

1

2

Page 10: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Bits and Qubits

1 0 1 0 10

BIT QUBIT

Page 11: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum Boolean Networks

H0

0

H0

10 1

2

0

0

0

0 10 1

2

0

0

10 1

2

0

0

H 0

000 1000 001

2 1

000 1002

Page 12: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum operations

H0

0

H0

10 1

2

0

H 0

Page 13: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Single qubit gates

0 0

1 1ie

1 0

0 iRe

H

10 0 1

21

1 0 12

1 11

1 12H

Hadamard

Continuous set of phase gates

kR 2

2

0 0

1 1k

i

e

2 / 2

1 0

0kk i

Re

Discrete set of phase gates

Page 14: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Single qubit interference

0

10

1

2 1 00 cos

2P

2 1 01 sin

2P

0

1

H H

1 0 1

2

1

0

0P

0

Page 15: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Any single qubit interference

H H

0 10 1

2 1

0 12

ie cos 0 sin 12 2

i

INPUT OUTPUT

cos sin1 1 1 0 1 11 1 2 21 1 0 1 12 2 sin cos

2 2

ii

ie

ei

in the matrix form

Page 16: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Any unitary operation on a qubit

H H

0 cos 0 sin 12 2

iie

INPUT OUTPUT

cos sin1 0 1 1 1 0 1 11 1 2 20 1 1 0 1 12 2 sin cos

2 2

ii i

i i

ie

e eie e

in the matrix form – the most general SU(2) operation on a single qubit

Page 17: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Possible implementations

© ENS Paris

Page 18: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Two and more qubits

1 0 1 101 5

Notation

1

0

1

2 1

00,1

d

d xx

x x

Page 19: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Operations on two qubits

1 0 0 0

0 1 0 0

0 0 0 1

0 0 1 0

Controlled-NOT

Controlled-U

U

0 0 0 0

0 1 0 1

1 0 1 1

1 1 1 0

0 0 0 0

0 1 0 1

1 0 1 0

1 1 1 1

U

U

1 0 0 0

0 1 0 0

0 0 0 0

0 0 0 0

U

Page 20: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum interferometry revisited

H H

H H

Uu u

iU u e u

REMEMBER THIS TRICK !

Page 21: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Phases in a new way

H H

Uu

0

u

cos 0 sin 12 2

i

10 1

21 10 1

2 2

u

u u

1 10 1

2 21

0 12

i

u U u

e u

Page 22: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Entangled states

H

0

0

10 0 1 1

2

10 0 1 1

2

1 10 0 0 1 0 0 1

2 2

entangled

separable

Page 23: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Bell & GHZ states

H

100 0 0 1 1

21

01 0 1 1 021

10 0 0 1 121

11 0 1 1 02

H

1000 0 0 0 1 1 1

21

001 0 0 1 1 1 02

...ETC

Page 24: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Useful decomposition of any U in

SU(2)

1 1x xU B BA A

For any U in SU(2)

A A-1 B B-1

1xA A

Rotation by around some axis a

1xB B

Rotation by around some axis b

Recall that x represents rotation by around axis x

Rotation by twice the angle between axis a and b around

the axis perpendicular to a and b

1 1x xB BA A

Page 25: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Building controlled-U operations

A A-1 B B-1 U

=

A, A-1, B and B-1 are single qubit operations and can be constructed from the Hadamard and phase gates.

Controlled-U can be constructed from single qubit operations and the controlled-NOT gates.

Hence any controlled-U gate can be constructed from the Hadamard, the controlled-NOT and phase gates.

Page 26: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Toffoli Gate

=

2RH †2R 2R H

2R2

2

2

0 0

1 1 1i

e i

2

2

1 0

0k

ikRe

Page 27: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Controlled-controlled NOT

1x

2x

y

1x

2x

1 2x x y

Computes logical AND

1x

2x

y

1x

1 2SUM x x

1 2CARRY x x

Quantum adder

Page 28: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum Networks

2RH †2R 2R H

Quantum adder

H

H

H

H

Quantum Hadamard transform

Page 29: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum Hadamard Transform

H0

H0

0 1

0 1

20,1

1 10 0 0 0 0 1 1 0 1 1

4 4 xx

H0

H1

0 1

0 1

0

20,1

1 10 1 0 0 0 1 1 0 1 1 1

4 4x

x

x

Page 30: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum Hadamard Transform

H0

H0

H0

H0

0 1

0 1

0 1

0 1

/ 2

0,1

10

2 nn

x

x

H0

H1

H1

H1

0 1

0 1

0 1

0 1

/ 20,1

11

2 n

z x

nx

z x

1 2 1 0...n nz z z z z

1 2 1 0...n nx x x x x 0 0 1 1 2 2 1 1... n nx z x z x z x z z x

Page 31: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum Hadamard Transform

/ 20,1

11

2 n

z x

nx

z x

Is also known as the quantum Fourier transform on group 2n

Z

2Z group 0,10= the set with operation (addition mod 2)

2n

Z group 0,1n

0 = the set with operation (addition mod 2 bit by bit)

010101110010011

110101101011101

100000011001110

example for n=15

Page 32: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum Fourier Transform

/ 20,1

11

2 n

z x

nx

z x

Quantum Fourier transform on group 2n

Z

21

/ 20

1

2

iN zxN

nx

z e x

Quantum Fourier transform on group NZ

Page 33: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Recall

H

10 0 1

21

1 0 12

1 11

1 12H

Hadamard

kR 2

2

0 0

1 1k

i

e

2 / 2

1 0

0kk i

Re

Discrete set of phase gates

Page 34: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum Fourier Transform

H0x 02 0.0 1i xe

H

H0x

1x 2R

02 0.0 1i xe

1 02 0.0 1i x xe

H

H0x

1x 2R

02 0.0 1i xe

1 02 0.0 1i x xe

H2x 2 1 02 0.0 1i x x xe 2R 3R

F1

F2

F3

Page 35: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum Fourier Transform

H

H0x

1x 2R

H2x 2R 3R

2R 3R 4RH3x

3y

2y

1y

0y

2

21

2

n

ixy

ny

x e y

Uniform family of networks

n Hadamard gates and n(n-1)/2 phase shifts, the size of the network = n(n+1)/2

Page 36: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum Fourier Transform

H

H0x

1x 2R

H2x 2R 3R

2R 3R 4RH3x

3y

2y

1y

0y

1 2 0

22 0. ...2

1 1

2 2

n n n

ixy i x x x y

n ny y

x e y e y

Page 37: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum Fourier Transform

H

H0x

1x 2R

02 0.0 1i xe

1 02 0.0 1i x xe

H2x 2 1 02 0.0 1i x x xe 2R 3R

F3

H

H 0x

1x2R

H 2x2R3R

Fy3

02 0.0 1i xe

1 02 0.0 1i x xe

2 1 02 0.0 1i x x xe

Page 38: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum function evaluation

fy

x

: 0,1 0,1n

f Boolean function

0x1x2x3x4x

0x1x2x3x4x

x

( )y f x

( )x y x y f x

Page 39: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum function evaluation

1my

x

: 0,1 0,1n m

f can be viewed as m Boolean functions

0x1x2x3x

0x1x2x3x

x

1 1( )m m

y f x fm-1

fm-22my

0y f0

……

……

……

2 2( )m m

y f x

0 0( )y f x

Page 40: Quantum Algorithms Preliminaria Artur Ekert. Computation INPUT OUTPUT 0 1 0 1 0 1 1 1 0 0 1 0 Physics Inside (and outside) THIS IS WHAT OUR LECTURES WILL

Quantum function evaluation :f X Y

Group X

Group (Y, )

x y x y f x

x y x y f x bit by bit addition – group 2Zm

mod2mx y x y f x modular addition – group m2Z

m

2

2

Z

Z mod2

m

m