Here's two examples of usage
1.
(Note irreversible NAND gate is [itex](a, b) \rightarrow ¬(a \Lambda b)[/itex]
We can actually construct a reversible version
of the NAND gate that preserves all the information about the input: For
example, the (Toffoli) gate
[tex](a, b, c) \rightarrow (a, b, c \oplus a \Lambda b)[/tex]
is a reversible 3-bit gate that flips the third bit if the first two both take
the value 1 and does nothing otherwise.
2.
Now suppose we have a quantum black box that computes f(x). Of course
f(x) might not be invertible, while the action of our quantum computer is
unitary and must be invertible, so we’ll need a transformation Uf that takes
two qubits to two:
[tex]U_f : \mid x \rangle \mid y \rangle \rightarrow <br />
\mid x \rangle \mid y \oplus f(x)\rangle[/tex]
(This machine flips the second qubit if f acting on the first qubit is 1, and
doesn’t do anything if f acting on the first qubit is 0.) We can determine if
f(x) is constant or balanced by using the quantum black box twice.