3
$\begingroup$

It is known that an "upside-down" CNOT is equivalent to a "normal CNOT" surrounded by Hadamard gates as shown in this picture.

enter image description here

I am wondering whether there is a similar circuit equivalent to Toffoli gates controlled by qubits below the target qubit or with the target qubit in the middle as shown here.

enter image description here

The only way I was able to find so far is to take a decomposition of the Toffoli gate (e.g.here), redraw the circuit in order to have it upside down, and replace upside-down CNOTs with the construction above.

I am looking for a more elegant way similar to that of the CNOT.

$\endgroup$
5
  • $\begingroup$ Have you tried doing hadamards on the old target and the new target? $\endgroup$
    – DaftWullie
    May 10 at 7:19
  • $\begingroup$ @DaftWullie: I see and at the same time left the other control unchanged? $\endgroup$ May 10 at 7:22
  • $\begingroup$ I think so (I've just done this in my head, not written it down, so you do want to check it carefully) $\endgroup$
    – DaftWullie
    May 10 at 7:26
  • 1
    $\begingroup$ (How I did it in my head: $|0\rangle\langle 0|\otimes I+|1\rangle\langle 1|\otimes c-not$, so use the result we know for cnot.) $\endgroup$
    – DaftWullie
    May 10 at 7:29
  • $\begingroup$ @DaftWullie: It is pretty simple solution and it works. Thanks for help. $\endgroup$ May 10 at 8:32
1
$\begingroup$

Based on the advice by DaftWullie, I added Hadamards on the target and one of the control qubits. The trick is that the Toffoli gate is in fact a controlled CNOT. So we can leave one of control qubit unchanged and consider the rest of the gate as a CNOT. Then, we can apply the same approach as in the case of an "upside-down" CNOT. Here are the equivalent circuits:

enter image description here

$\endgroup$

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.