Compiling Quantum Lambda-Terms into Circuits via the Geometry of Interaction
Kostia Chardonnet, Ugo Dal Lago, Naohiko Hoshino, Paolo Pistone
TL;DR
Girard's geometry of interaction is leveraged to perform as much of the classical computation as possible, at the same time producing a circuit that performs all the quantum operations in the underlying $\lambda$-term.
Abstract
We present an algorithm turning any term of a linear quantum $λ$-calculus into a quantum circuit. The essential ingredient behind the proposed algorithm is Girard's geometry of interaction, which, differently from its well-known uses from the literature, is here leveraged to perform as much of the classical computation as possible, at the same time producing a circuit that, when evaluated, performs all the quantum operations in the underlying $λ$-term. We identify higher-order control flow as the primary obstacle towards efficient solutions to the problem at hand. Notably, geometry of interaction proves sufficiently flexible to enable efficient compilation in many cases, while still supporting a total compilation procedure. Finally, we characterize through a type system those $λ$-terms for which compilation can be performed efficiently.
