Chapter 10: Q7E (page 329)
The CONTROLLED SWAP ( ) gate takes as input qubits and swaps the second and third if and only if the first qubit is a .
- Show that each of the gates are their own inverses.
- Show how to implement anrole="math" localid="1658207684748" gate using a gate, i.e., what inputs would you give to a gate so that one of the outputs is ?
- How would you achieve fanout using just these three gates? That is, on input and , output and .
- Conclude therefore that for any classical circuit there is an equivalent quantum circuit using just NOT and C-SWAP gates in the following sense: if outputs on input , then outputs on input . (Here is some set of junk bits that are generated during this computation.)
- Now show that that there is a quantum circuit that outputs on input .
- Show that there is a quantum circuit made up ofgates that outputs on input .
Short Answer
- The inverse of gates is the same gates itself.
- AND gate is implemented with a C-SWAP gate by giving the input of as .
- The fanout can be achieved by giving the input for third qubit ( ) as with the represented input for second qubit ( ) as .
- Any classical circuit can be implemented using the C-SWAP gate and NOT gate.
- A quantum circuit that outputs on input is there.
- A quantum circuit is there that is made of NOT, CNOT and C-SWAP gates.