Top Banner
Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST
22

Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Dec 13, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Quantum Computing and Quantum Programming Language

Choon Oh Lee

ISILab, KAIST

Page 2: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Motivation

• Moore’s Law– Number of transistors per square inch dou-

bles every two years.

– Expected be broken down in 2020• Atomic scales are reached

• Incoherent by any particle

– Solutions• Fatalists: Noise-based Computing

• Optimists: Quantum Computing

Page 3: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Bit vs. Qubit

or

or

NAND and NOR gate

Value

Realization

Computation

Universalcompo-nent

various candidates(Ion trap, NMR, etc.)

Controlled Not gate

0 1

0 V

5 V

0 0 1 0 1 0 1 0 0 1

ADDER

0 1 1 1 0

S S S S S

Q. Circuit

S S S S S

0 1 1 1 0

Measuring

Page 4: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

How’s qubit possible?

• The legendary experiment– By David Wineland and Christopher Monroe

– Steps1. Pin Barium ion in vacuum room

2. Optical freezing on ion to deactivate it

3. Expose ion on laser pulse for certain time– Barium ion had superposition

4. Slightly push ion using laser beam – One ion existed on two different spots

– Remarks

• Superposition is collapsed in 25~50 microsecond

• NIST scientists succeed to make first controlled not gate based on this experiment

Page 5: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Conceptual Models

• Quantum Circuit

• Matrix Mechanics

Computational Model

Algorithmic Model

A

C

B

D

M

M

2 by 1 2 by 12 by 22 by 22 by 22 by 24 by 4

Page 6: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Quantum Gates

• Pauli Gates – Identity (I)

– Not Gate (X)

– Y Gate

– Z Gate

Page 7: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Quantum Gates

• Hadamard Gate (H)– Make a qubit superpositioned.

Page 8: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Quantum Gates

• Controlled Not Gate (cNot)– Apply NOT gate on second bit when first bit

is 1.

Page 9: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Quantum Gates

• Measurement (M) – Technically, it’s not a gate

– It measures a qubit to determine its value

– Output of measurement would be 0 or 1• Probability to be 0:

• Probability to be 1:

– After it measures qubit, qubit becomes just bit

Page 10: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Algorithms

• Quantum Teleportation– Qubits cannot be copied or moved

– How to teleport a qubit

1. Prepare two entangled qubits,

2. Alice and Bob take each qubit initially

3. Alice wants to send an another qubit to Bob

Page 11: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Algorithms

• Quantum Teleportation

H M

M

Z

Alice’s qubit

Bob’s qubit

Originalqubit

Same qubit

Page 12: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Algorithms

• Quantum Teleportation

– Initial state

H M

M

Z

Alice’s qubit

Bob’s qubit

Originalqubit

Same qubit

Page 13: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Algorithms

• Quantum Teleportation

– Previous state

– Current state

H M

M

Z

Alice’s qubit

Bob’s qubit

Originalqubit

Same qubit

Page 14: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Algorithms

• Quantum Teleportation

– Previous state

– Current state

H M

M

Z

Alice’s qubit

Bob’s qubit

Originalqubit

Same qubit

Page 15: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Algorithms

• Quantum Teleportation

– Rearrange current state

H M

M

Z

Alice’s qubit

Bob’s qubit

Originalqubit

Same qubit

Page 16: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Algorithms

• Quantum Teleportation

– Measure first two qubits

H M

M

Z

Alice’s qubit

Bob’s qubit

Originalqubit

Same qubit

Page 17: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Algorithms

• Grover’s Search Algorithm– Searching desired items from database

– Instead of checking every items in data-base, algorithm increases probabilities that desired items can be found decreasing oth-ers’

– Idea is simple, but point is quantum parallelism!

Page 18: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Algorithms

• Grover’s Search Algorithm

0 1 2 3 4 5 6 7

Probability(amplitude)2

0 1 2 3 4 5 6 7

Probability(amplitude)2

1. Apply Hadamard gates to make superposition

Page 19: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Algorithms

• Grover’s Search Algorithm

0 1 2 3 4 5 6 7

Probability(amplitude)2

0 1 2 3 4 5 6 7

Probability(amplitude)2

2. Apply function f

Page 20: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Algorithms

• Grover’s Search Algorithm

0 1 2 3 4 5 6 7

Probability(amplitude)2

3. Flip probability based on average point

0 1 2 3 4 5 6 7

Probability(amplitude)2

Average line

Average line

Page 21: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Algorithms

• Shor’s Factoring Algorithm– Great algorithm that attracted the world’s at-

tention to quantum computing

– Proposed shortcut to break RSA system• The source of RSA’s power is hardness of factor-

ization of a big number which is product of two prime numbers

– Best known way to factor a number, N1. Find a and b where N divides (a2 – b2)

2. If N doesn’t divide (a + b) and (a – b),

3. Then, gcd(N, (a + b)) is one of factors of N

4. Another factor is then N / gcd(N, (a + b))

Page 22: Quantum Computing and Quantum Programming Language Choon Oh Lee ISILab, KAIST.

Algorithms

• Shor’s Factoring Algorithm– Algorithm

input: an odd integer n

1. Choose g in [2…n-1] randomly

2. Calculate d = gcd(g, n)

3. If d ≠ 1, return d

4. Calculate r where gr = 1 (mod n)

5. If r is even, and n doesn’t divide gr/2+1 or gr/2-1, then return gcd(n, gr/2+1)

6. Re-find r or g

– Shor used superpositioned qubits to repre-sent g and QFT to calculate r