0
$\begingroup$

How can I construct a CNOT gate using a CZ and H gates?

And I also need to prove it using these identities:

\begin{equation} H = (1/\sqrt{2})(X+Z)\\ XZ = -ZX\\ X^2 = Z^2 = H^2 = 1\\ HXH = Z\\ HZH = X\\ \end{equation}

Thank you!

$\endgroup$
5
  • $\begingroup$ Does this answer your question? Making a Controlled-Z from a CNOT $\endgroup$
    – KAJ226
    May 8, 2021 at 21:05
  • $\begingroup$ No sir, its the other way around... $\endgroup$
    – user15791
    May 8, 2021 at 21:08
  • $\begingroup$ The title of that question is a bit deceptive but if you read what the question, you will see it is the same as yours... The person was asking to help with constructing a circuit that representing the CNOT gate using H and CZ. There are two answers to that question. $\endgroup$
    – KAJ226
    May 8, 2021 at 21:58
  • $\begingroup$ You're correct, but I still couldn't understand the algebric proof that was given there. Can you please try to explain? because if X=HZH then CX should be equal to CHZH so I didn't understand the jump to the other flank... $\endgroup$
    – user15791
    May 8, 2021 at 23:13
  • $\begingroup$ I wanted to add the explanation to the comment but it didn't fit... hence I wrote it as an answer. $\endgroup$
    – KAJ226
    May 9, 2021 at 4:22

1 Answer 1

2
$\begingroup$

Remember that when you apply a CNOT (CX) gate to two qubits, $q_0$ (controlled) and $q_1$ (target), then when $q_0$ is in the $|1\rangle$ state, you apply the $X$ gate to the target quit $q_1$. And when $q_0$ is in the $|0\rangle$ state, you simply do nothing. CZ is the same. when $q_0$ is $|1\rangle$ you apply $Z$ to $q_1$, and when $q_0$ is $|0\rangle$ you do nothing.

Now, if you consider the circuit $\big( I \otimes H \big) CZ \big(I \otimes H \big)$ which can be drawn as:

enter image description here

With the above circuit, note that when the controlled qubit, $q_0$, is in the state $|0\rangle$, $CZ$ do nothing to $q_1$ and so you will end up with just $H \cdot H = I$. Thus, when $q_0$ is $|0\rangle$, nothing happens, just as the case when we have $CX$.

Now. ote that when the controlled qubit, $q_0$, is in the state $|1\rangle$,$CZ$ will apply the gate $Z$ to $q_1$. Thus, you have $H \cdot Z \cdot H = X$. Thus, when $q_0$ is $|1\rangle$, we apply the gate $X$ to $q_1$. This is exactly the case in $CX$.

Therefore, in both cases, when $q_0$ is $|0\rangle$ and $q_1$ is $|1\rangle$, we have the same result as $CX$. This implies that the above circuit is indeed exactly the same as the circuit

enter image description here

$\endgroup$

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