Table of Contents
Fetching ...

OpenQudit: Extensible and Accelerated Numerical Quantum Compilation via a JIT-Compiled DSL

Ed Younis

TL;DR

OpenQudit tackles the performance and extensibility bottlenecks of numerical quantum compilation by introducing the Qudit Gate Language (QGL), a symbolic DSL for gate definitions, paired with an e-graph-based optimization pipeline and a tensor-network virtual machine (TNVM) for fast runtime evaluation. The system uses ahead-of-time compilation to a tensor-network bytecode and a TNVM that eagerly JIT-compiles QGL expressions, enabling rapid unitary and gradient evaluations essential for large-scale PQC synthesis. Key contributions include the QGL design, the two-stage AOT/JIT compilation architecture, the symbolic IR with automatic differentiation, and a practical evaluation showing substantial speedups over state-of-the-art tools. This approach promises easier extensibility for new gate sets and significant throughput gains for high-throughput quantum circuit synthesis, with future directions toward dynamic circuits and hardware backends.

Abstract

High-performance numerical quantum compilers rely on classical optimization, but are limited by slow numerical evaluations and a design that makes extending them with new instructions a difficult, error-prone task for domain experts. This paper introduces OpenQudit, a compilation framework that solves these problems by allowing users to define quantum operations symbolically in the Qudit Gate Language (QGL), a mathematically natural DSL. OpenQudit's ahead-of-time compiler uses a tensor network representation and an e-graph-based pass for symbolic simplification before a runtime tensor network virtual machine (TNVM) JIT-compiles the expressions into high-performance native code. The evaluation shows that this symbolic approach is highly effective, accelerating the core instantiation task by up to $\mathtt{\sim}20\times$ on common quantum circuit synthesis problems compared to state-of-the-art tools.

OpenQudit: Extensible and Accelerated Numerical Quantum Compilation via a JIT-Compiled DSL

TL;DR

OpenQudit tackles the performance and extensibility bottlenecks of numerical quantum compilation by introducing the Qudit Gate Language (QGL), a symbolic DSL for gate definitions, paired with an e-graph-based optimization pipeline and a tensor-network virtual machine (TNVM) for fast runtime evaluation. The system uses ahead-of-time compilation to a tensor-network bytecode and a TNVM that eagerly JIT-compiles QGL expressions, enabling rapid unitary and gradient evaluations essential for large-scale PQC synthesis. Key contributions include the QGL design, the two-stage AOT/JIT compilation architecture, the symbolic IR with automatic differentiation, and a practical evaluation showing substantial speedups over state-of-the-art tools. This approach promises easier extensibility for new gate sets and significant throughput gains for high-throughput quantum circuit synthesis, with future directions toward dynamic circuits and hardware backends.

Abstract

High-performance numerical quantum compilers rely on classical optimization, but are limited by slow numerical evaluations and a design that makes extending them with new instructions a difficult, error-prone task for domain experts. This paper introduces OpenQudit, a compilation framework that solves these problems by allowing users to define quantum operations symbolically in the Qudit Gate Language (QGL), a mathematically natural DSL. OpenQudit's ahead-of-time compiler uses a tensor network representation and an e-graph-based pass for symbolic simplification before a runtime tensor network virtual machine (TNVM) JIT-compiles the expressions into high-performance native code. The evaluation shows that this symbolic approach is highly effective, accelerating the core instantiation task by up to on common quantum circuit synthesis problems compared to state-of-the-art tools.

Paper Structure

This paper contains 28 sections, 2 equations, 7 figures, 2 tables.

Figures (7)

  • Figure 1: Two quantum programs illustrated in the circuit model. The left circuit comprises U3 and CNOT gates acting on three qubits. The starting state of the qubits is labeled on the left as $\ket{q_i}$; however, on the right, they are not labeled and are assumed to be indexed starting from the top and counting down. The right circuit uses a more diverse gate set that includes RX, RY, and RZ rotations.
  • Figure 2: The abstract syntax of the Qudit Gate Language (QGL). Metavariables are shown in italics, and terminals are in a monospaced font. Basic lexical and list productions are elided for clarity.
  • Figure 3: The OpenQudit compilation architecture, featuring two distinct pipelines. The ahead-of-time (AOT) pipeline (top) translates a quantum circuit into an optimized bytecode by solving the tensor network contraction ordering problem. The expression JIT pipeline (bottom), triggered during TNVM initialization, takes the QGL expressions referenced in the bytecode, performs symbolic differentiation and simplification, and compiles them into high-performance native functions for evaluation.
  • Figure 4: Circuit construction time in OpenQudit compared to other frameworks for two scalable benchmarks, the Quantum Fourier Transform (QFT), and the DTC benchmark circuit from the Benchpress suite. Benchmarks were run on powers of two, except the final QFT circuit. QFT 1023 was benchmarked instead to avoid potential floating-point issues at 1024 qubits.
  • Figure 5: The set of PQC circuits used for the numerical instantiation benchmarks, varying in qudit count, radix, and depth. On the left, the shallow qubit circuit is illustrated, and on the right, the deep qubit circuit is illustrated. The qutrit version of the shallow circuit is similar in structure to the qubit one, except CSUM and Qutrit Phase gates are used instead of CNOT and U3 gates. These circuits are representative of candidate PQCs found during different stages of a numerical synthesis algorithm.
  • ...and 2 more figures