# Toffoli upside down - an equivalent circuit

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

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.

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.

• Have you tried doing hadamards on the old target and the new target? May 10, 2021 at 7:19
• @DaftWullie: I see and at the same time left the other control unchanged? May 10, 2021 at 7:22
• I think so (I've just done this in my head, not written it down, so you do want to check it carefully) May 10, 2021 at 7:26
• (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.) May 10, 2021 at 7:29
• @DaftWullie: It is pretty simple solution and it works. Thanks for help. May 10, 2021 at 8:32