How can a reversible multiplication quantum circuit be implemented? By "reversible" I mean one that performs a *= b
on the inputs a and b of the multiplication. In this case, it is reversible because the inverse operation a /= b
exists. I believe the multiplication requires some ancilla bits, but it needs to be able to be reset to |0> by uncomputation after multiplication.
My explanation may have been insufficient, so I will write it in more detail. The multiplier circuit I am trying to build is one that calculates the product for input registers a
and b
and sets it in register a
. Namely,
$|a\rangle|b\rangle \rightarrow |a\times b\rangle |b\rangle$
The necessary ancilla bits must be able to be set back to $|0\rangle$ by uncomputation.
$|a\rangle|b\rangle|00\dots0\rangle_a \rightarrow |a\times b\rangle |b\rangle|00\dots0\rangle_a$
Thank you in advance for your comments and advice.
a *= b
i.e. the product ofa * b
is set toa
(my explanation was lacking, sorry). Is this possible? $\endgroup$