🤖 AI Summary
Existing quantum program resource analysis relies on predefined gate sets and struggles to support general recursion and quantum control. To address this, we propose HyrQL, a hybrid quantum programming language designed for resource analysis. HyrQL imposes no a priori constraints on the initial quantum gate set and natively supports general recursion and quantum control. Via a semantics-preserving compilation algorithm, HyrQL programs are translated into a simply-typed term rewriting system, enabling generic, compositional analysis of time and space complexity for quantum programs. This is the first work achieving gate-set-agnostic resource analyzability in a hybrid quantum language supporting both recursion and quantum control. Experimental evaluation demonstrates the effectiveness and reusability of our approach across diverse gate sets—including standard, Clifford+T, and rotation-based sets—for canonical quantum algorithms such as Grover’s search and the quantum Fourier transform.
📝 Abstract
This paper introduces the hybrid quantum language with general recursion $mathtt{Hyrql}$, driven towards resource-analysis. By design, $mathtt{Hyrql}$ does not require the specification of an initial set of quantum gates and, hence, is well amenable towards a generic cost analysis. Indeed, languages using different sets of quantum gates lead to representations of quantum circuits whose complexity varies. Towards resource-analysis, a semantics-preserving compilation algorithm to simply-typed term rewrite systems is described; allowing a generic reuse of all known techniques for analyzing the complexity of term rewrite systems. We prove the versatility of this approach through many examples.