From Symmetric Pattern-Matching to Quantum Control (Extended Version)

One perspective on quantum algorithms is that they are classical algorithms having access to a special kind of memory with exotic properties. This perspective suggests that, even in the case of quantum algorithms, the control flow notions of sequencing, conditionals, loops, and recursion are entirely classical. There is however, another notion of control flow, that is itself quantum. The notion of quantum conditional expression is reasonably well-understood: the execution of the two expressions becomes itself a superposition of executions. The quantum counterpart of loops and recursion is however not believed to be meaningful in its most general form. In this paper, we argue that, under the right circumstances, a reasonable notion of quantum loops and recursion is possible. To this aim, we first propose a classical, typed, reversible language with lists and fixpoints. We then extend this language to the closed quantum domain (without measurements) by allowing linear combinations of terms and restricting fixpoints to structurally recursive fixpoints whose termination proofs match the proofs of convergence of sequences in infinite-dimensional Hilbert spaces. We additionally give an operational semantics for the quantum language in the spirit of algebraic lambda-calculi and illustrate its expressiveness by modeling several common unitary operations.

[1]  W. Wootters,et al.  A single quantum cannot be cloned , 1982, Nature.

[2]  Benoît Valiron,et al.  Quipper: a scalable quantum programming language , 2013, PLDI.

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

[4]  Robert Glück,et al.  Join inverse categories and reversible recursion , 2017, J. Log. Algebraic Methods Program..

[5]  Jennifer Paykin,et al.  QWIRE: a core language for quantum circuits , 2017, POPL.

[6]  Simon Perdrix,et al.  Call-by-value, call-by-name and the vectorial behaviour of the algebraic λ-calculus , 2014, Log. Methods Comput. Sci..

[7]  Roshan P. James Theseus : A High Level Language for Reversible Computing , 2014 .

[8]  Prakash Panangaden,et al.  Quantum Alternation: Prospects and Problems , 2015, QPL.

[9]  Gilles Dowek,et al.  Lineal: A linear-algebraic Lambda-calculus , 2017, Log. Methods Comput. Sci..

[10]  André van Tonder,et al.  A Lambda Calculus for Quantum Computation , 2003, SIAM J. Comput..

[11]  Lionel Vaux The algebraic lambda calculus , 2009, Math. Struct. Comput. Sci..

[12]  Juliana Kaizer Vizzotto,et al.  From Symmetric Pattern-Matching to Quantum Control , 2018, FoSSaCS.

[13]  Benoît Valiron,et al.  The vectorial λ-calculus , 2017, Inf. Comput..

[14]  Peter Selinger,et al.  Towards a quantum programming language , 2004, Mathematical Structures in Computer Science.

[15]  Mingsheng Ying,et al.  Foundations of Quantum Programming , 2016 .

[16]  Benoît Valiron,et al.  The Vectorial Lambda-Calculus , 2013, ArXiv.

[17]  M. Zwaan An introduction to hilbert space , 1990 .

[18]  Thorsten Altenkirch,et al.  Structuring quantum effects: superoperators as arrows , 2006, Math. Struct. Comput. Sci..

[19]  Robert Glück,et al.  A categorical foundation for structured reversible flowchart languages: Soundness and adequacy , 2018, Log. Methods Comput. Sci..

[20]  Jonathan Grattage A functional quantum programming language , 2005, 20th Annual IEEE Symposium on Logic in Computer Science (LICS' 05).