Faster quantum subroutine for matrix chain multiplication via Chebyshev approximation

Xinying Li, Pei-Lin Zheng, Chengkang Pan, Fei Wang, Chunfeng Cui, Xian LuScientific 2025

Abstract

Matrix operations are crucial to various computational tasks in various fields, and quantum computing offers a promising avenue to accelerate these operations. We present a quantum matrix multiplication (QMM) algorithm that employs amplitude encoding and combines quantum walks with Chebyshev polynomial approximation to achieve quadratic acceleration for matrix chain multiplication where the same matrix is applied K times while maintaining logarithmic complexity in matrix dimension and precision. The algorithm can be applied to any complex matrix. Furthermore, we discuss integrating our QMM algorithm as a subroutine in other matrix operations and propose strategies to optimize QMM for matrices with large condition numbers with numerical simulation.

Introduction

Matrix multiplication serves as the foundational computational engine for modern artificial intelligence, data analysis, and physical simulations. While quantum computing promises significant speedups for these tasks, current algorithms often struggle with "matrix chains"—the repeated application of a matrix $A$ (e.g., $A^K$). Classical and existing quantum methods typically exhibit a linear time complexity relative to $K$. Additionally, many quantum approaches are hindered by high sensitivity to the matrix condition number or require excessive qubit counts to maintain precision. This research introduces a general-purpose subroutine for complex matrix operations that breaks the linear dependence on $K$ while remaining robust for large-scale applications.

Methodology

The proposed QMM algorithm utilizes amplitude encoding to store matrix elements within the amplitudes of a quantum state. The technical framework relies on three primary innovations:

  1. Hermitization: To accommodate the requirement that quantum gates be unitary, the algorithm employs a transformation that embeds any general complex matrix into a larger Hermitian operator.
  2. Quantum Walks and Chebyshev Approximation: Rather than performing $K$ sequential multiplications, the problem is reframed as a function approximation. By using quantum walks to implement a block-encoding of the matrix, the algorithm applies Chebyshev polynomials to approximate the power function $f(x) = x^K$. This mathematical shortcut reduces complexity from $O(K)$ to $O(\sqrt{K})$.
  3. Quantum-to-Quantum Subroutine: The method includes a mechanism to convert a quantum state directly into a unitary operator using only $O(\log N)$ additional qubits. This avoids the classical measurement bottleneck, allowing the output to be used immediately in subsequent quantum algorithms like HHL or SVD.

Key Insights and Optimization

A significant challenge in quantum matrix operations is the condition number ($\kappa$), which measures numerical instability. The authors discovered that "ill-conditioned" matrices can be regularized by adding an auxiliary identity matrix. This strategy effectively "tames" the matrix, reducing the condition number and enhancing the algorithm's success probability without significant loss of accuracy.

Matrix condition number reduction before and after the proposed optimization strategy.

Furthermore, the researchers developed a memory-efficient simulation technique. While simulating quantum systems classically typically requires $O(N^4)$ memory, this study exploited block-diagonal sparsity to reduce requirements to $O(N^2)$, enabling numerical verification for matrix dimensions up to $N=1024$.

Key Results and Comparative Analysis

The algorithm achieves a total time complexity of $O(\sqrt{K} \cdot \text{poly log}(N, \kappa, 1/\epsilon))$, where $N$ is the dimension and $\epsilon$ is the precision. Numerical simulations confirmed that the algorithm maintains high precision (down to $10^{-16}$), matching standard classical double-precision floating-point arithmetic.

Comparison of the proposed QMM algorithm against existing methods across various complexity metrics.

As shown in the comparative analysis above, the proposed method is the first to achieve $\Theta(\sqrt{K})$ complexity for the $K$-th power of a matrix while supporting general complex matrices and providing a quantum state or operator as an output.

Limitations and Future Work

Despite its advantages, the algorithm's efficiency depends on the availability of Quantum Random Access Memory (QRAM) for data loading, which remains a hardware hurdle. Additionally, while the scaling with the condition number is logarithmic, extremely ill-conditioned matrices still impact the circuit's success probability. Future research will focus on implementing these subroutines on Noisy Intermediate-Scale Quantum (NISQ) devices to evaluate their performance under real-world noise conditions.

Summary updated

BibTeX
@inproceedings{li2025faster,
  author = {Xinying Li and Pei-Lin Zheng and Chengkang Pan and Fei Wang and Chunfeng Cui and Xian Lu},
  title = {{Faster quantum subroutine for matrix chain multiplication via Chebyshev approximation}},
  booktitle = {Scientific},
  year = {2025},
  doi = {10.1038/s41598-025-13092-2},
}
Figure