Title: A Transformation Based Algorithm for Reversible Logic Synthesis
1A Transformation Based Algorithm for Reversible
Logic Synthesis
- D. Michael Miller
- Dmitri Maslov
- Gerhard W. Dueck
Design Automation Conference, 2003
2Objectives
- Synthesis of Toffoli cascades
- reversible logic
- application in
- quantum computing
- low power CMOS
- optical computing
- Approach
- use a naive algorithm to find a solution
- apply transformations to simplify the network
3Toffoli Gate Family
We use such gates for any number of inputs
4The Basic Algorithm
- Reversible function is given as a truth table
- For each row in the truth table
- Introduce Toffoli gates such that the output
equals the input - Make sure that previous outputs are not affected
5The Basic Algorithm
Observe that after applying S3 wires are as in
input
c b a
in 000 001 010 011 100 101 110 111
out 001 000 011 010 101 111 100 110
S1 000 001 010 011 100 110 101 111
S1 000 001 010 011 100 110 101 111
S1 000 001 010 011 100 110 101 111
S2 000 001 010 011 100 111 101 110
S3 000 001 010 011 100 101 111 110
S3 000 001 010 011 100 101 111 110
S3 000 001 010 011 100 101 110 111
Final circuit
Read quantum array in inverse order to applying
gates
6Bidirectional Algorithm
in 000 001 010 011 100 101 110 111
out 111 000 001 010 011 100 101 110
need three gates
need only one gate
7Bidirectional Algorithm
c b a
inputs
in 000 001 010 011 100 101 110 111
out 111 000 001 010 011 100 101 110
S1 000 111 010 001 100 011 110 101
S2 000 001 010 111 100 101 110 011
S3 000 001 010 011 100 101 110 111
ab
Final circuit
S1
After applying S3 my wires are the same as inputs
8Improvements
- Output permutations
- via swap gates
- Control input reduction
- there may be more than on possible assignment of
control variables - select the one that makes the function simple
- Template matching
9Templates
- Idea replace a sequence of gates with an
equivalent shorter sequence - example
10Example
11Template Classification
12Larger Example
rd53
13Number of reversible functions using aspecified
number of gates
naive
gates 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Average
4 72 477 1759 4179 6912 8389 7766 5615 3183 139
1 453 104 15 1 7.65
1 14 92 380 1113 2468 4311 6083 7044 6754 5379 354
9 1922 839 286 72 12 1 8.67
permutation
5 87 550 1901 4267 6828 8221 7670 5610 3204 140
2 455 104 15 1 7.67
3 86 493 2312 6944 11206 10169 5945 2375 650
121 15 1 6.53
5 110 792 4726 11199 12076 7518 2981 767 130
15 1 6.18
12 6817 17531 11194 3752 844 134 15 1 5.6
3
input control
bidirectional
templates
optimal
14Future Work
- Start from a non-reversible function
- Verify the completeness of the templates
- Expand the algorithm to include Fredkin gates
- Select the best permutation (not by exhaustive
search)