17
Abstraction of Deutsch Algorithm and Its Implementation on QCL

Abstraction of Deutsch Algorithm and Its Implementation on QCL

Embed Size (px)

Citation preview

Page 1: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Abstraction of Deutsch Algorithm and Its Implementation on QCL

Page 2: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Quantum Computer in Present Many researchers have been tried to imple-

ment Quantum Computer from 1990s.

First quantum computer is demonstrated At Supercomputing 2007 Conference It’s said it’s not perfect quantum computer But it’s definitely faster

http://kr.youtube.com/watch?v=pzFTXYJ2J1I http://kr.youtube.com/watch?v=OgcTK29QeA0

Page 3: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Deutsch’s algorithm is

Proposed by Prof. David Deutsch of Oxford

On his homepage, http://www.qubit.org/people/david/, he provided introductory video lectures on quantum computing

The first one that proved quantum computer is faster

Page 4: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Oracle function

Goal of the algorithm Determine is constant or balanced

Constant: or Balanced: or

BlackBox

Page 5: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Qubit representation (modified)

1

0

1

0

|0>

1

0

|0> + |1>

|1>

1

0

|1>

|0> +

Page 6: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Hadamard Transform (Operator or Gate)

H

1

0

|0>

1

0

|1>

|0> +

Page 7: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Hadamard Transform (Operator or Gate)

H

1

0

|1>

|0>1

0

|1>

Page 8: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Oracle function

Goal of the algorithm Determine is constant or balanced

Constant: or Balanced: or

BlackBox

Page 9: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Quantum Circuit Design

Measurement If result is 0, is constant If result is 1, is balanced

BlackBox

H

H

H|0>

|1>

Mea-sure

Page 10: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Case 1:

BlackBox

H

H

H|0>

|1>

|0>

Page 11: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Case 2:

BlackBox

H

H

H|0>

|1>

|0>

Page 12: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Case 3:

BlackBox

H

H

H|0>

|1>

|1>

Page 13: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Case 4:

BlackBox

H

H

H|0>

|1>

|1>

Page 14: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Implementation on QCL – main function

procedure main() {qureg x[1];qureg y[1];int m; {

reset;U(x, y);measure y, m;

} until m == 1;measure x,m;print "g(0) xor g(1) =", m;reset;

}

Page 15: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Implementation on QCL – U operator

operator U(qureg x, qureg y) {H(x);H(y);F(x, y);H(x);

}

BlackBox

H

H

H|0>

|1>

Mea-sure

Page 16: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Implementation on QCL – F and f function

const coin1=(random()>=0.5);const coin2=(random()>=0.5); // result

boolean g(boolean x) {if coin1 return coin2; // constant return x xor coin2; // balanced

}

qufunct F(quconst x, quvoid y) {if f(0) xor f(1)

CNot(y,x);if f(0)

Not(y);}

Page 17: Abstraction of Deutsch Algorithm and Its Implementation on QCL

Deutsch’s Algorithm Discussion

Call by Value? or Call by Reference?

Local variable for qubit is valid? Qubits cannot be cloned

Measuring operation destroys qubit to simple boolean value Measuring cannot be placed in an iteration

Conclusion QCL is more like hardware simulator, not pro-

gramming lang. It just looks like C such as FPGA design languages