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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s