Work

Compiling Linear Algebra Workloads from C to Quantum Circuits via Multi Level Intermediate Representation

Year: 2026
Type: conference-paper
Abstract: Linear algebra kernels are central to many quantum algorithms, yet existing quantum compilers primarily target scalar arithmetic, limiting their expressiveness and applicability to such workloads. In this work, we extend the QuantumC compilation framework to support the compilation of C programs containing linear algebra operations into quantum circuits. Our approach introduces pattern-based recognition of common vector and matrix computations, including vector addition, dot product, and matrix–matrix multiplication, and integrates a dedicated intermediate representation into the existing QuantumC pipeline. This design allows selecting between two quantum arithmetic backends—ripple-carry and quantum Fourier transform—enabling trade-offs in quantum resource usage. Additionally, we introduce a compile-time sparsity optimization pass that statically analyzes vector and matrix structures. For matrices with \(90\%\) sparsity in matrix multiplication, this optimization reduces qubit count by 91–\(97\%\), T-depth by 85–\(99\%\), and T-count by \(99\%\), depending on the selected arithmetic backend.
Language: English
Open Access status: hybrid
OpenAlex ID: W7167940001
FWCI:
Cites: 19
Cited by:
Related to: 10