## Quantum Country exercise 15

This is one in a series of posts working through the exercises in the Quantum Country online introduction to quantum computing and related topics. The exercises in the original document are not numbered; I have added my own numbers for convenience in referring to them.

Exercise 15. Find a way of implementing a NAND gate using just a single Toffoli gate and no other quantum gates.

Answer: As described in the previous exercise, a Toffoli gate with inputs $\vert x \rangle$, $\vert y \rangle$, and $\vert 1 \rangle$ acts as a NAND gate producing the target output $\vert 1 \oplus \left( x \wedge y \right) \rangle = \vert \neg \left( x \wedge y \right) \rangle$.

This entry was posted in quantum country. Bookmark the permalink.