This exercise wants me to prove the equivalence of the two circuits using their mathematical representations.
Circuit 1:
Circuit 2:
Circuit 1 (q1
CNOT q0
) should be represented by $I \otimes P_0 + X \otimes P_1$. Circuit 2 (Hadamard q0
and q1
, q0
CNOT q1
, Hadamard q0
and q1
) should be $(H \otimes H)(P_0 \otimes I + P_1 \otimes X)(H \otimes H)$.
I use the following identities $$P_0 + P_1 = I = P_{+} + P_{-}$$ $$X = P_{+} - P_{-}$$ $$Z = P_0 - P_1$$ $$P_{+} = HP_0H$$ $$P_{-} = HP_1H$$ where $P_0, P_1, P_{+}, P_{-}$ are $|0\rangle\langle 0|$, $|1\rangle \langle 1|$, $|+\rangle \langle +|$, and $| - \rangle \langle - |$ respectively.
I take circuit 1 and get this: $$I \otimes P_0 + X \otimes P_1$$ $$= (P_{+} + P_{-}) \otimes P_0 + (P_{+} - P_{-}) \otimes P_1$$ $$= P_{+} \otimes (P_0 + P_1) + P_{-} \otimes (P_0 - P_1)$$ $$= P_{+} \otimes I + P_{-} \otimes Z$$ $$= HP_0H \otimes I + HP_1H \otimes Z$$
Are my circuit representations correct to begin with? If so, should the Z operator be there? Any help would be appreciated.