Download Reversible Logic Synthesis: A Group-Theory Approach and more Slides Computer Science in PDF only on Docsity!
A Constructive Group
Theory based
Algorithm for
Reversible Logic
Synthesis
Main Ideas
1. We know many representations of reversible
circuits, such as reversible vectors, truth tables,
Kmaps and permutative unitary matrices.
2. In this lecture we will learn one more useful
representation – a set of cycles.
3. A cycle can be decomposed to transpositions.
Set of transpositions is another representation.
4. This is the initial paper in “group-theory
approach to quantum circuits synthesis”
Definition 1 (Binary reversible gate):
- Let B = {0, 1}.
- A binary logic circuit f with n inputs and outputs is denoted by
a binary multiple-output function f : B n^ B n.
- Let 〈B 1 ,…, B (^) n 〉 ∈ B n^ and 〈P 1 ,…, P (^) n 〉 ∈ B n^ be the input and
output vectors,
- where B 1 ,…, B (^) n are input variables
- and P 1 ,…, P (^) n are output variables.
- There are 2n^ different assignments for the input vectors.
- A binary logic circuit f is reversible if it is a one-to-one and
onto function (bijection).
- A binary reversible logic circuit with n inputs and n outputs is
also called an n-qubit binary reversible gate.
- There are a total of (2n)! different n-qubit binary reversible
circuits. Docsity.com
Permutations,
Cycles and
Transpositions
- A mapping s : M M can be written as:
d 1 , d 2 ,.., d k
di1 , di2 ,.., d i1 (1)
- Here we use a product of disjoint cycles (Definition 3) as an
alternative notation for a mapping.
d 1 , d 2 , d 3 ., d4 , d 5 , d 6 , d 7 , d 8 , d 9
d1, d 4 , d 7 , d 2 ,d 5 , d 8 , d 3 , d 6 , d 9 (2)
can be written as (d 2 , d 4 ) (d 3 , d 7 ) (d 6 , d 8 ).
(
(
(
(
Mappings and cycles
Identity
minterm
F(a 14 ) = a 14
F(1101) = 1101
F(13) = 13
Identity function as a mapping (^) Identity function as a circuit
Identity function as a mapping (^) Identity function as a circuit
Simple function
Simple function has
no identity minterms
The function has four 2-cycles N is high but function is simple (0,1), (2,3), (4,5) and (6,7)
Problem to be solved has simple formulation
It is a kind of “Rubik Cube” game
Feynman Toffoli Feynman Fredkin
Distance Histogram of a function
How many minterms in distance k cycle
Distance k cycle
0 1 2 3
How many minterms in distane k cycle
Distance k cycle
6
8
Notation
- Denote “( )” as the identity mapping (i.e.,
direct wiring) and call this the unity element
in a permutation group.
- A product f * g of two permutations applies
mapping f before g.
Definition 3 (‘j’-cycle):
- Let Sk be a symmetric group
of symbols {d 1 , d 2 ,…,d (^) k},
then (d (^) i1 , d (^) i2 ,…, d (^) ij ) is
called
a ‘j’-cycle,
i 2 ,…, ij ≤ k.
Cycle (0,1,2,3)
Realizations of the same cycle
00
0 1
01
11
10
Cost 1+2=
00
0 1
01 11
10
Cost 1+1=
(0,1,2) = (0,1) * (0,2)
(0,1,2) = (0,2) * (1,2)
We should select the set of 2-cycles with the minimum total distance
This is better
Definition 5 (‘ n-1 ’-CNOT gate):
- A ‘n-1’-Controlled-NOT (CNOT) gate Cj is defined as follows:
- If m ≠ j, then P (^) m = Cj (B (^) m ) = B (^) m.
- If m = j, and B (^) i = 1 for all i ≠ j, then P (^) j = Cj (B (^) j ) = B (^) j ⊕ 1; else, Pj = Bj.
- An example ‘4’-CNOT gate is shown in figure 2.
- A ‘n-1’-CNOT gate is a generalized Toffoli gate where two inputs control an output of another input.
These are “big Toffoli gates” that we want to avoid in general
MMD and New
methods
1. MMD is a specific algorithm that processes
permutation vectors (truth table) in such a way
that the set of self-mapping minterms grows
from top.
2. This can be rewritten to our new notation.
3. But this is only one way of realizing
permutation from transpositions.
4. We should investigate more of them.