Multivariate Trace Estimation Using Quantum State Space Linear Algebra

Liron Mor-Yosef, Shashanka Ubaru, Lior Horesh, Haim Avron

TL;DR

Researchers have developed a new framework called quantum Matrix States Linear Algebra (qMSLA) that allows for the construction of quantum circuits using basic matrix algebra primitives. Using this framework, they introduced a quantum algorithm for estimating multivariate traces (the trace of a product of multiple matrices) that avoids the need for complex hardware like QRAM or difficult-to-synthesize "Block Encodings."

What Problem Does This Paper Address?

In the world of numerical linear algebra, calculating the trace of a matrix—the sum of its diagonal elements—is a fundamental task. It becomes even more powerful when you look at multivariate traces, which are the traces of products of several matrices (e.g., $Tr(A_1 A_2 \dots A_k)$). These values are essential for understanding the spectral properties of matrices, which in turn drive applications in Gaussian processes, kernel learning, and quantum physics (like entanglement estimation).

Classically, computing the product of $k$ matrices of size $n \times n$ and then taking the trace is computationally expensive, typically scaling as $O(kn^3)$. While quantum computing offers the promise of speedups, most existing quantum algorithms for linear algebra rely on very strict assumptions:

  1. QRAM: Specialized quantum memory that doesn't yet exist in a scalable form.
  2. Block Encodings: A method of embedding a matrix into a larger unitary matrix, which is often mathematically elegant but practically difficult to construct for arbitrary matrices.

The authors sought a "middle ground"—a way to perform these calculations using only state preparation circuits, which are simpler and more practical to build.

Methods

The authors introduce qMSLA (quantum Matrix States Linear Algebra), which they describe as a "BLAS" (Basic Linear Algebra Subprograms) for the quantum domain. Just as BLAS provides the building blocks for classical scientific computing, qMSLA provides a hierarchy of operations to build quantum circuits:

  • Level 0: Basic circuit-level operations (empty circuits, adding gates, transposing circuits).
  • Level 1: Primitive matrix operations (Kronecker products, vectorization, matrix-vector products).
  • Level 2: Composite operations (calculating the overlap between two states, padding matrices with zeros).

The core algorithm, MVTracePrep, uses these building blocks to translate a specific multivariate trace formula into a quantum circuit. The algorithm takes state preparation circuits for $2k$ matrices as input and outputs two circuits. The "overlap" (dot product) of the quantum states prepared by these two circuits is mathematically equivalent to the multivariate trace of the input matrices.

Datasets

Not discussed in the paper. As a theoretical and algorithmic paper, it focuses on complexity analysis and mathematical proofs rather than empirical testing on specific datasets.

Key Insights and Ideas

  • qMSLA as a Paradigm Shift: Instead of designing a custom, monolithic circuit for every new problem, researchers can now think in terms of "matrix equations" and synthesize the corresponding circuit using qMSLA primitives.
  • Laxer Input Models: By using state preparation circuits instead of block encodings, the algorithm is more accessible. The authors conjecture that the state preparation model is less restrictive, making it a more practical target for near-term quantum hardware.
  • Handling Non-Square Matrices: Unlike many quantum algorithms that require matrices to be Hermitian or square, this approach can handle arbitrary rectangular matrices by using specific padding and vectorization identities.
  • EliminatePermutations: The authors developed a meta-algorithm to remove unnecessary SWAP gates from the synthesized circuits, significantly reducing the depth and gate count of the final quantum programs.

Key Results

  • Complexity Reduction: For matrices stored in classical memory, the algorithm reduces the dependence on the matrix dimension $n$ from $O(n^3)$ (classical) to $O(n^2)$ (quantum/classical hybrid).
  • MVTracePrep Efficiency: The algorithm's classical cost to generate the circuits is $O(\sum g_{A_i})$, where $g_{A_i}$ is the gate count of the input circuits. The quantum depth is dominated by the maximum depth of the input circuits.
  • Spectral Sums: The authors demonstrate that this multivariate trace estimation can be extended to estimate spectral sums (like $log \det A$) by using polynomial approximations, further broadening the algorithm's utility.

Limitations and Future Work

  • The "Garbage" Problem: The current framework sometimes produces "garbage" qubits (auxiliary information) that can contaminate the final overlap measurement. The authors suggest that future versions of qMSLA need better ways to handle these ancilla qubits.
  • Classical Encoding Bottleneck: If the input matrices are unstructured and dense, the cost of loading them into a quantum state remains exponential in terms of qubits (or $O(n^2)$ in gates). The true "quantum advantage" is only realized when the input matrices have compact quantum circuit descriptions (like Hamiltonians in physics).
  • Positive Definiteness: Some of the comparisons to classical state-of-the-art estimators (like Hutch++) assume positive definite matrices; the authors note their algorithm is more general but may require different error analysis for non-symmetric cases.

For more details, you can find the full paper on arXiv under the identifier 2405.01098v1.

Summary updated

BibTeX
@article{moryosef2025multivariate,
  author = {Liron Mor-Yosef and Shashanka Ubaru and Lior Horesh and Haim Avron},
  title = {{Multivariate Trace Estimation Using Quantum State Space Linear Algebra}},
  journal = {SIAM J. Matrix Anal. Appl.},
  year = {2025},
  doi = {10.1137/24m1654749},
}
Figure