Compiling basic linear algebra subroutines for quantum computers

Liming Zhao, Zhikuan Zhao, Patrick Rebentrost, Joseph F. FitzsimonsQuantum Mach. Intell 2019

TL;DR

This paper introduces the Quantum Matrix Algebra Toolbox (QMAT), a framework for compiling complex linear algebra operations on quantum computers. QMAT allows users to express matrix functions as sequences of basic operations, which are then translated into quantum gate sequences, enabling efficient computation of scalar properties like traces and determinants.

What Problem Does This Paper Address?

Linear algebra is fundamental to many scientific and technological fields, but classical algorithms struggle with large matrices. Quantum computing promises speedups for linear algebra tasks, but a practical way to translate high-level matrix operations into quantum circuits has been missing. This paper addresses this gap by providing a systematic method to compile a wide range of matrix functions, including addition, multiplication, and eigenvalue functions, into quantum computations. This is crucial for advancing quantum algorithms in areas like machine learning and data processing.

Methods

The core of QMAT lies in embedding given matrices into larger, Hermitian matrices. This embedding allows the use of Hamiltonian simulation techniques. The paper then defines quantum subroutines for fundamental matrix operations:

  • Matrix Addition: Approximated using Trotterization, a standard technique for simulating sums of Hamiltonians.
  • Matrix Multiplication: Achieved through a clever use of commutators and a specific unitary operator, leveraging the embedding.
  • Kronecker Sum and Tensor Product: Built upon the addition and multiplication subroutines, utilizing permutation relations of the embedding matrices.
  • Hadamard Product: Implemented by constructing a sparse matrix and using tensor product techniques.
  • Real Eigenvalue Functions: Handled by embedding the matrix and then applying the function to its eigenvalues, leveraging the properties of odd functions.

Crucially, each subroutine produces an output that adheres to the input requirements of other subroutines, enabling seamless composition. The paper also details methods for estimating scalar quantities like inner products, traces, determinants, and Schatten p-norms with bounded errors.

Datasets

Not discussed in the paper. The paper focuses on theoretical framework and algorithmic development rather than empirical evaluation on specific datasets.

Key Insights and Ideas

  • Matrix Embedding as a Unifying Principle: The paper's key innovation is the embedding of arbitrary matrices into larger Hermitian matrices. This allows a unified approach to simulating various matrix operations using established quantum simulation techniques.
  • Composability is King: The QMAT framework is designed for composability. Each subroutine outputs a result compatible with the input requirements of others, creating a powerful pipeline for complex computations.
  • Scalar Outputs for Efficiency: Directly obtaining large matrices from quantum computations can be inefficient. QMAT focuses on estimating scalar quantities (traces, determinants, norms), which are often sufficient for many applications and can be obtained more efficiently.
  • Bridging High-Level and Low-Level Quantum Operations: QMAT acts as a compiler, translating user-friendly linear algebra descriptions into the low-level quantum gate sequences required by quantum hardware.

Key Results

The paper presents a framework for compiling a broad spectrum of matrix functions into quantum circuits. It provides subroutines for:

  • Matrix addition, multiplication, Kronecker sum, tensor product, and Hadamard product.
  • Arbitrary real eigenvalue functions of matrices.

These subroutines allow for the construction of a unitary operator that encodes the computation of a composite matrix function. Furthermore, the paper demonstrates how to estimate scalar quantities such as:

  • Inner products of the form $\langle x|f(\{A_j\})|y \rangle$.
  • Traces of matrix functions.
  • Determinants of matrix functions.
  • Schatten p-norms of matrix functions.

These estimations are achieved with bounded errors, offering a significant advantage over classical methods for large matrices.

Limitations and Future Work

  • Input Assumption: The framework relies on the availability of specific unitary operators generated by the embedded matrices. The efficiency of obtaining these unitaries (e.g., via quantum walk techniques or quantum state exponentiation) is crucial but not the primary focus of this paper.
  • Approximation Errors: The Trotterization and other simulation techniques introduce approximation errors, which are analyzed and bounded in the paper.
  • Scalability of Unitary Generation: While the QMAT framework itself is efficient, the practical generation of the required unitary operators for large matrices can still be a bottleneck.
  • Future Work: The authors suggest combining their techniques with block-encoding methods for potentially improved error scaling and efficiency. They also highlight the potential for this framework to be a foundational tool for constructing more complex quantum algorithms based on fast matrix algebra.

Summary updated

BibTeX
@article{zhao2019compiling,
  author = {Liming Zhao and Zhikuan Zhao and Patrick Rebentrost and Joseph F. Fitzsimons},
  title = {{Compiling basic linear algebra subroutines for quantum computers}},
  journal = {Quantum Mach. Intell.},
  year = {2019},
  url = {https://openreview.net/forum?id=KeMKa4yLsm},
}
Figure