How can we draw a circuit that is based on the gates $H, CZ$ that implements $CNOT$.
I know that the $H$ gate is like that:
But I'm not sure how to draw this with the implementation of $CNOT$.
Quantum Computing Stack Exchange is a question and answer site for engineers, scientists, programmers, and computing professionals interested in quantum computing. It only takes a minute to sign up.
Sign up to join this communityYou can check that the following is equal to a CNOT gate (the mid-part being the controlled $Z$-gate)
The first Hadamard gate rotates $q_1$ to the $X$-basis. In that basis, the $Z$-gate acts like a bit flip (the same way the $X$-gate acts in the $Z$-basis). The second Hadamard rotates $q_1$ back to $Z$-basis.
@Durd3nT answered the question nicely. But here is another way to see it, and hopefully it will be useful for future purposes...
All you need to know is the identity $X = HZH$. Then now you can see that $CNOT (CX)$ can be rewritten as $$ CX = \big( I \otimes H \big) CZ \big( I \otimes H \big) $$ This is because when the controlled-qubit is in the state $|0\rangle$, you are not doing anything, so the two Hadamard ($H$) gates cancel each other out. And when the controlled-qubit is in the state $|1\rangle$, the combination $HZH$ will acts as an $X$ gate.