Reversible Gates in various realization technologies Double Rail Technologies 2.2. DOUBLE- RAIL LOGIC BASED ON NOT, SWAP AND CONTROLLED SWAP GATES. • The symbolic notation on the right shows my notation for single-rail (symbolic) notation of double-rail circuits: • a’ = (a1, a2’) = (1,0), • a = (a1’, a2) = (0,1). a1 a2 Double-rail Inverter b1 = a b b2 Fig. 2.2.1.: Realization of NOT in double-rail technology Double-Rail Feynman Gate • a’ = (a1, a2’) = (1,0), • a = (a1’, a2) = (0,1). a1 a a b a b a2 b1 b b2 = • Fig. 2.2.2: Realization of Controlled-Not (Feynman) gate in double-rail logic. Fredkin built from Toffoli and CNOT (a) (b) (c) • Fig. 2.2.3: • Realization of Fredkin gate using Toffoli and CNOT gates. • By surrounding the Toffoli gate (Fig. 2.2.3a) with CNOT gates (Fig. 2.2.3b) we obtain the Fredkin gate (Fig. 2.2.3c). • Similarly the Toffoli gate can be obtained by surrounding the Fredkin gate using two CNOT gates. • This way a Toffoli gate in double-rail logic can be realized, as shown in Fig. 2.2.4. Toffoli built from Fredkin and Feynman 0 1 control 0 1 0 1 • Fig. 2.2.4: Realization of Toffoli gate in double-rail logic using a double-rail Fredkin gate surrounded by two Controlled NOT gates. Double-rail Fredkin gate a1 a2 P1 P2 Q1 b1 b2 c1 c2 b1 Q2 R1 R2 • Fig. 2.2.5.: Detailed circuit of double-rail Fredkin gate realized with two standard Fredkin gates with the same control. Single-rail schematics for double-rail Fredkin gate a P 2 b c 2 Q R • Fig. 2.2.6: The gate from Figure 2.2.5 in another notation, every signal corresponds now to two wires from Figure 2.2.5. New double-rail gates can be created with single-rail Fredkin gates (c1,c2) = (a1,a2) and (d1,d2) = (not b1, not b2). d2 a1 a2 b1 b2 P2 c1 c2 d1 d2 • Fig. 2.2.7: Detailed circuit of double-rail “new gate” realized with three standard Fredkin gates. Toffoli gate in double-rail technology a1 a2 a P1 P P2 = b1 b2 Q1 Q2 b Q • Fig. 2.2.8: Realization of CNOT in double-rail technology. Signal a is represented by a1=0, a2 = 1. Signal a’ (negation of a) is represented by a1=1, a2 =0. SWAP in double-rail a1 c1 a2 c2 b1 d1 b2 d2 = a c b d • Fig. 2.2.9: Realization of SWAP in double-rail technology. Conclusion on Double-Rail. • Single-rail SWAP = double-rail NOT • Basic gates are single-rail SWAP and controlled-SWAP • NOT gate can be created. • Toffoli, Feynman and Fredkin gates can be created. • Complex gates can be created. • Gates are not necessarily conservative. 2.3. DOUBLE-RAIL OPEN/CLOSE SWITCH REVERSIBLE CMOS LOGIC OF ALEXIS DE VOS c P c Q a b a a Q b R b Q • Fig. 2.3.1: Realization of Fredkin gate. Notation for De Vos double-rail technology from Figure 2.3.2. c • Figure 2.3.2. Realization of function Q in Fredkin gate using De Vos technology. Toffoli in De Vos Technology c a a b a b a p p b b c • Fig. 2.3.3: • Realization of Toffoli gate in double-rail DeVos technology. • As we see, this is a kind of double-rail technology. Toffoli Gate. • The function realized in Figure 2.3.3 for output p is c’ ab in upper branch controlled by c’ and c (a’ + b’) controlled by c in the right branch. • Thus the function realized for p is the following: • p = c’ ab + c (a’ + b’) = c’ (ab) + c (ab)’ = ab c • Similarly, the function realized for negation of p, denoted by p’ is c’ (a’ + b’) (controlled by c’) and (ab) c controlled by c. Thus the function for negated p, denoted by p’ is the following: • p’ = c’ (a’ + b’) + (ab) c = c’ (ab)’ + (ab) c = [ ab c ]’ = p’ (negation of signal p). CNOT gate in De Vos technology c Q a a a a Q c • Figure 2.3.4. Realization of CNOT in De Vos technology. Regular layout for De Vos technology Toffoli C P C P a a b b a a b b • Fig. 2.3.5: DeVos CMOS circuit layout for pass-transistor diagram from Figure 2.3.3. Conclusion on De Vos technology. • • • • • • • • • • • • • Based on open/close switches. This is double-rail technology Parallel and serial connections of switches Every output of gate has a form: Variable Function (other variables) Single-rail SWAP = double-rail NOT NOT gate can be created. Toffoli, Feynman and Fredkin gates can be created. Complex gates can be created. Gates are not necessarily conservative. Creating complex gates is simple. Realized in CMOS, input-output physically reversible, not only logically reversible Requires special power supplies to reduce power Combined with the idea of adiabatic gate. 2.4. CONSERVATIVE REVERSIBLE LOGIC BASED ON 2*3 SWITCHES a a b ab ab a aba b CONSERVATIVE REVERSIBLE LOGIC BASED ON 2*3 SWITCHES a a b a ab ab a b ab a b a ab a aba b ab • Fig. 2.4.1: Realization of CNOT in double-rail switchbased technology 2*3 Switch technologies ac c ac a b ac a b ab a a cab ab • Fig. 2.4.2: Realization of Fredkin gate in singlerail switch-based technology. New Synthesis method using 2*3 switches • First Stage: – – – – – – • Second Stage: – – – – • When we have the set of products available, next we can make sums of all possible pairs of disjoint products. Disjoint are products that share at least one variable that is in various polarities in them. This must be however done always in such a way that finally the number of primary outputs of the circuit that we create will be the same as the number of primary inputs. We check that each function being a primary output must be balanced. Third Stage: – • First we create a sequence of products of literals with more and more literals successively. We do this in all possible ways. This is illustrated in the left part of the upper row of gates in Figure 2.4.3 below. This way, functions a, a’b, ab, a’c and ac are created. For gates of smaller size the number of such products is quite limited so my method is rather efficient. We cannot create fan-outs of any signals, including the primary inputs. Finally we check that the k*k function created by us is reversible. Comments: – – – – Based on a simple heuristic: This way we always create a k*k gate (by k*k gate we understand a reversible function with k inputs and k outputs). The above algorithm can be implemented as a tree search algorithm. a a a a'b a'b+ac b ab c c a c c'a ca c'a+cb New gate in 2*3 switch technology b b b c b'c bc b'c+ba • Fig. 2.4.3: Using Switch gates to build a new reversible conservative gate. Fig. 2.4.4: Schematics of the new gate based on the schematics from Figure 2.4.3. This gate can realize products, inhibitions, sums and implication functions on its three outputs. a a’b + ac b c’a + cb c b’c + ba Methodology to create new gates using 2*3 switch technology a a b c ab ab a ac ab + a c ac a a b + ac • Fig. 2.4.5: Fredkin gate with internal swap built from switch gates Hierarchical design from 2*3 switches a b P Q c R d S • Figure 2.4.6. Schematic of a new single-rail reversible gate using Fredkin gates built from 2*3 switches. P Q exor R a b c d New design ideas S • Figure 2.4.7. Another way of drawing the circuit from Figure 2.4.6 to emphasize its similarity to generalized gates introduced in Chapter 3. • Both muxes are controlled by the Exor. • This circuit, in contrast to circuits in other figures is drawn from right to left rather than from left to right to emphasize its reversible nature and to help using the analysis from Figure 2.4.8. New design ideas a u a z a (b x b y ) a (b x b y ) a a b xa b yabxab y b ( a b) x ( a b) y x y C • Fig. 2.4.9: Analysis of circuit from Fig.2.4.8. D U b x b y Z b x b y • Fig. 2.4.8: • Another notation for the circuit from two Fredkin gates given in Figure 2.4.6. • Assume x=c, y=d. CNOT gate in De Vos technology c Q a a a a Q c a ac ac+ a’ c’ c ac a c’ c’a’ a a c’+ a’ c c’ a • Figure 2.3.4. Realization of CNOT in De Vos technology. Conclusion on 2*3 switch technology. • Based on 2*3 switches. • Realized in optical, fluidic, CMOS and other nano. • This is not double-rail technology, but double-rail gates can be created on a higher level. • NOT gate cannot be directly created. • Toffoli, Feynman and Fredkin gates can be created. • Complex gates can be created. • Gates are not necessarily conservative. • Creating complex gates is not simple. • Can create Fredkin, thus all gates from previous section can be created. Concluding on 2*3 switches (cont) • Every conservative reversible gate can be built from 2*3, 3*2 switches and (hierarchically) from k*k conservative gates built in turn from 2*3 and 3*2 switches. • Next, by using double-rail technology, every reversible gate can be built from conservative gates. • Thus, every circuit discussed in chapters 3 - 6 can on the bottom of hierarchy be built from only 2*3 and 3*2 switches. • The number of such switches is the cost function of the solution which is used to compare various designs one with another. 2.5. MAJORITY GATES IN QUANTUM CELLULAR AUTOMATA a a b (ab a c ) (b c) b a ca a c b ab c a(b c) c ab ac c ab a c • Fig. 2.5.1: Fredkin gate from Toffoli and CNOT gates with analysis equations. • The same figure explains also how Toffoli can be created from Fredkin. • Surrounding with two more Feynmans on left and right and next cancelling pairs of successive Feynmans would restore the original Toffoli gate. Miller gate as three majorities is base of reversible design in quantum dot cellular automata a b c maj (a, b , c ) Miller gate maj ( a, b, c) maj (a, b, c) • Fig. 2.5.2: Miller gate is three majorities with various polarities. ac a (a b a c b c) (a c) a b a c b c b (ab ac bc) (b c) ba c a bc m(a,b,c) c m (a, b, c) bc (a c) (b c) c ab acbc c c m(a, b, c) • Fig 2.5.3: Analysis of Miller’s gate. • Obviously, by surrounding Miller with two Feynmans with EXOR up in first bit we will obtain Fredkin gate, • and next by surrounding again with Feynmans with EXOR up in second bit we get Toffoli gate. Miller Miller Miller gate plus inverters is universal Miller Miller • Fig. 2.5.4: Universality of Miller gate. Miller with inverters is universal. Realization of EXOR needs ancilla bits a b maj 1 a A b maj 0 B 0 maj ab C Fig 2.5.5: Realization of EXOR using 3 majorities. Adaptation to reversible design a 0 1 b maj maj B maj ab C A • Fig. 2.5.6: The circuit from Fig.2.5.5 redrawn to a notation that is more similar to Quantum Array notation. New gate from Miller gates with no ancilla bits realizes a new Feynman-like gate c ab ac b c a c c a b ab b a c ( a b a c b c) ba ca bc ac • Figure 2.5.7. This figure demonstrates that by taking two Miller gates we can create new reversible functions which are not the Miller gate with other polarities. a b c c a b c a This gate becomes Feynman gate with c=0 Concluding on Quantum Dot Logic • • • • • • Basic gates are NOT and majority. SWAP is cheap. AND and OR gates can be created with ancilla from majority. Miller gate is three majorities with various polarities. Other functions can be created using majorities. Other functions can be created using Miller and NOT gates • I believe that I will be able to create many useful gates in various families based on: – – – – Majorities only Majorities and SWAP Majorities and NOT Majorities, NOT and SWAP • Toffoli, Feynman and Fredkin can be created but are not necessarily the best way to create big reversible circuits in quantum dot QCA. Concluding on technologies • Concluding. This section showed several ways of realizing reversible gates using quantum dot based QCAs. All methods from next chapters can be thus used to synthesize circuits from quantum dots, but I have doubt how cost efficient these methods will be when compared to the group-theory methods developed by Dr. Guowu Yang and Prof. Perkowski for the Miller gate. On the other hand, the exact method of Yang et al is only for 3*3 circuits and my methods work for larger circuits. The tasks of designing best reversible gates on top of QCA and using such gates in synthesis are relatively separated and I can work only on one of them, as shown in next chapters. There is no method to design reversible circuits directly from majorities. Such method would be very useful for the recent breakthrough technology of quantum dots. The only paper in the literature is from Yang et al which has a theoretical analysis and some designs but no heuristic algorithm for practical design of larger circuits. Another open research topic. I am not committing myself to solve all these problems. I just want to show here that in addition to problems that I already solved and I just need to write better software there are several related tasks for which methods and algorithms should be created. I will work possible on these topics as well, in addition to my main topic of implementing software. Conclusion on all these technologies. • • • • • • • • • • • • • Based on some type of switches. Realized in optical, fluidic, CMOS and other nano. Similar to quantum gates. Double-rail technology often used. Quadruple-rail technology can be created for adiabatic CMOS. Universal logic systems. Some natural some not. NOT gate can be usually but not always created. Toffoli, Feynman and Fredkin gates can be always created. Complex gates can be created. Gates are not necessarily conservative. Creating complex gates is simple or not simple, depending on technology. Very little is published on synthesis of such gates from some type of specification. • Many open research problems, in physics and in synthesis methods. What to remember? 1. 2. 3. 4. 5. Y gate Single-rail circuits with Y gates. Double-rail circuits with Y gates. What are advantages of double-rail circuits. Majority gate in Quantum Dot Cellular Automata. 6. How to use Majority to build Three-input EXOR? 7. Relation between reversible Miller Gate and Majority – how it can be used in QCA circuits?