# Lecture 33: Quantum Computing 2

Artificial Intelligence
Dr. Richard Spillman PLU Fall 2003

1

Class Topics

Future Future NLP Expert Systems Learning Genetic Algorithms Expert Genetic Learning NLP Intro to AI Prolog Lisp Search Systems Algorithms

Search Intro to AI

Prolog Lisp

2

Last Class • Why Quantum Computing? • What is Quantum Computing? • History • Quantum Weirdness • Quantum Properties • Quantum Devices
3

Review – The Need • The size of components will drop down to the one atom per device level by 2020

4

Review - Superposition

• The Principal of Superposition states if a quantum system can be measured to be in one of a number of states then it can also exist in a blend of all its states simultaneously • RESULT: An n-bit qubit register can be in all 2n states at once
– Massively parallel operations

5

Outline

• Quantum Logic Gates II • Quantum Dots • Quantum Error Correction

6

Quantum Logic Gates II
7

Controlled NOT

• One of the first quantum logic gates proposed was the Controlled-NOT gate which implements an XOR
– It has two inputs and two outputs (required for reversibility)
c t The target, t, is inverted when the control, c, is “1”
8

c’ t’

c 0 0 1 1

t 0 1 0 1

c’ 0 0 1 1

t’ 0 1 1 0

Toffoli Gate

• Example of a reversible AND sometimes called controlled-controlled-NOT gate
– It has three inputs and three outputs – The target input is XORed with the AND of the two control inputs
C1 0 0 0 0 1 1 1 1 c2 0 0 1 1 0 0 1 1 t 0 1 0 1 0 1 0 1 c1’ 0 0 0 0 1 1 1 1 c2’ 0 0 1 1 0 0 1 1 t’ 0 1 0 1 0 1 1 0

c1 c2 t

c1’ c2’ t’
9

Quantum Gate Operation

• Suppose the control input is in a superposition state, what happens to the target, does it get flipped or not?
– The answer is that it does both – In fact, c and t become entangled
0 +1 c t 0 c’ t’

00 + 11
Entangled states – that is a superposition of states in which c and t are either both spin up or spin down
10

Quantum Dots

11

Quantum Dots • Quantum dots are small metal or semi-conductor boxes that hold well defined number of electrons • The number of electrons in a box may be adjusted by changing the dots electrostatic environment
– Dots have been made which vary from 30 nm to 1 micron – They hold from 0 to 100 electrons

e
Quantum dot w/electron Quantum dot wo/electron
12

Quantum Dot Wireless Logic

• Lent and Porod of Notre Dame proposed a wireless two-sate quantum dot device called a “cell”
– Each cell consists of 5 quantum dots and two electrons e
e State “1” e State “0”
13

e

Quantum Dot Wire

• By placing two “cells” adjacent to each other and forcing the first cell into a certain state, the second cell will assume the same state in order to lower its energy
e
e

e
e

e
e e

The net effect is that a “1” has moved on to the next cell By stringing cells together in this way, a “pseudo-wire” can be made to transport a signal In contrast to a real wire, however, no current flows
14

Quantum Dot Majority Gate

• Logic gates can be constructed with quantum dot cells
– The basic logic gate for a quantum dot cell is the majority gate
in in in out in in
15

in out

Quantum Dot Inverter

• Two cells that are off center will invert a signal
out in out in out in
16

Quantum Dot Logic Gates

• AND, OR, NAND, etc can be formed from the NOT and the MAJ gates
0 1 A 0 B A 0 B
17

0 0 A and B 1 1 1 A 1 B 1

0 A nand B

A or B

Quantum Error Correction
18

Quantum Errors • PROBLEM: When computing with a quantum PROBLEM computer, you can’t look at what it is doing
– You are only allowed to look at the end

• RESULT: What happens if an error is RESULT introduced during calculation? • SOLUTION: We need some sort of quantum SOLUTION error detection/correction procedure

19

Classical Error Codes
• In standard digital systems bits are added to a data word in order to detect/correct errors • A code is e-error detecting if any fault which causes at most e bits to be erroneous can be detected • A code is e-error correcting if for any fault which causes at most e erroneous bits, the set of all correct bits can be automatically determined • The Hamming Distance, d, of a code is the minimum Distance number of bits in which any two code words differ
– the error detecting/correcting capability of a code depends on the value of d

20

Parity Checking
• PROCESS: Add an extra bit to a word before transmitting to make the total number of bits even or odd (even or odd parity)
– at the receiving end, check the number of bits for even or odd parity – It will detect a single bit error – Cost: extra bit

• Example: Transmit the 8-bit data word 1 0 1 1 0 0 0 1
– Even parity version: 1 0 1 1 0 0 0 1 0 – Odd parity version: 1 0 1 1 0 0 0 1 1

21

Quantum Schemes

• In 1994 the first paper on Quantum error correction was presented at a conference in England
– It required the quantum computer to run simultaneous copies of a calculation – If no errors occurred all the separate copies would produce the same answer – Using a inefficient procedure a wrong answer could be restored

22

Improvements

• In 1995, Peter Shor developed a better procedure using 9 qubits to encode a single qubit of information • His algorithm was a majority vote type of system that allowed all single qubit errors to be detected and corrected

23

Example

• A 3-bit quantum error correction scheme uses an encoder and a decoder circuit as shown below:

Input qubit
Encoder Operations & Errors Decoder

Output qubit

0 0

24

Encoder

• The encoder will entangle the two redundant qubits with the input qubit:
a|0> + b|1> |0> |0>

If the input state is |0> then the encoder does nothing so the output state is |000> If the input state is |1> then the encoder flips the lower states so the output state is |111>

If the input is an superposition state, then the output is the entangled state a|000> + b|111>
25

Decoder
• Problem: Any correction must be done without looking at the output
– The decoder looks just like the encoder:

Corrected output

}Measure: if 11 flip the top qubit
If the input to the decoder is |000> or |111> there was no error so the output of the decoder is:
Input |000> |111> Output |000> |100> (the top 1 causes the bottom bits to flip) Error free flag
26

Example

No Errors: a|000> + b|111> decoded to a|000> + b|100> = (a|0> + b|1>)|00> Top qubit flipped: a|100> + b|011> decoded to a|111> + b|011> = (a|1> + b|0>)|11> So, flip the top qubit = (a|0> + b|1>)|11> Middle qubit flipped: a|010> + b|101> decoded to a|010> + b|110> = (a|0> + b|1>)|10> Bottom qubit flipped: a|001> + b|110> decoded to a|001> + b|101> = (a|0> + b|1>)|01>
27

Decoder w/o Measurement

• The prior decoder circuit requires the measurement of the two extra bits and a possible flip of the top bit
– Both these operations can be implemented automatically using a Toffoli gate

}

If these are both 1 then flip the top bit

28

Possible Capstone

• For a senior project, work out examples of quantum error correction schemes and compare them to digital error correction • Implement a Quantum Dot simulator and construct Quantum Dot circuits

29

Possible Quiz • Remember that even though each quiz is worth only 5 to 10 points, the points do add up to a significant contribution to your overall grade • If there is a quiz it might cover these issues:
– What is a quantum dot? – Why are errors a problem with quantum systems? – What does a controlled NOT gate do?

30

Summary

• Quantum Logic Gates II • Quantum Dots • Quantum Error Correction

31