Chapter 5: Architecture - Computer and Information Science - CUNY
Chapter 5: Architecture - Computer and Information Science - CUNY
Chapter 5: Architecture - Computer and Information Science - CUNY
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
20 CHAPTER 5. ARCHITECTURE<br />
will be the same as the input. If |x〉 = |1〉 then the bottom output will be the<br />
opposite. If we write the top qubit first <strong>and</strong> then the bottom qubit, then the<br />
controlled-not gate takes |x, y〉 to |x, x ⊕ y〉 where ⊕ is the binary exclusive or<br />
operation.<br />
The matrix that corresponds to this reversible gate is<br />
00 01 10 11<br />
⎡<br />
⎤<br />
00 1 0 0 0<br />
01 0 1 0 0<br />
⎢<br />
⎥<br />
10 ⎣ 0 0 0 1 ⎦ . (5.57)<br />
11 0 0 1 0<br />
The controlled-not gate can be reversed by itself.<br />
figure<br />
Consider the following<br />
|x〉<br />
•<br />
|x〉<br />
•<br />
|x〉<br />
(5.58)<br />
|y〉<br />
<br />
|x ⊕ y〉<br />
<br />
|x ⊕ x ⊕ y〉<br />
State |x, y〉 goes to |x, x ⊕ y〉 which further goes to |x, x ⊕ (x ⊕ y)〉. This last<br />
state is equal to |x, (x ⊕ x) ⊕ y〉 because ⊕ is associative. Since x ⊕ x is always<br />
equal to 0, this state reduces to the original |x, y〉.<br />
Exercise 5.3.1 Show that the controlled-NOT gate is its own inverse by multiplying<br />
the corresponding matrix by itself <strong>and</strong> getting the identity.<br />
An interesting reversible gate is the Toffoli gate: