40
Quantum Computation and Quantum Information – Lecture 3 Part 1 of CS406 – Research Directions in Computing Nick Papanikolaou

Quantum Computation and Quantum Information – Lecture 3

Embed Size (px)

DESCRIPTION

Quantum Computation and Quantum Information – Lecture 3. Part 1 of CS406 – Research Directions in Computing. Nick Papanikolaou. Motivation. Quantum computers are built from wires and logic gates, just as classical computers are - PowerPoint PPT Presentation

Citation preview

Page 1: Quantum Computation and Quantum Information – Lecture 3

Quantum Computation and Quantum Information – Lecture 3

Part 1 of CS406 – Research Directions in Computing

Nick Papanikolaou

Page 2: Quantum Computation and Quantum Information – Lecture 3

Motivation

Quantum computers are built from wires and logic gates, just as classical computers are

The potential of such devices stems from the ability to manipulate superpositions of states

Quantum algorithms solve problems which are not known to be solvable classically!

Page 3: Quantum Computation and Quantum Information – Lecture 3

Lecture 3 Topics

Quantum logic gates Simple quantum circuits Quantum teleportation as a circuit Deutsch’s quantum algorithm

Page 4: Quantum Computation and Quantum Information – Lecture 3

Quantum vs. classical gates

The simplest boolean gate is NOT, with truth table:

Quantum gates have to be defined not only on the equivalents of 0 and 1, but on their superpositions too!

in out

0 1

1 0

Page 5: Quantum Computation and Quantum Information – Lecture 3

Quantum NOT gate: Linearity

Suppose we define a quantum NOT gate as follows:

The action of the quantum NOT gate on a superposition must then be:

All quantum operations are linear

01NOT ,10NOT

01

1NOT0NOT10NOT

Page 6: Quantum Computation and Quantum Information – Lecture 3

The NOT Gate as a Matrix

Because all quantum operations have to be linear, we can represent the action of a quantum gate by a matrix

The quantum NOT, or Pauli-X gate, is written:

01

10X

Page 7: Quantum Computation and Quantum Information – Lecture 3

Quantum State Vectors

Remember that a quantum state is represented by a vector

Notation:

1

01 ,

0

10

10

Page 8: Quantum Computation and Quantum Information – Lecture 3

Quantum NOT

We can express the NOT operation on a general qubit as matrix multiplication:

01

1010X

Page 9: Quantum Computation and Quantum Information – Lecture 3

Other Single Qubit Gates

The Pauli-X gate works on only one qubit Other common single qubit gates are:

– Pauli-Z gate:

– Pauli-Y gate:

– Hadamard gate:

10

01Z

XZY

11

11

2

1NOTH

Z

Y

H

Page 10: Quantum Computation and Quantum Information – Lecture 3

Summary of Simple Gates

X

Z

H

10

10

10

01

10

2

10

2

10

Y10 01 i

Page 11: Quantum Computation and Quantum Information – Lecture 3

Reversibility Requirement

All quantum operations have to be reversible

Boolean operations are not necessarily so A reversible operation is always given by a

unitary matrix, i.e. one for which:

1)*( UUT

Page 12: Quantum Computation and Quantum Information – Lecture 3

The Controlled NOT Gate

The CNOT gate is the standard two-qubit quantum gate

It is defined like this:

1011

1110

0101

0000

CNOT

CNOT

CNOT

CNOT

Page 13: Quantum Computation and Quantum Information – Lecture 3

The Controlled NOT Gate (2)

CNOT is a generalisation of the classical XOR:

The CNOT gate is drawn like this:

ABABA , ,CNOT

“control qubit”

“target qubit”

A

B

A

AB

Page 14: Quantum Computation and Quantum Information – Lecture 3

The Controlled NOT Gate (3)

The matrix corresponding to the CNOT gate is:

The CNOT together with the single qubit gates are universal for quantum computing

0100

1000

0010

0001

CNOT

Page 15: Quantum Computation and Quantum Information – Lecture 3

Quantum Circuits

Using the conventions for control and target qubits, we can build interesting circuits

Example: A Qubit Swap Circuit

A

B A

B

Page 16: Quantum Computation and Quantum Information – Lecture 3

Qubit Swap Circuit

A

B A

BA

BA BA

BBAA )(

ABAB )(

Page 17: Quantum Computation and Quantum Information – Lecture 3

Features of Quantum Circuits

1. No loops are allowed; quantum circuits are acyclic

2. Fan-in is not allowed:

3. Fan-out is not allowed:

Page 18: Quantum Computation and Quantum Information – Lecture 3

Generalised Control Gate

Any quantum gate U can be converted into a controlled gate:

U

One control qubit

n target qubits

If the control qubit is “high,” U is applied to the targets. CNOT is the Controlled-X gate!

Page 19: Quantum Computation and Quantum Information – Lecture 3

Quantum Measurement

Measurement in a quantum circuit is drawn as:

M(classical bit representing outcome of measurement)

10 If then:M = 0 with prob. orM = 1 with prob.

2

2

Page 20: Quantum Computation and Quantum Information – Lecture 3

A Qubit Cloning Circuit?

Using the XOR gate, it is possible to copy a classical bit:

x x

y xy

x

0

x

x

Can we build a quantum circuit that performs does this with qubits?

?

0

Page 21: Quantum Computation and Quantum Information – Lecture 3

A Qubit Cloning Circuit? (2)

0

0

0

0

0

1 1

1

0

10 1100 entangled!!

OK here

Page 22: Quantum Computation and Quantum Information – Lecture 3

A Qubit Cloning Circuit? (3)

11100100

101022

It is impossible to clone a qubit!

Also note that

unwanted terms!

Page 23: Quantum Computation and Quantum Information – Lecture 3

The Bell State Circuit

Hx

y

x y Output

0 0

0

0

1

1

1 1

11002

1

11002

1

10012

1

10012

1

Page 24: Quantum Computation and Quantum Information – Lecture 3

The Bell State Circuit By Example

H0

0

102

1

?

11002

1

10002

1

2

10000

2

10

CNOTCNOT

CNOTCNOT

Page 25: Quantum Computation and Quantum Information – Lecture 3

Quantum Teleportation Circuit

H

XM2 ZM1

11002

1100

M1

M2

Page 26: Quantum Computation and Quantum Information – Lecture 3

Quantum Teleportation Circuit (2)

H

XM2 ZM1

11001110002

11

M1

M2

Page 27: Quantum Computation and Quantum Information – Lecture 3

Quantum Teleportation Circuit (3)

H

XM2 ZM1

01111010

01011000

2

12

M1

M2

Page 28: Quantum Computation and Quantum Information – Lecture 3

Quantum Teleportation Circuit (4)

H

XM2 ZM1

00, 01, 10 or 11

M1

M2

Page 29: Quantum Computation and Quantum Information – Lecture 3

Quantum Teleportation Circuit (5)

If Alice obtains

Then Bob’s qubit is in state

So Bob applies gate

obtaining

00 I

01 X

10 Z

11 Y = ZX

10

01

10

01

10

Page 30: Quantum Computation and Quantum Information – Lecture 3

What have we achieved?

The teleportation process makes it possible to “reproduce” a qubit in a different location

But the original qubit is destroyed!

Next topic: Quantum Parallelism and Deutsch’s quantum algorithm

Page 31: Quantum Computation and Quantum Information – Lecture 3

Quantum Parallelism

Quantum parallelism is that feature of quantum computers which makes it possible to evaluate a function f(x) on many different values of x simultaneously

We will look at an example of quantum parallelism now – how to compute f(0) and f(1) for some function f all in one go!

Page 32: Quantum Computation and Quantum Information – Lecture 3

Quantum Circuits for Boolean Functions

It is known that, for any boolean function

it is possible to construct a quantum circuit Uf

that computes it Specifically, to each binary function f

corresponds a quantum circuit:

1,01,0: f

)(,,: xfyxyxU f

binary addition

Page 33: Quantum Computation and Quantum Information – Lecture 3

Quantum Circuits for Boolean Functions (2)

What can this circuit Uf do? Example:

x x

y yf(x)

0

1

)0(1 ,0

01

10

f

U

U

f

f

fU

Page 34: Quantum Computation and Quantum Information – Lecture 3

Quantum Circuits for Boolean Functions (3)

But what if the input is a superposition?

x x

y yf(x)1fU

102

1

2

)1(,1)0(,0

2

)1(0 ,1)0(0 ,0

2

1000

02

10

ff

ff

U

U

f

f

amazing! we’ve computed f(0) and f(1) at the same time!

Page 35: Quantum Computation and Quantum Information – Lecture 3

Quantum Parallelism Summary

So, a superposition of inputs will give a superposition of outputs!

We can perform many computations simultaneously

This is what makes famous quantum algorithms, such as Shor’s algorithm for factoring, or Grover’s algorithm for searching

Simple q. algorithm: Deutsch’s algorithm

Page 36: Quantum Computation and Quantum Information – Lecture 3

Deutsch’s Algorithm

David Deutsch: famous British physicist Deutsch’s algorithm allows us to compute,

in only one step, the value of

To do this classically, you would have to:1. compute f(0)2. compute f(1)3. add the two results

– Remember:

)1()0( ff

1,01,0: f

Page 37: Quantum Computation and Quantum Information – Lecture 3

Circuit for Deutsch’s Algorithm

x x

y yf(x)

H

H

H0

1

010 2

10

2

101

fU

Page 38: Quantum Computation and Quantum Information – Lecture 3

Circuit for Deutsch’s Algorithm (2)

x x

y yf(x)

H

H

H0

1

2

10

2

10 ),1()0( if

2

10

2

10 ),1()0( if

2

ff

ff

fU

Page 39: Quantum Computation and Quantum Information – Lecture 3

Circuit for Deutsch’s Algorithm (3)

x x

y yf(x)

H

H

H0

1

2

101 ),1()0( if

2

100 ),1()0( if

3

ff

ff

2

10)1()0(

tosimplifies this

3

ff

...and so we have computed

)1()0( ff

fU

Page 40: Quantum Computation and Quantum Information – Lecture 3

End of Lecture 3

Congratulations! If you are still awake, you have learned something about:– quantum gates (X, Y, Z, H, CNOT)– quantum circuits (swapping, no-cloning problem)– teleportation– quantum parallelism– and Deutsch’s algorithm