# Homework Help: Quantum Computation 4x4 Unitary Matrix for Circuit

Tags:
1. Oct 19, 2012

### jumi

1. The problem statement, all variables and given/known data
What is the 4x4 unitary matrix for the circuit in the computational basis.

2. Relevant equations

We were given the following relationship in our notes: .

By letting $A = H$ and $B = I$, the answer is supposedly supposed to be: simply by inspection (where H is the Hadarmard gate and I is the identity matrix).

3. The attempt at a solution

Unfortunately, I found a different result. By running the basis states through the circuit, I came up with the following:
$\left| 00 \right\rangle \rightarrow H(\left|0\right\rangle)\left|0\right\rangle = ( \frac{1}{\sqrt{2}} \left|0\right\rangle + \frac{1}{\sqrt{2}} \left|1\right\rangle ) \left|0\right\rangle = \frac{1}{\sqrt{2}}\left|00\right\rangle + \frac{1}{\sqrt{2}}\left|10\right\rangle$

Using this method for each computational basis, I was able to generate the following matrix by inspection:

Why are the answers so vastly different? What is the correct one?