1
$\begingroup$

enter image description here

Above is a circuit I am provided. I am asked to write down the matrix representation of a $4 \times 4$ matrix representation of a unitary matrix for this circuit.

Using small endian notation (left to right):

The initial state is $|\psi\rangle = |x\rangle |y \rangle$

Then, $(H \otimes I) |x \otimes y \rangle = H|x\rangle \otimes I|y\rangle$ for the post - gate state.

The matrix representation for the unitary matrix $(H \otimes I) $ is

$\frac{1}{\sqrt{2}}\begin{bmatrix} 1 & 1 & 0 & 0 \\ 1 & -1 & 0 & 0 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & -1 \end{bmatrix}$

Am I correct?

$\endgroup$
1
  • $\begingroup$ Whether this is correct depends on the endian-ness convention you are using. Is H on the top qubit and I on the bottom qubit $H \otimes I$ or is it $I \otimes H$. You've correctly computed $I \otimes H$. I think that's the less common convention, but it is used e.g. in Quirk. $\endgroup$ Oct 7 at 16:18

1 Answer 1

2
$\begingroup$

No, you are incorrect. The tensor product is defined as

kronecker product

With this in mind, the answer is

$$ H \otimes I = \frac{1}{\sqrt{2}} \begin{pmatrix} 1\times I & 1 \times I \\ 1 \times I & -1 \times I \end{pmatrix} = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 1 & 0 & -1 & 0 \\ 0 & 1 & 0 & -1 \end{pmatrix}. $$

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.