Mathematics Physics
ComputerScience,1970-2008-Computer Science-2008.jsonl.gz.gz
Computer Science
7f3a244813bc7191c841d8fb41dd1b54a4de3024
Insights into classical irreversible computation using quantum information concepts

The method of using concepts and insight from quantum information theory in order to solve problems in reversible classical computing (introduced in Ref. [1]) have been generalized to irreversible classical computing. The method have been successfully tested on two computational tasks. Several basic logic gates have been analyzed and the nonlocal content of the associate quantum transformations have been calculated. The results provide us with new interesting insight into the notion of complexity of logic operations.


I. INTRODUCTION
The field of quantum information theory was born from a symbiosis of classical information theory and quantum mechanics. The main driving force behind the development of the new field is a vision of new computation and communication protocols and devices that would outperform their classical counterparts. At the same time, one might expect certain benefits to the classical theory as a "side effect" of this development. Such a feedback might be in interesting manifestation of the dynamical coexistence of the two fields from both theoretical and practical perspectives.
The first steps in this direction were made in Ref. [1], where a method of evaluating (the bounds on) the number of Toffoli gates in a classical reversible circuit using quantum information concepts was proposed.
Here we generalize this approach to irreversible classical circuits, which provides an interesting insights into the nature of classical computing.
The structure of the article is as follows. Section II gives a brief overview of the method in [1]. Section III presents the details of how the method is generalized to irreversible case. In Section II we give two examples of its implementation.

II. THE METHOD
Let us recall the basic principles of the approach in [1].
The key idea is to map classical bits onto special orthogonal quantum states, i.e. 0 → |0 and 1 → |1 , thereby mapping strings of n bits on the associate products of n quantum states such as Subsequently, the action of the logic gates is mapped onto corresponding transformations acting on these states. For reversible circuits the corresponding associate quantum transformations are unitary. Then, the study of the properties of the quantum transformation that is associated to the classical computation can provide information about the classical circuit. The property of a quantum transformation was chosen to be its nonlocal content as expressed via two quantities: first, its entangling capacity E ↑ , second its entanglement cost, E cost (which always satisfy E ↑ ≤ E cost ) [2]. The number of elementary gates needed to implement a particular classical computation is bounded from below by the following ratio for the associate quantum transformations To realize this programme the two states |0 and |1 have to be nonlocal (entangled) states. In particular, the following states were used in [1] Thus, classical logic bits are encoded in orthogonal maximally entangled states of two qubits.

III. GENERALIZATION TO IRREVERSIBLE
Here we generalize this approach to classical irreversible circuits. In this case the associate quantum transformations become non-unitary. In addition to entangling capacity and entanglement cost we will associate a third quantitydisentangling capacity, E ↓ -with a nonunitary operation. For in the case of reversible computing E ↓ was not very important since it does not affect the bound in Eq. (3). For irreversible computing the interplay between E ↑ , E ↓ and E cost become much more interesting.
A. 1-bit logic gates: RESET Let us start with a trivial example of the simple logic operation RESET (to zero) with corresponding truth- The operation G reset is a superoperator or CPTP map, and is able to create 1 ebit of entanglement, which becomes evident if we consider unentangled input state 1/ √ 2(|0 +|1 ). On the other hand 1 ebit is also sufficient to implement G reset . This task can be accomplished, for example, if one simply replaces the original pair by an ancillary pair in a state |0 and discards the original pair. More formally, this procedure can be presented as a SWAP operation on the original pair and an ancillary pair in the state |0 followed by discarding the ancillary pair. Thus, E ↑ (G RESET ) = E cost (G RESET ) = 1. It is obvious that G RESET cannot destroy any entanglement since it always has a maximally entangled state as its output, i.e. E ↓ (G RESET ) = 0.
Corollary, E ↓ = 0 for a quantum counterpart of any deterministic (surjective) logic operation, with equal numbers of inputs and outputs.

It is mapped on the non-unitary transformation
Note, that unlike 1-bit transformations, G XOR is not trace preserving, because it is accompanied by loss of subsystems. We can account for this loss by introducing a purification. For example, G XOR can be obtained if one implements (unitary) CNOT and discards the first pair. Nonlocal CNOT transformation is equivalent to two local CNOT transformations on corresponding qubits and therefore has zero entanglement cost [1]. Therefore, E cost (G XOR ) = 0. However, since the first pair is discarder it effectively involves "dissipation" of entanglement. In other words, whatever the mechanism inside the box is it will "dissipate" entanglement of the first pair. Therefore, C. Universal 2-bit gates: NAND and NOR Conceptually, the most interesting are NAND and NOR gates, because each of them is a universal gate for irreversible computation. Let us consider now the NAND gate A purification of G N AN D may arise if the two original pairs interact with a third, ancillary, pair in a standard state |0 via unitary transformation and consequently the ancilla and the second pair are discarded (traced out). In other words, it is a trace out of a Toffoli gate with one standard input. It should be noted that the realization (purification) in Eq. (6) is not unique. In fact, specification of the mapping of basis states in Eq. (5) does not fully determine G N AN D , that is to say that Eq. (5) does not prescribe how an arbitrary linear combination of basis states will evolve. (This is the nature of a trace-non-preserving operations -they do not supply full information about the evolution of the system.) We will come back to this problem later. Now let us calculate (bounds on) E ↑ and E cost . It is a difficult task to calculate the explicit value of E ↑ for a quantum operation. At the time this paper was written the only known method of calculating it was a direct numerical optimization over all states accessible to the operation (even including ancillas). The value of E cost can be obtained by providing an explicit way of implementation, though its optimality has to be also proven.
However, it is much easier to find bound on these quantities -a lower bound on E ↑ and an upper bound on E cost . If the two bounds happen to coincide then one is lucky to obtain exact values of E ↑ and E cost . As we will see below, our calculations leave the gap between the two bounds in the case of NAND. Nevertheless, it will suffice to bound the number of gates N gates as in Eq. (3).
To obtain a lower bound on E ↑ (G N AN D ) we choose a special input state, the test state |Ψ test in and obtain the corresponding output state The difference between the amounts of entanglement possessed by ρ test out and |Ψ test in bounds from below the entangling capacity of G N AN D . Any test state that leads to an increase of entanglement gives a lower bound. The higher the bound the better. The higher bounds can be obtained either by direct numerical search of by trial and error.
Consider, for example, the following disentangled state as an input, Of course, the input state for a gate inside an irreversible circuit will be most likely a mixed state.
However, the following unitary will do the job as well, in which case Thus, G N AN D represents the whole family of quantum maps. The most general unitary extension will give where a, b, c and d are complex amplitudes. The output state, therefore, will be It can be shown that the minimum is achieved at |d| = 1, i.e. Re(a + b + c) = Im(a + b + c) = 0 and equal 1 − H [1/4]. Recall that E test in = 0 ebits and we obtain To provide an upper bound on E cost let us consider the following protocol. In addition to the first two pairs |x 1 and |x 2 we use an ancillary pair in a standard state |0 3 and apply on these three pairs a nonlocal Toffoli gate as in [1]. This utilizes 2 ebits. Then we discard first two pairs and are left with one pair in the desired final state. The total cost of this procedure is 3 ebits. Therefore, E cost ≤ 3.
Thus, we obtain Interestingly, the NOR gate, an alternative universal gate for irreversible computing, has the same values of E ↑ , E ↓ , and E cost .

D. Calculating bounds
Now, if we are given a classical circuit all we have to do is to calculate (a lower bound on) E ↑ of the associate quantum transformation and obtain the bound on N gates using Eq. (3). As NAND (or NOR) is a universal gate any circuit can be build from NAND gates alone. The present method is unable to provide a bound in this case. This is because some of the NAND gates in a circuit will replace other gates that have E cost = 0, and thus even if the whole quantum transformation has E ↑ = 0 we will need nonzero number of NAND gates. On the other hand, we might consider universal sets of two or more gates, e.g. NAND and XOR. The bound (3) provides us with a meaningful result when one tries to minimize the usage of NAND gates by supplementing them by other gates, e.g. XOR gates.
Entanglement cost of the gates in a sense gives us an insight into the computation complexity of the gates. The fact that E cost (G XOR ) = 0 while E cost (G N AN D ) > 0 emphasized an essential difference between XOR and NAND gates -XOR gates involve less computational effort than NAND gates so to speak.

IV. EXAMPLE OF IRREVERSIBLE COMPUTATION
A. Example I: Parity calculation Consider a trivial example of the circuit that calculates a parity function, i.e. for a binary string of n bits it calculates whether the number of zeros is even or odd. Obviously, half of all possible input strings will have even number of zeros and half will have odd number of zeroes. Therefore, if we use a uniform superposition of corresponding quantum sequences as an input, then the output will be ρ out = 1 2 |0 0| + 1 2 |1 1| which has zero entanglement. In fact, numerical calculation indicate that any input states will lead to no increase of entanglement, i.e. E ↑ = 0. Thus, application of our method, i.e. Eq.
(3), yields N N AN D ≥ 0. Indeed, the whole computation can be easily accomplished by sequential application of XOR gates, and therefore no NAND gates are needed to implement the computation [3]. As we have shown XOR gates have zero entanglement cost and therefore their combination cannot increase overall entanglement.

B. Example II: First step in Shannon compression
As a more complex example let us consider the first step in Shannon compression -the majority measurement. For n bit input string the circuit calculates the number of 1's, k [4]. There are n + 1 possible values of k, therefore we have m = ⌈log 2 (n + 1)⌉ bit output string Without loss of generality let us assume that the output strings represent the values of k of corresponding input string in a binary form, e.g. 0011 → 10, 0101 → 10, (17) 0111 → 11, etc.
As before we take the initial state to be a uniform superposition of all basis states The corresponding output state is is a binary to decimal converter, that assigns a corresponding value of k to every sequence (term) in the sum in Eq. (19). As there are ⌈log 2 (n + 1)⌉ pairs of qubits involved in the output state it might give us a clue that the output entanglement scales not faster than log 2 n. This intuition is supported by the results showed in Fig. 1. Therefore, the lower bound on the number of NAND gates required to implement the computation grows as 0.1962 log 2 n − 0.1775. Thus, our results clearly indicate, that for n < 70 at least one NAND gate is required. Interestingly, this conclusion is corroborated by known circuits implementing the Full Adder (n = 3), which is constructed out of two NAND gates, three XOR gates and two NOT gates.

V. DISCUSSION
This work demonstrates that the method of Ref. [1] can be successfully to irreversible classical computing. Following that method we have constructed quantum counterparts of several logic gates, namely RESET, XOR, NAND and NOR, and have calculated nonlocal content of these quantum transformations. Three quantities were associated with the entanglement contententangling capacity, E ↑ , disentangling capacity, E ↓ and entanglement cost, E cost . Together with the number of logic bits these quantities provide a non-trivial characterization of gates. We have seen that deterministic, but irreversible, one-to-one-bit gate, RESET, has E ↓ = 0 and E ↑ = E cost = 1. An irreversible two-to-one-bit gate, XOR, exhibits completely different properties, namely E ↓ = 1 and E ↑ = E cost = 0. The third type -two-totwo irreversible universal gates, NAND and NOR, have E ↓ = 1 and 0.189 ≤ E ↑ ≤ E cost ≤ 3. The entanglement cost, E cost , was an essential ingredient for estimating lower bounds on the number of universal gates. Every circuit can be built from the universal gates alone. However, since NOT and XOR gates have E cost = 0, our method can only provide bounds on the minimal number of universal gates when the numbers of NOT and XOR gates are not limited, i.e. when one aims to minimize the number of universal gates by using other gates, if possible. It is worth emphasizing that our method is not constructive in the sense that the bounds it provides do not tell us how a particular circuit can be built from a certain type of gates.
The method was tested on two computational task. As a first task we have chosen the calculation of the parity of a binary string of n bits. Our method indicates that no NAND or NOR gates are needed to construct a circuit which realizes this calculation. This conclusion is consistent with the fact, that this computation can be achieved by simple cascade of XOR gates. The second task is the first step in Shannon data compression, i.e. calculating the number of 1s in a binary n-bit string. Our method provides the lower bound on N N AN D of a fraction of log 2 n. It is worth noting that our method can provide minimal bounds of at most m = ⌈log 2 (n + 1)⌉, because the corresponding output quantum state can posses at most m ebits of entanglement.
Our results provide an interesting insight into complexity of computation. The link between our approach and computation complexity was already established in [1]. Indeed, in the reversible scenario it was shown that E cost of the quantum counterpart of Toffoli gate (a universal gate) is non-zero whereas two-bit gates, e.g. CNOT, and one-bit gates, NOT, do not consume any entanglement at all. Therefore, one can use E cost as a kind of measure of the complexity of the associate classical logic gate itself. However, in the reversible case the distinction between Toffoli and two-or one-bit gates in term of their complexity is intuitively straightforward -Toffoli is more complex because it performs a nontrivial computation on more bits. In the case of irreversible computation this distinction becomes much more subtle. This is why the results of this work provide us with much more interesting and powerful insight. Indeed, here universal gates are not distinguishable from other two-to-one-bit gates simply by the number of inputs/outputs. than NAND and NOR are in certain sense computationally (logically) stronger, than XOR. One-to-one-bit RESET gate stands alone for having a nonzero E cost . However, we note that RESET gate does not actually perform a computational task.