Quantum full adder and subtractor
The designs of quantum full adder (QFA) and quantum full subtractor (QFS) are investigated. First, the 1-bit QFA and 1-bit QFS are designed according to the classical truth tables. The adder and subtractor for two n-bits numbers are then separately constructed from n 1-bit QFAs and QFSs. The number of elementary quantum gates to accomplish the design of n-bits adder and subtractor are 4n and 8n, respectively.