5
$\begingroup$

In ZX-calculus, the CNOT gate is represented by this:

enter image description here

Can someone show my why this is true, using just the basic rewriting rules? All books/papers I have seen simply take it without proof, but I can't see why it is true.

$\endgroup$
5
$\begingroup$

I am going to assume that $|0\rangle$ is represented by enter image description here, and $|1\rangle$ by enter image description here.

Then, enter image description here represents the bit-flip, or NOT gate. What it does is: $|x\rangle\mapsto |x\oplus1\rangle$. This can be verified easily in the graphical calculus, using the "spider" rule:

enter image description here

and

enter image description here

Now, by definition, CNOT controls NOT: $|x_1,x_2\rangle\mapsto|x_1,x_1\oplus x_2\rangle$. In other words, if $|0\rangle$ is fed to the first qubit, the result is $|0\rangle$ on the first qubit, and the identity on the second. If it is fed $|1\rangle$, the result is $|1\rangle$ on the first qubit, and the gate NOT on the second one. Again this can be verified in the graphical calculus:

enter image description here

where the first equality is the "copy" rule, the second is the "spider" rule, and the last one is the fact that a rotation of angle $0$ is the identity.

Similarly:

enter image description here

where the first equality is the "$\pi$-copy" rule, and the second is the "spider" rule.

| improve this answer | |
$\endgroup$
  • $\begingroup$ My apologies for accepting this answer so late. It was very helpful. Much appreciated! $\endgroup$ – Alex Apr 1 at 13:39

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.