I would like to know how the unitary matrix for this circuit looks like: enter image description here

I'm not sure but I would try something like this:

First part:

$\begin{pmatrix}1&0\\0&0\end{pmatrix}\otimes H_1=\begin{pmatrix}\frac{1}{\sqrt{2}}&\frac{1}{\sqrt{2}}&0&0\\\frac{1}{\sqrt{2}}&-\frac{1}{\sqrt{2}}&0&0\\0&0&0&0\\0&0&0&0\end{pmatrix}$

Second part:

$\begin{pmatrix}0&0\\0&1\end{pmatrix}\otimes I_1=\begin{pmatrix}0&0&0&0\\0&0&0&0\\0&0&1&0\\0&0&0&1\end{pmatrix}$

putting them together:


I'm not sure if that's right, that's just a consideration of mine.

Assuming the circuit would look like that, what does the matrix look like?

enter image description here


Your matrix representation is incorrect. In the first case, a $\mathbf H$ gate is applied to the first qubit $A$ and an identity gate $\Bbb I$ is applied to the second qubit $B$. So the effective quantum gate acting on the two-qubit system is $\mathbf H\otimes \Bbb I$. This is precisely because $(\mathbf H|0\rangle_A) \otimes (\Bbb I|0\rangle_B) = (\mathbf H\otimes \Bbb I)(|0\rangle_A \otimes |0\rangle_B)$ as explained here. Similarly, for the second case, the effective quantum gate is $\Bbb I\otimes \mathbf H$. If you know the matrix representations of $\mathbf H$ and $\Bbb I$, simply calculate the two Kronecker products, to get the corresponding matrix representations.

  • $\begingroup$ That's right, you're absolutely right. Now I have seen my mistake. Thank you! $\endgroup$ – P_Gate May 16 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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