Design a reversible full adder on four wires ,

PHYSICS · Multi-part · Fermi University Physics · Quantum Information & Technology · The quantum circuit model and quantum algorithms · The quantum circuit model and quantum algorithms

Quantum Information and Technology, Ch The quantum circuit model

Problem

Design a reversible full adder on four wires aa, bb, cinc_{\rm in} and coutc_{\rm out}, using only CNOT and Toffoli gates, with coutc_{\rm out} initialised to ∣0⟩|0\rangle, such that at the end aa and cinc_{\rm in} are unchanged, bb holds the sum bit s=a⊕b⊕cins=a\oplus b\oplus c_{\rm in}, and coutc_{\rm out} holds the carry-out ab⊕bcin⊕acinab\oplus bc_{\rm in}\oplus ac_{\rm in}, with no garbage anywhere. ((a)) Give a four-gate circuit (two Toffolis and two CNOTs) meeting this specification, stating the control(s) and target of each gate. ((b)) Verify it on the input (a,b,cin)=(1,0,1)(a,b,c_{\rm in}) = (1,0,1), tracking all four wires through each gate. ((c)) State the total gate count and the number of garbage bits.

Browse the problem library