Chapter 5: Architecture - Computer and Information Science - CUNY

Chapter 5: Architecture - Computer and Information Science - CUNY Chapter 5: Architecture - Computer and Information Science - CUNY

sci.brooklyn.cuny.edu
from sci.brooklyn.cuny.edu More from this publisher
28.06.2014 Views

24 CHAPTER 5. ARCHITECTURE also has three inputs and three outputs. |x〉 • |x〉 (5.65) |y〉 × |y ′ 〉 |z〉 × |z ′ 〉 The top |x〉 input is the control input. The output is always the same |x〉. If |x〉 is set to |0〉, then |y ′ 〉 = |y〉 and |z ′ 〉 = |z〉, i.e., the values stay the same. If, on the other hand, the control |x〉 is set to |1〉, then the outputs are reversed: |y ′ 〉 = |z〉 and |z ′ 〉 = |y〉. In short |0, y, z〉 ↦→ |0, y, z〉 and |1, y, z〉 ↦→ |1, z, y〉. Exercise 5.3.4 Show that the Fredkin gate is its own inverse. The matrix that corresponds to the Fredkin gate is 000 001 010 011 100 101 110 111 ⎡ ⎤ 000 1 0 0 0 0 0 0 0 001 0 1 0 0 0 0 0 0 010 0 0 1 0 0 0 0 0 011 0 0 0 1 0 0 0 0 100 0 0 0 0 1 0 0 0 . (5.66) 101 0 0 0 0 0 0 1 0 ⎢ ⎥ 110 ⎣ 0 0 0 0 0 1 0 0 ⎦ 111 0 0 0 0 0 0 0 1 The Fredkin gate is also universal. By setting y to |0〉 we get the AND gate as follows:

5.4. QUANTUM GATES 25 |x〉 • |x〉 (5.67) |0〉 × |x ∧ z〉 |z〉 × |(¬x) ∧ z〉 The NOT gate and the fanout gate can be obtained by setting |y〉 to |1〉 and |z〉 to |0〉. This gives us |x〉 • |x〉 (5.68) |1〉 × |¬x〉 |0〉 × |x〉 So both the Toffoli and the Fredkin gates are universal. Both are not only reversible gates, but a look at their matrices show that they are also unitary. In the next section we shall look at other unitary gates. 5.4 Quantum Gates A quantum gate is simply any unitary matrix that manipulates qubits. We have already worked with some quantum gates such as the Identity matrix, the Hadamard gate, the NOT gate, the controlled-NOT gate, the Toffoli gate and the Fredkin gate. What else is there? Let us first concentrate on quantum gates that manipulate a single qubit.

24 CHAPTER 5. ARCHITECTURE<br />

also has three inputs <strong>and</strong> three outputs.<br />

|x〉<br />

•<br />

|x〉<br />

(5.65)<br />

|y〉<br />

×<br />

|y ′ 〉<br />

|z〉<br />

×<br />

|z ′ 〉<br />

The top |x〉 input is the control input. The output is always the same |x〉. If<br />

|x〉 is set to |0〉, then |y ′ 〉 = |y〉 <strong>and</strong> |z ′ 〉 = |z〉, i.e., the values stay the same. If,<br />

on the other h<strong>and</strong>, the control |x〉 is set to |1〉, then the outputs are reversed:<br />

|y ′ 〉 = |z〉 <strong>and</strong> |z ′ 〉 = |y〉. In short |0, y, z〉 ↦→ |0, y, z〉 <strong>and</strong> |1, y, z〉 ↦→ |1, z, y〉.<br />

Exercise 5.3.4 Show that the Fredkin gate is its own inverse.<br />

The matrix that corresponds to the Fredkin gate is<br />

000 001 010 011 100 101 110 111<br />

⎡<br />

⎤<br />

000 1 0 0 0 0 0 0 0<br />

001 0 1 0 0 0 0 0 0<br />

010 0 0 1 0 0 0 0 0<br />

011 0 0 0 1 0 0 0 0<br />

100 0 0 0 0 1 0 0 0<br />

. (5.66)<br />

101 0 0 0 0 0 0 1 0<br />

⎢<br />

⎥<br />

110 ⎣ 0 0 0 0 0 1 0 0 ⎦<br />

111 0 0 0 0 0 0 0 1<br />

The Fredkin gate is also universal. By setting y to |0〉 we get the AND gate<br />

as follows:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!