2
$\begingroup$

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:
H-Gate

And also the $CZ$ gate is:
CZ-Gate

But I'm not sure how to draw this with the implementation of $CNOT$.

$\endgroup$

2 Answers 2

6
$\begingroup$

You can check that the following is equal to a CNOT gate (the mid-part being the controlled $Z$-gate)

enter image description here

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.

$\endgroup$
4
$\begingroup$

@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.

$\endgroup$

Your Answer

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

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