28.06.2014 Views

Chapter 5: Architecture - Computer and Information Science - CUNY

Chapter 5: Architecture - Computer and Information Science - CUNY

Chapter 5: Architecture - Computer and Information Science - CUNY

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

16 CHAPTER 5. ARCHITECTURE<br />

First, let’s calculate the tensor product:<br />

⎡ ⎤<br />

0 0 0 1<br />

⎡ ⎤ ⎡ ⎤<br />

NOT ⊗ NOT = ⎣ 0 1 ⎦ ⊗ ⎣ 0 1<br />

0 0 1 0<br />

⎦ =<br />

. (5.52)<br />

1 0 1 0 ⎢<br />

⎣<br />

0 1 0 0⎥<br />

⎦<br />

1 0 0 0<br />

This DeMorgan’s law corresponds to the following identity of matrices:<br />

⎡ ⎤<br />

0 0 0 1<br />

⎡ ⎤ ⎡ ⎤<br />

⎡ ⎤<br />

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

0 0 1 0<br />

⎦ ⋆<br />

= ⎣ 1 0 0 0 ⎦ . (5.53)<br />

1 0 0 0 0 1 ⎢<br />

⎣<br />

0 1 0 0⎥<br />

⎦<br />

0 1 1 1<br />

1 0 0 0<br />

Exercise 5.2.6 Multiply out these matrices <strong>and</strong> confirm the identity.<br />

There is one last piece of notation that must be included. Usually at the end<br />

of a computation a measurement will be performed. A measurement of qubit(s)<br />

shall be denoted with<br />

(5.54)<br />

<br />

Exercise 5.2.7 Formulate the other DeMorgan’s law ¬(¬P ∨ ¬Q) = P ∧ Q in<br />

terms of matrices<br />

Exercise 5.2.8 Write the matrix that would correspond to a one-bit adder. A<br />

one-bit adder adds the bits x, y <strong>and</strong> c ( a carry-bit from an earlier adder) <strong>and</strong><br />

outputs the bits z <strong>and</strong> c ′ (a carry-bit for the next adder). There are three inputs<br />

<strong>and</strong> two outputs, so the matrix will be of dimension 2 2 by 2 3 . Hint: Mark<br />

the columns as 000, 001, 010, . . . , 110, 111 where column, say, 101 corresponds<br />

to x = 1, y = 0, c = 1. Mark the rows as 00, 01, 10, 11 where row, say, 10,<br />

corresponds to z = 1, c ′ = 0. When x = 1, y = 0, c = 1, the output should be<br />

z = 0 <strong>and</strong> c ′ = 1. So place a 1 in the row marked 01 <strong>and</strong> a 0 in all other rows.

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

Saved successfully!

Ooh no, something went wrong!