Reversible Circuit Synthesis Vivek Shende & Aditya Prasad.

Slides:



Advertisements
Similar presentations
Quantum Computation and Quantum Information – Lecture 3
Advertisements

Switching circuits Composed of switching elements called “gates” that implement logical blocks or switching expressions Positive logic convention (active.
Quantum Circuit Decomposition
University of Queensland
Reversible Gates in various realization technologies
The BDS Circuit Synthesis System What it Does and Doesn’t Do.
PERMUTATION CIRCUITS Presented by Wooyoung Kim, 1/28/2009 CSc 8530 Parallel Algorithms, Spring 2009 Dr. Sushil K. Prasad.
Types of Logic Circuits
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices XOR, Parity Circuits, Comparators.
ELE 523E COMPUTATIONAL NANOELECTRONICS W3: Quantum Computing, 22/9/2014 FALL 2014 Mustafa Altun Electronics & Communication Engineering Istanbul Technical.
Quantum Phase Estimation using Multivalued Logic.
CS 151 Digital Systems Design Lecture 11 NAND and XOR Implementations.
A Transformation Based Algorithm for Reversible Logic Synthesis D. Michael Miller Dmitri Maslov Gerhard W. Dueck Design Automation Conference, 2003.
Quantum Error Correction SOURCES: Michele Mosca Daniel Gottesman Richard Spillman Andrew Landahl.
Two-Qubit Quantum Circuits Vivek V. Shende Igor L. Markov Stephen S. Bullock.
Reversible Computation Computational Group Theory and Circuit Synthesis.
DARPA Scalable Simplification of Reversible Circuits Vivek Shende, Aditya Prasad, Igor Markov, and John Hayes The Univ. of Michigan, EECS.
Quantum Computing Ambarish Roy Presentation Flow.
ENGIN112 L11: NAND and XOR Implementation September 26, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 11 NAND and XOR Implementations.
University of Queensland
Introduction to Reversible Ckts Igor Markov University of Michigan Electrical Engineering & Computer Science.
April 25, A Constructive Group Theory based Algorithm for Reversible Logic Synthesis.
“Both Toffoli and CNOT need little help to do universal QC” (following a paper by the same title by Yaoyun Shi) paper.
Classical and Quantum Circuit Synthesis An Algorithmic Approach.
Quantum Computing Joseph Stelmach.
DARPA Reversible Logic Circuit Synthesis Vivek V. Shende, Aditya K. Prasad, Igor L. Markov and John P. Hayes University of Michigan.
Symbolic Reduction of Quantum Circuits. Motivation In classical computation, it is desirable to find a “minimal” circuit to compute a given function In.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 1 –
Introduction to Quantum Logic 2002/10/08 Tuesday Jung-wook Kim.
10/25/2004EE 42 fall 2004 lecture 231 Lecture #23 Synthesis Next week: Converting gates into circuits.
Minimization Techniques for Reversible Logic Synthesis.
An Arbitrary Two-qubit Computation in 23 Elementary Gates or Less Stephen S. Bullock and Igor L. Markov University of Michigan Departments of Mathematics.
Grover’s Algorithm in Machine Learning and Optimization Applications
Introduction to Quantum logic (2) Yong-woo Choi.
ROM-based computations: quantum versus classical B.C. Travaglione, M.A.Nielsen, H.M. Wiseman, and A. Ambainis.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 1 –
Overview Part 1 – Design Procedure 3-1 Design Procedure
Logic Gates Circuits to manipulate 0’s and 1’s. 0’s and 1’s used for numbers Also to make decisions within the computer. In that context, 1 corresponds.
Digital Logic Design Lecture # 8 University of Tehran.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Lecture 11 – Design Concepts.
Quantum Error Correction Jian-Wei Pan Lecture Note 9.
Computer Science 1000 Digital Circuits. Digital Information computers store and process information using binary as we’ve seen, binary affords us similar.
Digital Logic Chapter 4 Presented by Prof Tim Johnson
Combinational Logic Design BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
1 Cost Metrics for Reversible and Quantum Logic Synthesis Dmitri Maslov 1 D. Michael Miller 2 1 Dept. of ECE, McGill University 2 Dept. of CS, University.
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
Fall 2004EE 3563 Digital Systems Design EE3563 Multiplexers  A multiplexer is a digital switch  Allows a device to select a single line from many  Some.
Discrete Mathematics and Its Applications.  The English mathematician George Boole ( ) sought to give symbolic form to Aristotle's system of.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 1 –
1 A Novel Synthesis Algorithm for Reversible Circuits Mehdi Saeedi, Mehdi Sedighi*, Morteza Saheb Zamani {msaeedi, msedighi, aut.ac.ir.
A brief introduction to Quantum computer
CMOS Logic.  The CMOS Logic uses a combination of p-type and n-type Metal-Oxide-Semiconductor Field Effect Transistors (MOSFETs) to implement logic gates.
ELE 523E COMPUTATIONAL NANOELECTRONICS
Generating Toffoli Networks from ESOP Expressions Yasaman Sanaee Winter 2009 University of New Brunswick.
Garbage in Reversible Designs of Multiple Output Functions
Memory Management OS Fazal Rehman Shamil. swapping Swapping concept comes in terms of process scheduling. Swapping is basically implemented by Medium.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
1 CS151: Digital Design Chapter 3: Combinational Logic Design 3-2 Beginning Hierarchical Design 3-3 Technology Mapping.
1 Digital Logic Design (41-135) Chapter 6 Combinational Circuit Building Blocks Younglok Kim Dept. of Electrical Engineering Sogang University Spring 2006.
BDD-based Synthesis of Reversible Logic for Large Functions Robert Wille Rolf Drechsler DAC’09 Presenter: Meng-yen Li.
1 An Introduction to Quantum Computing Sabeen Faridi Ph 70 October 23, 2007.
Attendance Syllabus Textbook (hardcopy or electronics) Groups s First-time meeting.
Creating logic gates with Minecraft
Logic Gates.
Thursday, 22 November 2018 Logic Gates
CSE 370 – Winter Combinational Implementation - 1
Chap 4 Quantum Circuits: p
Quantum Computation and Information Chap 1 Intro and Overview: p 28-58
ECE 352 Digital System Fundamentals
Presentation transcript:

Reversible Circuit Synthesis Vivek Shende & Aditya Prasad

Reversible Circuit Synthesis Motivation Motivation –Real-world Applications –Theoretical Advantages –Links to Quantum Computation Background Background Theoretical Results Theoretical Results Synthesis of Optimal Circuits Synthesis of Optimal Circuits An Application to Quantum Computing An Application to Quantum Computing

Real-world Applications Digital signal processing Digital signal processing Cryptography Cryptography Computer graphics Computer graphics Network congestion Network congestion

Theoretical Advantages Information, like energy, is conserved under the laws of physics Information, like energy, is conserved under the laws of physics Thermodynamics can be used to tie the irreversibility of a system to the amount of heat it dissipates Thermodynamics can be used to tie the irreversibility of a system to the amount of heat it dissipates An energy-lossless circuit must therefore be information-lossless An energy-lossless circuit must therefore be information-lossless Furthermore, there is evidence to suggest that reversible circuits may be built in an energy- lossless way Furthermore, there is evidence to suggest that reversible circuits may be built in an energy- lossless way

Links to Quantum Computation Quantum operations are all reversible Quantum operations are all reversible Every (classical) reversible circuit may be implemented in quantum technology Every (classical) reversible circuit may be implemented in quantum technology Certain quantum algorithms have “pseudo-classical” subroutines, which can be implemented in reversible logic circuits Certain quantum algorithms have “pseudo-classical” subroutines, which can be implemented in reversible logic circuits

Reversible Circuit Synthesis Motivation Motivation Background Background –Reversibility –Permutations –Known Facts Theoretical Results Theoretical Results Synthesis of Optimal Circuits Synthesis of Optimal Circuits An Application to Quantum Computing An Application to Quantum Computing

Reversibility in Logic Gates A logic gate is reversible if A logic gate is reversible if –It has as many input as output wires –It permutes the set of input values Some examples include Some examples include –An inverter (the NOT gate) –A two-input, two-output gate which swaps the values on the input wires (the SWAP gate) –An (n+1)-input, (n+1)-output gate which leaves the first n wires unchanged, and flips the last if the first n were all 1 (the n-CNOT gate)

Reversibility in Logic Circuits A combinational logic circuit is reversible if A combinational logic circuit is reversible if –It contains only reversible gates –It has no FANOUT –It is acyclic (as a directed multigraph) It can be shown that a reversible circuit has as many input wires as output wires, and permutes the set of input values It can be shown that a reversible circuit has as many input wires as output wires, and permutes the set of input values

A Reversible Circuit & Truth Table abca’b’c’

Reversible Circuits & Permutations A reversible gate (or circuit) with n inputs and n outputs has 2 n possible input values, and the 2 n possible output values A reversible gate (or circuit) with n inputs and n outputs has 2 n possible input values, and the 2 n possible output values The function it computes on this set must, by definition, be a permutation The function it computes on this set must, by definition, be a permutation The set of such permutations is called S 2 n The set of such permutations is called S 2 n

Basic Facts About Permutations Permutations are multiplied by first doing one, then the other Permutations are multiplied by first doing one, then the other Every permutation can be written as the product of “transpositions”, that is, permutations which switch two indices and leave the rest fixed Every permutation can be written as the product of “transpositions”, that is, permutations which switch two indices and leave the rest fixed

Even Permutations For a fixed permutation, the parity of the number of transpositions in such a product is constant For a fixed permutation, the parity of the number of transpositions in such a product is constant The permutations which may be written as the product of an even number of transpositions are called even The permutations which may be written as the product of an even number of transpositions are called even

Known Facts Any reversible circuit with n+1 inputs and n+1 outputs, built from gates which have at most n inputs and n outputs, must compute an even permutation Any reversible circuit with n+1 inputs and n+1 outputs, built from gates which have at most n inputs and n outputs, must compute an even permutation Any permutation may be computed in a circuit using the CNOT, NOT, and TOFFOLI gates, and a sufficient amount of temporary storage Any permutation may be computed in a circuit using the CNOT, NOT, and TOFFOLI gates, and a sufficient amount of temporary storage

Reversible Circuit Synthesis Motivation Motivation Background Background Theoretical Results Theoretical Results –Zero-storage Circuits –Reversible De Morgan’s Laws Synthesis of Optimal Circuits Synthesis of Optimal Circuits An Application to Quantum Computing An Application to Quantum Computing

Zero-Storage Circuits We can show that every even permutation can be computed in a circuit composed of CNOT, NOT, and TOFFOLI gates which uses no temporary storage We can show that every even permutation can be computed in a circuit composed of CNOT, NOT, and TOFFOLI gates which uses no temporary storage For an arbitrary permutation, at most one line of temporary storage is necessary For an arbitrary permutation, at most one line of temporary storage is necessary

Zero-Storage Circuits Roughly, the proof proceeds as follows Roughly, the proof proceeds as follows –Pick an even permutation, and write it as the product of an even number of transpositions –Pair these up –Explicitly construct a circuit to compute an arbitrary transposition pair The proof is constructive, and may be used as a synthesis heuristic The proof is constructive, and may be used as a synthesis heuristic

Reversible De Morgan’s Laws De Morgan’s Laws allow all inverters in an irreversible circuit to be pushed to the inputs De Morgan’s Laws allow all inverters in an irreversible circuit to be pushed to the inputs The same may be done for a reversible circuit containing only CNOT, NOT, and TOFFOLI gates The same may be done for a reversible circuit containing only CNOT, NOT, and TOFFOLI gates

Reversible De Morgan’s Laws Similar rules exist for interchanging TOFFOLI and CNOT gates Similar rules exist for interchanging TOFFOLI and CNOT gates However, it is not always possible to push all the CNOT gates to the inputs However, it is not always possible to push all the CNOT gates to the inputs Oddly enough, using different methods, it is possible to push all CNOT gates to the middle of the circuit! Oddly enough, using different methods, it is possible to push all CNOT gates to the middle of the circuit!

Reversible Circuit Synthesis Motivation Motivation Background Background Theoretical Results Theoretical Results Synthesis of Optimal Circuits Synthesis of Optimal Circuits –Optimality –IDA* Search Algorithm –Circuit Libraries An Application to Quantum Computing An Application to Quantum Computing

Optimality The cost of a circuit is its gate count The cost of a circuit is its gate count A reversible circuit is optimal if no circuit with fewer gates computes the same permutation A reversible circuit is optimal if no circuit with fewer gates computes the same permutation Any sub-circuit of an optimal circuit must be optimal; otherwise, the sub-optimal sub-circuit could be replaced with a smaller one Any sub-circuit of an optimal circuit must be optimal; otherwise, the sub-optimal sub-circuit could be replaced with a smaller one

IDA* Search Checks all possible circuits of cost 1, then all possible circuits of cost 2, &c. Checks all possible circuits of cost 1, then all possible circuits of cost 2, &c. Avoids the memory blowup of a BFS Avoids the memory blowup of a BFS Still finds optimal solutions Still finds optimal solutions Checking circuits of cost less than n takes a small amount of time relative to that spent checking cost n circuits Checking circuits of cost less than n takes a small amount of time relative to that spent checking cost n circuits

IDA* Search Must provide a subroutine to check all circuits of cost n, for arbitrary n Must provide a subroutine to check all circuits of cost n, for arbitrary n Only need to check locally optimal circuits Only need to check locally optimal circuits

Circuit Libraries Store small, locally optimal circuits Store small, locally optimal circuits –Index by permutation –Use STL hash_map Recursively build larger circuits Recursively build larger circuits

Reversible Circuit Synthesis Motivation Motivation Background Background Theoretical Results Theoretical Results Synthesis of Optimal Circuits Synthesis of Optimal Circuits An Application to Quantum Computing An Application to Quantum Computing –Grover’s Search –Pseudo-classical Synthesis

Grover’s Search A quantum search algorithm A quantum search algorithm Runs in time O(sqrt(N)) Runs in time O(sqrt(N)) Requires a subroutine that changes the phase of any basis states which match the search criteria Requires a subroutine that changes the phase of any basis states which match the search criteria

Pseudo-classical Synthesis Adding a qubit initialized to |0> - |1> changes this into a problem in classical reversible circuit synthesis Adding a qubit initialized to |0> - |1> changes this into a problem in classical reversible circuit synthesis This can be solved by our methods This can be solved by our methods

Questions?