Table of Contents
Fetching ...

Qmod: Expressive High-Level Quantum Modeling

Matan Vax, Peleg Emanuel, Eyal Cornfeld, Israel Reichental, Ori Opher, Ori Roth, Tal Michaeli, Lior Preminger, Lior Gazit, Amir Naveh, Yehuda Naveh

TL;DR

Qmod tackles the bottleneck of expressing quantum algorithms at a high level by introducing quantum numeric variables and expressions that operate across digital, phase, and amplitude encodings. The language provides two interchangeable input formats (external DSL and Python-embedded DSL) and supports quantum variables, functions, and within_apply uncomputation to automate resource management. By enabling automatic domain inference for fixed-point arithmetic and native phase/amplitude computations, Qmod aims to reduce circuit depth and hand-tuning of gate-level implementations. The paper demonstrates practical use through a piecewise-linear approximation and a QAOA-based knapsack example, and discusses related work and future evaluation, underscoring potential for significant improvements in abstraction, productivity, and scalability in quantum programming.

Abstract

Quantum computing hardware is advancing at a rapid pace, yet the lack of high-level programming abstractions remains a serious bottleneck in the development of new applications. Widely used frameworks still rely on gate-level circuit descriptions, causing the algorithm's functional intent to become lost in low-level implementation details, and hindering flexibility and reuse. While various high-level quantum programming languages have emerged in recent years - offering a significant step toward higher abstraction - many still lack support for classical-like expression syntax, and native constructs for useful quantum algorithmic idioms. This paper presents Qmod, a high-level quantum programming language designed to capture algorithmic intent in natural terms while delegating implementation decisions to automation. Qmod introduces quantum numeric variables and expressions, including digital fixed-point arithmetic tuned for compact representations and optimal resource usage. Beyond digital encoding, Qmod also supports non-digital expression modes - phase and amplitude encoding - frequently exploited by quantum algorithms to achieve computational advantages. We describe the language's constructs, demonstrate practical usage examples, and outline future work on evaluating Qmod across a broader set of use cases.

Qmod: Expressive High-Level Quantum Modeling

TL;DR

Qmod tackles the bottleneck of expressing quantum algorithms at a high level by introducing quantum numeric variables and expressions that operate across digital, phase, and amplitude encodings. The language provides two interchangeable input formats (external DSL and Python-embedded DSL) and supports quantum variables, functions, and within_apply uncomputation to automate resource management. By enabling automatic domain inference for fixed-point arithmetic and native phase/amplitude computations, Qmod aims to reduce circuit depth and hand-tuning of gate-level implementations. The paper demonstrates practical use through a piecewise-linear approximation and a QAOA-based knapsack example, and discusses related work and future evaluation, underscoring potential for significant improvements in abstraction, productivity, and scalability in quantum programming.

Abstract

Quantum computing hardware is advancing at a rapid pace, yet the lack of high-level programming abstractions remains a serious bottleneck in the development of new applications. Widely used frameworks still rely on gate-level circuit descriptions, causing the algorithm's functional intent to become lost in low-level implementation details, and hindering flexibility and reuse. While various high-level quantum programming languages have emerged in recent years - offering a significant step toward higher abstraction - many still lack support for classical-like expression syntax, and native constructs for useful quantum algorithmic idioms. This paper presents Qmod, a high-level quantum programming language designed to capture algorithmic intent in natural terms while delegating implementation decisions to automation. Qmod introduces quantum numeric variables and expressions, including digital fixed-point arithmetic tuned for compact representations and optimal resource usage. Beyond digital encoding, Qmod also supports non-digital expression modes - phase and amplitude encoding - frequently exploited by quantum algorithms to achieve computational advantages. We describe the language's constructs, demonstrate practical usage examples, and outline future work on evaluating Qmod across a broader set of use cases.

Paper Structure

This paper contains 15 sections, 5 equations, 11 figures.

Figures (11)

  • Figure 1: Code listing for the bell state preparation. When this code executes is sampled with value [0, 0] or [1, 1] in equal probability.
  • Figure 2: An example of the use of a quantum struct type. When this code executes is sampled with field corresponding to the sum of the elements in .
  • Figure 3: An example of the use of within-apply statement to allocate and release a qubit, as well as the use of a lambda function with captured variables as a parameter to another user-defined quantum function.
  • Figure 4: An example of digital arithmetic and numeric type inference. Executing this code samples in one the values: 0.75, 1.125, 1.5, or 1.875, with equal probability, for the values -1.0, -0.5, 0, 0.5, respectively.
  • Figure 5: An example of the use of inplace_xor statement to implement a phase oracle for a sorted array.
  • ...and 6 more figures