Generating Reversible Circuits from Higher-Order Functional Programs

Boolean reversible circuits are boolean circuits made of reversible elementary gates. Despite their constrained form, they can simulate any boolean function. The synthesis and validation of a reversible circuit simulating a given function is a difficult problem. In 1973, Bennett proposed to generate reversible circuits from traces of execution of Turing machines. In this paper, we propose a novel presentation of this approach, adapted to higher-order programs. Starting with a PCF-like language, we use a monadic representation of the trace of execution to turn a regular boolean program into a circuit-generating code. We show that a circuit traced out of a program computes the same boolean function as the original program. This technique has been successfully applied to generate large oracles with the quantum programming language Quipper.

[1]  Frédéric Magniez,et al.  Quantum algorithms for the triangle problem , 2005, SODA '05.

[2]  Michael Kirkedal Thomsen A functional language for describing reversible logic , 2012, Proceeding of the 2012 Forum on Specification and Design Languages.

[3]  A. Harrow,et al.  Quantum algorithm for linear systems of equations. , 2008, Physical review letters.

[4]  Yasaman Sanaee,et al.  Shared-PPRM: A Memory-Efficient Representation for Boolean Reversible Functions , 2008, 2008 IEEE Computer Society Annual Symposium on VLSI.

[5]  Rishiyur S. Nikhil,et al.  Bluespec: A General-Purpose Approach to High-Level Synthesis Based on Parallel Atomic Transactions , 2008 .

[6]  Hyeonseung Im,et al.  Functional netlists , 2008, ICFP 2008.

[7]  Martin Rötteler,et al.  Reversible circuit compilation with space constraints , 2015, ArXiv.

[8]  Samson Abramsky,et al.  A Structural Approach to Reversible Computation , 2005, Theor. Comput. Sci..

[9]  Werner E. Kluge,et al.  A Reversible SE(M)CD Machine , 1999, IFL.

[10]  Adam Chlipala,et al.  Formal Verification of Hardware Synthesis , 2013, CAV.

[11]  Dan R. Ghica,et al.  Geometry of synthesis: a structured approach to VLSI design , 2007, POPL '07.

[12]  Andris Ambainis,et al.  Any AND-OR Formula of Size N can be Evaluated in time N^{1/2 + o(1)} on a Quantum Computer , 2010, 48th Annual IEEE Symposium on Foundations of Computer Science (FOCS'07).

[13]  Niraj K. Jha,et al.  An Algorithm for Synthesis of Reversible Logic Circuits , 2006, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems.

[14]  Robert Wille,et al.  SyReC: A Programming Language for Synthesis of Reversible Circuits , 2010, FDL.

[15]  Peter W. Shor,et al.  Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer , 1995, SIAM Rev..

[16]  M. Thornton,et al.  ESOP-based Toffoli Gate Cascade Generation , 2007, 2007 IEEE Pacific Rim Conference on Communications, Computers and Signal Processing.

[17]  Ingo Sander,et al.  System Modeling and Design Refinement in ForSyDe , 2003 .

[18]  Igor L. Markov,et al.  Synthesis and optimization of reversible circuits—a survey , 2011, CSUR.

[19]  Andris Ambainis,et al.  Any AND-OR Formula of Size N Can Be Evaluated in Time N1/2+o(1) on a Quantum Computer , 2010, SIAM J. Comput..

[20]  Koen Claessen Embedded Languages for Describing and Verifying Hardware , 2001 .

[21]  Gérard Berry,et al.  The foundations of Esterel , 2000, Proof, Language, and Interaction.

[22]  R. Feynman Quantum mechanical computers , 1986 .

[23]  Robert Wille,et al.  Quantified Synthesis of Reversible Logic , 2008, 2008 Design, Automation and Test in Europe.

[24]  D.M. Miller,et al.  Fredkin/Toffoli templates for reversible logic synthesis , 2003, ICCAD-2003. International Conference on Computer Aided Design (IEEE Cat. No.03CH37486).

[25]  Robert Wille,et al.  RevLib: An Online Resource for Reversible Functions and Reversible Circuits , 2008, 38th International Symposium on Multiple Valued Logic (ismvl 2008).

[26]  R GhicaDan Geometry of synthesis , 2007 .

[27]  Mathias Soeken,et al.  White Dots do Matter: Rewriting Reversible Logic Circuits , 2013, RC.

[28]  Charles H. Bennett,et al.  Logical reversibility of computation , 1973 .

[29]  Kazushige Terui Proof nets and Boolean circuits , 2004, Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science, 2004..

[30]  Benoît Valiron,et al.  Resource analysis of the quantum linear system algorithm , 2015 .

[31]  Stefan Frehse,et al.  RevKit: An Open Source Toolkit for the Design of Reversible Circuits , 2011, RC.

[32]  Benoît Valiron,et al.  Concrete resource analysis of the quantum linear-system algorithm used to compute the electromagnetic scattering cross section of a 2D target , 2015, Quantum Inf. Process..

[33]  Thierry Paul,et al.  Quantum computation and quantum information , 2007, Mathematical Structures in Computer Science.

[34]  Michael Hicks,et al.  Lightweight monadic programming in ML , 2011, ICFP.

[35]  Amr Sabry,et al.  Information effects , 2012, POPL '12.

[36]  Jean-Yves Girard,et al.  Towards a geometry of interaction , 1989 .

[37]  Rolf Landauer,et al.  Irreversibility and heat generation in the computing process , 1961, IBM J. Res. Dev..