Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2511.01736 · Proceedings of the ACM on Programming Languages

Cobble: Compiling Block Encodings for Quantum Computational Linear Algebra

Charles Yuan

cs.PLquant-phSubmitted Nov 3, 2025• Announced Nov 4, 2025• 9 citations• Revised May 13, 2026 (v2)
v1 · Nov 3, 2025v2 · May 13, 2026
arXivHTMLPDF

Abstract

Quantum algorithms for computational linear algebra promise up to exponential speedups for applications such as simulation and regression, making them prime candidates for hardware realization. But these algorithms execute in a model that cannot efficiently store matrices in memory like a classical algorithm does, instead requiring developers to implement complex expressions for matrix arithmetic in terms of correct and efficient quantum circuits. Among the challenges for the developer is navigating a cost model in which conventional optimizations for linear algebra, such as subexpression reuse, can be inapplicable or unprofitable. In this work, we present Cobble, a language for programming with quantum computational linear algebra. Cobble enables developers to express and manipulate the quantum representations of matrices, known as block encodings, using high-level notation that automatically compiles to correct quantum circuits. Cobble features analyses that compute the time and space usage of programs, as well as optimizations that reduce overhead and generate efficient circuits using state-of-the-art techniques such as the quantum singular value transformation. We evaluate Cobble on benchmark kernels for simulation, regression, search, and other applications, showing 2.6x-25.4x speedups on these benchmarks compared to the unoptimized baseline.

Journal reference
Proc. ACM Program. Lang., Vol. 10, No. PLDI, Article 177. Publication date: June 2026
DOI
10.1145/3808255
Comments
22 pages, 13 figures. v2: published version of paper

Related papers

Unitaria: Quantum Linear Algebra via Block Encodings

Matthias Deiml, Oliver Hüttenhofer, Ram Mosco +2 more

We introduce Unitaria, a Python library that brings the simplicity of classical linear algebra toolkits such as NumPy and SciPy to the implementation of quantum algorithms based on block encodings, a general-purpose abstraction in which a matrix is embedded as a sub-block of a larger unitary operator. Their implementation has so far required deep knowledge of low-level circuit construction, which Unitaria aims to eliminate. The library provides a composable, array-like interface through which users can define block encodings of matrices and vectors, combine them through standard operations such as addition, multiplication, tensor products, and the Quantum Singular Value Transformation, and extract the resulting quantum circuits automatically. A key feature is a matrix-arithmetic evaluation path in which every operation can be computed directly on encoded vectors and matrices without dependence on ancilla qubits or circuit simulation. This enables correctness verification and classical simulation that scale well beyond what state vector simulation permits and also allows resource estimation, including gate counts, qubit counts, and normalization constants, without executing any circuit. Together, these capabilities allow researchers to develop, verify, and analyze quantum linear algebra algorithms today, ahead of the availability of error-corrected hardware. Unitaria is open source and available at https://github.com/tequilahub/unitaria.

quant-pharXiv:2605.10768•May 12, 2026•1 citation

Explicit Quantum Circuits for Block Encodings of Certain Sparse Matrices

Daan Camps, Lin Lin, Roel Van Beeumen +1 more

Abstract. Many standard linear algebra problems can be solved on a quantum computer by using recently developed quantum linear algebra algorithms that make use of block encodings and quantum eigenvalue/singular value transformations. A block encoding embeds a properly scaled matrix of interest [Formula: see text] in a larger unitary transformation [Formula: see text] that can be decomposed into a product of simpler unitaries and implemented efficiently on a quantum computer. Although quantum algorithms can potentially achieve exponential speedup in solving linear algebra problems compared to the best classical algorithm, such a gain in efficiency ultimately hinges on our ability to construct an efficient quantum circuit for the block encoding of [Formula: see text], which is difficult in general, and not trivial even for well structured sparse matrices. In this paper, we give a few examples on how efficient quantum circuits can be explicitly constructed for some well structured sparse matrices and discuss a few strategies used in these constructions. We also provide implementations of these quantum circuits in MATLAB.

arXiv:2203.10236•SIAM Journal on Matrix Analysis and Applications•Mar 11, 2024•167 citations

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

Salvatore Pio Conte, Simone Cosenza, Giacomo Lancellotti +1 more

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.

ACM International Conference on Computing Frontiers: Workshops and Special Sessions (CF Companion)•May 19, 2026•0 citations

Block Encoding of Non-Unitary Matrices Into Quantum Framework

Varun Puram, K. M. George, Johnson P. Thomas

Block encoding of non-unitary matrices in a quantum framework is a transformative technique for broadening the capabilities of quantum algorithms, allowing them to address a wider range of computational challenges. This paper introduces a novel embedding method to construct unitary matrices from non-unitary matrices, enabling their efficient encoding into quantum circuits. Utilizing the Gram-Schmidt process, the proposed approach embeds an$n \times n$non-unitary matrix$A$into a$2 n \times 2 n$unitary matrix$U_{A}$. When Compared to conventional methods such as Singular Value Decomposition (SVD), our approach achieves a 20 % faster execution time while maintaining high accuracy. Block encoding method has the potential to significantly advance quantum computing applicability by building unitary matrices from non-unitary ones in areas like optimization, quantum machine learning, and large-scale quantum simulations.

IEEE International Conference on Quantum Control, Computing and Learning (qCCL)•Jun 25, 2025•0 citations

Quantum singular value transformation and beyond: exponential improvements for quantum matrix arithmetics

András Gilyén, Yuan Su, Guang Hao Low +1 more

An n-qubit quantum circuit performs a unitary operation on an exponentially large, 2n-dimensional, Hilbert space, which is a major source of quantum speed-ups. We develop a new “Quantum singular value transformation” algorithm that can directly harness the advantages of exponential dimensionality by applying polynomial transformations to the singular values of a block of a unitary operator. The transformations are realized by quantum circuits with a very simple structure - typically using only a constant number of ancilla qubits - leading to optimal algorithms with appealing constant factors. We show that our framework allows describing many quantum algorithms on a high level, and enables remarkably concise proofs for many prominent quantum algorithms, ranging from optimal Hamiltonian simulation to various quantum machine learning applications. We also devise a new singular vector transformation algorithm, describe how to exponentially improve the complexity of implementing fractional queries to unitaries with a gapped spectrum, and show how to efficiently implement principal component regression. Finally, we also prove a quantum lower bound on spectral transformations.

arXiv:1806.01838•ACM Symposium on Theory of Computing (STOC)•Jun 20, 2019•1,139 citations

Toward speedup without quantum coherent access

Nhat A. Nghiem

Along with the development of quantum technology, finding useful applications of quantum computers has been a central pursuit. Despite various quantum algorithms have been developed, many of them often require strong input assumptions, which is hardware demanding. In particular, recent advances on dequantization have revealed that the quantum advantage is more of a mere artifact of strong input assumptions. In this work, we propose a variant of these algorithms, leveraging both classical and quantum resources. Provided the classical knowledge (the entries) of the matrix/vector of interest, a classical procedure is used to pre-process this information. Then they are fed into a quantum circuit which is shown to be a block encoding of the matrix of interest. From this block-encoding, we show how to use it to tackle a wide range of problems, including principal component analysis, linear equation solving, Hamiltonian simulation, preparing ground state, and data fitting. We also analyze our protocol, showing that both the classical and quantum procedure can achieve logarithmic complexity in the input dimension, thus implying its potential for near term realization. We then discuss several implications and corollaries of our result. First,, our results suggest there are certain matrices/Hamiltonians where our method can provide exponential improvement compared to the existing ones with respect to the sparsity. Regarding dense linear systems, our method achieves exponential speed-up with respect to the inverse of error tolerance, compared to the best previously known quantum algorithm for dense systems. Last, and most importantly, regarding quantum data fitting, we show how the output of our quantum algorithms can be leveraged to predict unseen data. Thus, it provides an end-to-end application, which has been an open aspect of the previous quantum data fitting algorithm.

quant-pharXiv:2602.20781•Feb 25, 2026•0 citations
Quantum algorithms for computational linear algebra promise up to exponential speedups for applications such as simulation and regression, making them prime candidates for hardware realization. But these algorithms execute in a model that cannot efficiently store matrices in memory like a classical algorithm does, instead requiring developers to implement complex expressions for matrix arithmetic in terms of correct and efficient quantum circuits. Among the challenges for the developer is navigating a cost model in which conventional optimizations for linear algebra, such as subexpression reuse, can be inapplicable or unprofitable.
In this work, we present Cobble, a language for programming with quantum computational linear algebra. Cobble enables developers to express and manipulate the quantum representations of matrices, known as block encodings, using high-level notation that automatically compiles to correct quantum circuits. Cobble features analyses that compute the time and space usage of programs, as well as optimizations that reduce overhead and generate efficient circuits using state-of-the-art techniques such as the quantum singular value transformation. We evaluate Cobble on benchmark kernels for simulation, regression, search, and other applications, showing 2.6x-25.4x speedups on these benchmarks compared to the unoptimized baseline.
We introduce Unitaria, a Python library that brings the simplicity of classical linear algebra toolkits such as NumPy and SciPy to the implementation of quantum algorithms based on block encodings, a general-purpose abstraction in which a matrix is embedded as a sub-block of a larger unitary operator. Their implementation has so far required deep knowledge of low-level circuit construction, which Unitaria aims to eliminate. The library provides a composable, array-like interface through which users can define block encodings of matrices and vectors, combine them through standard operations such as addition, multiplication, tensor products, and the Quantum Singular Value Transformation, and extract the resulting quantum circuits automatically. A key feature is a matrix-arithmetic evaluation path in which every operation can be computed directly on encoded vectors and matrices without dependence on ancilla qubits or circuit simulation. This enables correctness verification and classical simulation that scale well beyond what state vector simulation permits and also allows resource estimation, including gate counts, qubit counts, and normalization constants, without executing any circuit. Together, these capabilities allow researchers to develop, verify, and analyze quantum linear algebra algorithms today, ahead of the availability of error-corrected hardware. Unitaria is open source and available at https://github.com/tequilahub/unitaria.
Abstract. Many standard linear algebra problems can be solved on a quantum computer by using recently developed quantum linear algebra algorithms that make use of block encodings and quantum eigenvalue/singular value transformations. A block encoding embeds a properly scaled matrix of interest [Formula: see text] in a larger unitary transformation [Formula: see text] that can be decomposed into a product of simpler unitaries and implemented efficiently on a quantum computer. Although quantum algorithms can potentially achieve exponential speedup in solving linear algebra problems compared to the best classical algorithm, such a gain in efficiency ultimately hinges on our ability to construct an efficient quantum circuit for the block encoding of [Formula: see text], which is difficult in general, and not trivial even for well structured sparse matrices. In this paper, we give a few examples on how efficient quantum circuits can be explicitly constructed for some well structured sparse matrices and discuss a few strategies used in these constructions. We also provide implementations of these quantum circuits in MATLAB.
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%90\%90% sparsity in matrix multiplication, this optimization reduces qubit count by 91–97%97\%97%, T-depth by 85–99%99\%99%, and T-count by 99%99\%99%, depending on the selected arithmetic backend.
Block encoding of non-unitary matrices in a quantum framework is a transformative technique for broadening the capabilities of quantum algorithms, allowing them to address a wider range of computational challenges. This paper introduces a novel embedding method to construct unitary matrices from non-unitary matrices, enabling their efficient encoding into quantum circuits. Utilizing the Gram-Schmidt process, the proposed approach embeds ann×nn \times nn×nnon-unitary matrixAAAinto a2n×2n2 n \times 2 n2n×2nunitary matrixUAU_{A}UA​. When Compared to conventional methods such as Singular Value Decomposition (SVD), our approach achieves a 20 % faster execution time while maintaining high accuracy. Block encoding method has the potential to significantly advance quantum computing applicability by building unitary matrices from non-unitary ones in areas like optimization, quantum machine learning, and large-scale quantum simulations.
An n-qubit quantum circuit performs a unitary operation on an exponentially large, 2n-dimensional, Hilbert space, which is a major source of quantum speed-ups. We develop a new “Quantum singular value transformation” algorithm that can directly harness the advantages of exponential dimensionality by applying polynomial transformations to the singular values of a block of a unitary operator. The transformations are realized by quantum circuits with a very simple structure - typically using only a constant number of ancilla qubits - leading to optimal algorithms with appealing constant factors. We show that our framework allows describing many quantum algorithms on a high level, and enables remarkably concise proofs for many prominent quantum algorithms, ranging from optimal Hamiltonian simulation to various quantum machine learning applications. We also devise a new singular vector transformation algorithm, describe how to exponentially improve the complexity of implementing fractional queries to unitaries with a gapped spectrum, and show how to efficiently implement principal component regression. Finally, we also prove a quantum lower bound on spectral transformations.
Along with the development of quantum technology, finding useful applications of quantum computers has been a central pursuit. Despite various quantum algorithms have been developed, many of them often require strong input assumptions, which is hardware demanding. In particular, recent advances on dequantization have revealed that the quantum advantage is more of a mere artifact of strong input assumptions. In this work, we propose a variant of these algorithms, leveraging both classical and quantum resources. Provided the classical knowledge (the entries) of the matrix/vector of interest, a classical procedure is used to pre-process this information. Then they are fed into a quantum circuit which is shown to be a block encoding of the matrix of interest. From this block-encoding, we show how to use it to tackle a wide range of problems, including principal component analysis, linear equation solving, Hamiltonian simulation, preparing ground state, and data fitting. We also analyze our protocol, showing that both the classical and quantum procedure can achieve logarithmic complexity in the input dimension, thus implying its potential for near term realization. We then discuss several implications and corollaries of our result. First,, our results suggest there are certain matrices/Hamiltonians where our method can provide exponential improvement compared to the existing ones with respect to the sparsity. Regarding dense linear systems, our method achieves exponential speed-up with respect to the inverse of error tolerance, compared to the best previously known quantum algorithm for dense systems. Last, and most importantly, regarding quantum data fitting, we show how the output of our quantum algorithms can be leveraged to predict unseen data. Thus, it provides an end-to-end application, which has been an open aspect of the previous quantum data fitting algorithm.