Permutation Algebra for Constructing Reversible Circuits

In this paper, we show that the algebra of permutation group is one of the inherent structures of reversible logic for quantum computation. In this venture, we discuss necessary properties of cycle and transposition to reveal the potential of permutation algebra for reversible logic. Then we present an efficient method which naturally interconnects the structure of reversible logic with the expression of cycle and corresponding transpositions. Finally we discuss several examples which show that the algebra can be effectively used to construct complex gates as well.


Introduction
In recent years, reversible logic has become more and more prominent technology having its applications in quantum computing and other aspects of nanotechnology.Moreover, reversibility can also be a solution to the energy dissipation issue in chip level integrated systems.Logically reversible gates are those where the inputs can be inferred from knowledge of the outputs, meaning the logic function implemented by the gate has a unique inverse.In this paper, we present a method which interconnects the structure of reversible logic with permutation algebra.By applying the properties of cycle and transposition, we also show that any complex arithmetic circuit such as full adder can be easily achieved and efficiently constructed.

Reversibility & Permutation Group
An n-bit reversible logic gate is a block which performs a permutation on the 2 n possible states of bits that pass through it.Hence it is a one-to-one correspondence from a 2 n state onto itself.Thus specifying a reversible logic gate is nothing but specifying the mapping that it performs.In quantum computing, these computational states are represented by quantum mechanical state.For example, let us define an arbitrary finite set S having n-elements (which are in this case well defined quantum mechanical states).Then any reversible logic of such set can be expressed by introducing where  is a oneto-one mapping of S onto itself.Now, one can represent the set of bits  with the set of kets  , a b   0,1 i (such that i = 0, 1, 2, 3) which are the four computational states expressed by two input bits of the measurement gate.This allows us to represent any logic (in this example XOR or more specifically Control NOT) by means of specific basis state as A closer examination immediately reveals that this representation can be shown as an element under the permutation S 4 .Hence we can say C-NOT can be represented as a one-to-one mapping of S 4 , and in terms of energy state, the above table can now be represented by the permutation.0 1 2 3 Since the S 4 contains 4! permutations it means that there exists 24 different logic gates for a 4-state system.Generalizing the above statements we can say that, any N-level quantum system can be permutated in N! computationally distinct logic sets.In other words, these permutations of degree N form a group of order N! under composite operation of permutation.This permutation group, S N is the collection of all bijective maps : S S   of the interval , with composition maps ( ) as the group operation.We now intend to recall some basic definitions for describing permutations [1].

Cycle of a Permutation: For
, , , ,  that acts on S in the following way Here k is called the length of the cycle.Cycles of length 1 are redundant since they reduce to identity.The order of the entries in a cycle matters, but cycle notation is not unique as the following Since, the inverse of a permutation is the permutation obtained by interchanging the rows between them.This results to state that every transposition is the inverse of its own.
An important property which will be particularly interesting for this paper is that one can decompose a transposition in the following product,

Algebra of Reversible Logic
Now we show that the algebra of reversible logic can be introduced in terms of permutation group and the concept of cycle works as the building block of reversible gate.Hence, we adopt the following statements, For every n-bit reversible logic there exist a unique permutation of degree 2 n .This means, the properties and the operations of permutation groups are applicable for reversible logic as well.
This statement is discussed in the beginning of the lit-erature.Recall that as a subgroup of a symmetric group, all the necessary group axioms are satisfied by permutation group; that is it contains the identity permutation, the inverse permutation and the associative and closure property.Since reversible logic mimics a permutation as shown before, the composite operations between permutations can also be adapted for reversible gates.
Since every reversible gate is expressible by corresponding permutation, hence it is possible to express a reversible gate as a product of disjoint cycles and necessarily as a product of transpositions.
Let us examine the logic of an inverter which is and 1 since it is a single bit logic, the gate can be expressed as a permutation of degree 2 which is It can be seen that the inverter is logically reversible, but unfortunately is not a universal gate in the sense that any arbitrary Boolean logic is not realizable in terms of inverter alone.For quantum computation, we need universal reversible gates.One of such gates is the Taffoli-Fredkin (T-F) gate [2,3] which is necessarily a 3-bit gate with 3 inputs (a, b, c) and corresponding outputs (a', b', c').The relationship between the input and output is the following   And the corresponding transposition is T-F  = (110, 111).We can also write the transposition in decimal symbol which would be more convenient for calculation.In case of T-F gate, the transposition is (6, 7).
The similar treatment can be accounted for more complex gates.Such a gate is Peres gate [4], which is another reversible and universal one.Peres gate is mainly interesting due to its combination of T-F gate and C-NOT gate which makes it an attractive candidate to realize complex logic such as addition, subtraction etc. Peres gate is also a 3-bit gate which maintains relationship between the input and output as following, The corresponding cycle has a length of 4 and can be decomposed in 3 transpositions, In the above example, let the C-NOT of cycle (6, 7) and ( 4

Construction of General Gates
Similarly, for n = 4, we have four options to choose any one as a target bit and for each target bit, there exists 2 3 -1 = 7 unique combinations of control bits.Hence there are 7 × 4 = 28 numbers of C-NOT gate for n = 4 (Table 1).Again each of the 28 gates can be realized by a unique product of transpositions as shown in Figure 2.
We showed earlier, with example, that the product of cycles of a permutation is sufficient to realize any reversible logic.In an extension, let us introduce an n bit C-NOT gate.In this case, we can realize the C-NOT operation on any one bit of n while the control bits are the other (n -1) bits or (n -2) and so on.If n = 3, then we can choose any one as a target bit out of three and for each target bit, there exist 2 2 -1 = 3 unique combinations of control bits.This means there are 9 possible C-NOT gate for n = 3 (Figure 1), where each of them can be realized by a unique product of transpositions.
At this juncture, let us imagine that we intend to realize the logic of a full adder, which is evidently irreversible.By adding an extra bit, we can make it reversible, which means it would be a 4-bit reversible logic.But now the question lies where we want to put that extra bit.Since there were 3 bits in an irreversible full adder, we have different positions of significance (from MSB to LSB) to put that extra bit.In our paper, we have introduced 3 logics of such reversible Full Adder where the extra bit is set at three different positions of significance starting from LSB.The permutation corresponding to the gates are given below.Here, in all three cases, the output of a full adder logic is realized only when the extra bit is zero.In addition, the least significant two bits of the outputs are the sum and carry-out.Now we will utilize the properties of cycles, to prove that any reversible logic can be simulated by a combination of elementary gates.In other words, we will prove that the decomposition of reversible logic is possible by exploiting the properties of cycles under permutation algebra.

Conclusion
The decomposition of complex gate by means of the product of transposition and corresponding n-bit C-NOT gate gives us further opportunity to express the logic in more elementary gates.This is because any n-bit C-NOT gate and corresponding unitary operations can be expressed as a composition of 2 bit C-NOT and the T-F Here  denotes the Exclusive OR and  denotes the AND function.The variables a and b are control bits where c is called the target bit.As seen from the logic, the control bit suffers from no change while passing through the gate.However the target bit flips if both control bits are logic 1.The permutation corresponding to this gate is, As seen from the logic, the outputs of bit b and c suffer from CNOT and T-F operations respectively while bit a remains unchanged.The permutation corresponding to this gate is, Now going from right to left, all we have to do is to sum up the corresponding C-NOT gates as per transpositions.Then the decomposition will denote Peres gate through the joining of 3-bit C-NOT gates as shown below:

FA- 3 ( 2  1  2  1 
Figure3).It is now evident that we could also simulate the logic of FA-(shown in Figure4) and FA-(not shown) as well.Our calculation shows that the FA-can be constructed by 40 C-NOT gates while FA-will be comprised of 53 C-NOT gates.