---
title: Quantum Leverage Score Sampling
url: https://www.emergentmind.com/topics/quantum-leverage-score-sampling
type: topic
---

# Quantum Leverage Score Sampling

Quantum leverage score sampling refers to quantum algorithms that generate, sample, or approximate leverage scores of a matrix $A\in\mathbb{R}^{n\times d}$ more efficiently than classical algorithms, with direct implications for randomized numerical linear algebra, large-scale regression, and low-rank approximation. The leverage score of a row (or column) quantifies its influence or weight in the leading singular subspace of $A$, and importance sampling by leverage scores underlies the fastest classical and quantum algorithms for matrix problems at scale. Quantum approaches replace explicit computation of all leverage scores with quantum state preparation, amplitude amplification, and block-encoding techniques, yielding quadratic to exponential speedups, subject to proven lower bounds. Quantum-inspired algorithms adapt certain quantum subroutines to classical computation under enhanced sampling data structures, providing a different axis of acceleration.

## 1. Leverage Scores and Classical Bottlenecks

Given $A$ with thin singular value decomposition (SVD) $A = U D V^T$, $U\in\mathbb{R}^{n\times r}$, $V\in\mathbb{R}^{d\times r}$, $D\in\mathbb{R}^{r\times r}$, the (row) leverage scores are
\[
\ell_{R,i}(A) = \|U_{i,*}\|^2, \quad i = 1,\ldots,n,
\]
and the (column) leverage scores are $\ell_{C,j}(A) = \|V_{j,*}\|^2$. These scores sum to the rank $r$ of $A$. In classical randomized algorithms for matrix sketching, least squares, and CUR decompositions, leverage score sampling significantly reduces sample complexity and runtime, but a primary computational bottleneck is their computation or approximation to high accuracy. The best classical methods, notably those of Clarkson–Woodruff, operate in time $\widetilde{O}(\textrm{nnz}(A) + r^3)$, where reading $A$ is dominant for large $n, d$. This high cost motivates quantum acceleration [2301.06107].

## 2. Quantum Algorithmic Framework

Quantum leverage score sampling circumvents explicit computation of individual scores by preparing the quantum state
\[
|\mathcal{L}_R\rangle = \frac{1}{\sqrt{r}} \sum_{i=1}^{n} \sqrt{\ell_{R,i}} |i\rangle
\]
on a quantum device. Measuring $|\mathcal{L}_R\rangle$ yields index $i$ with probability $\ell_{R,i}/r$; a similar approach holds for columns. The quantum algorithm proceeds via the following steps:

1. **Block-encoding**: $A$ is encoded as a unitary $U_A$ (Definition 2.3) on $a+s$ qubits as an $(\alpha,a,\epsilon)$ block-encoding, so that $A \approx \alpha(\langle0^a|\otimes I)U_A(|0^a\rangle\otimes I)$.
2. **Quantum Singular Value Transformation (QSVT)**: QSVT (Proposition 2.5) enables construction of a block-encoding of $U V^T$, the isometry projecting onto the dominant subspace, in $O((\alpha/\sigma_r)\log(1/\tilde{\epsilon}))$ uses of $U_A$.
3. **Quantum State Preparation and Amplification**: Starting from a uniform superposition over indices, the quantum device applies the constructed isometry (via $\widetilde{U}$) to amplitude-encode $\|UV^T e_j\|^2$, which matches $\ell_{C,j}/r$. Amplitude amplification, repeated $O(\sqrt{\min(n,d)/r})$ times, boosts success probability.
4. **Amplitude Estimation**: To estimate individual leverage scores to additive error $\varepsilon$, amplify the desired ancilla component and use quantum amplitude estimation, which requires $O(1/\varepsilon)$ calls to the underlying unitaries.

The total resource cost for preparing leverage score states is
\[
\widetilde{O}\left( \frac{\alpha T}{\sigma_r} \sqrt{\min(n,d)/r} \right)
\]
with $T$ the cost of preparing $U_A$ and $\sigma_r$ the minimal nonzero singular value. Individual score estimation to accuracy $\varepsilon$ requires additional $\widetilde{O}((\alpha T/\sigma_r)/\varepsilon)$ resources [2301.06107].

## 3. Speedups and Lower Bounds

The quantum approach yields at least quadratic—and in some regimes exponential—speedup over classical leverage score routines. For block-encodings with polylogarithmic cost, e.g., when $A$ is well-conditioned and sparse or when $r = d$ and $\kappa = \sigma_1/\sigma_r = O(1)$, quantum runtimes can be exponential improvements over the best classical runtime $\Omega(\textrm{nnz}(A))$. In the generic case, the quantum algorithm runs in time quadratic in $\sqrt{\min(n,d)/r}$ versus linear dependence in $n$ or $d$ classically.

Quantum lower bounds show that, under entry-oracle or block-encoding models, any quantum sampler must use at least $\Omega(\sqrt{\min(n,d)/r})$ queries, matching the achieved runtime up to logarithmic factors. Similarly, accurately estimating the largest leverage score or solving least-squares regression to $\ell_2$-error $\epsilon$ also requires $\Omega(\alpha/\sigma_r)$ and $\Omega(\sqrt{n} + d)$ queries, respectively. These lower bounds derive from reductions to Grover search and OR-function query complexities [2301.06107].

## 4. Algorithmic Implementation Details

The detailed workflow for quantum leverage score sampling includes:

- **Block-Encoding Construction**: Depending on matrix sparsity and storage, construct an efficient $(\alpha,a,\epsilon)$ block-encoding $U_A$ with cost $T$.
- **QSVT for $UV^T$**: Use $O((\alpha/\sigma_r)\log(1/\tilde{\epsilon}))$ calls to $U_A$ to effect QSVT for the singular subspace isometry.
- **State Preparation**: For columns ($n \ge d$), prepare the state
  \[
  |\psi_0\rangle = \frac{1}{\sqrt{d}} \sum_{j=1}^d |j\rangle\otimes|0\ldots0\rangle
  \]
  and evolve via $\widetilde{U}$. Retain only ancilla flag $|0\rangle$ (indicating projection into the subspace).
- **Amplitude Amplification**: Repeat the state preparation procedure $O(\sqrt{d/r})$ times so that the relevant subspace receives total probability close to unity.
- **Measurement**: After preparation, measuring the state yields an index $j$ with probability proportional to $\ell_{C,j}$. Individual score estimation leverages amplitude estimation to refine this probability to additive error $\varepsilon$ efficiently.

The following table summarizes the subroutine costs:

| Subroutine              | Quantum Cost                                              | Classical Cost ($\widetilde{O}$)       |
|-------------------------|----------------------------------------------------------|----------------------------------------|
| Prepare leverage state  | $(\alpha T/\sigma_r)\sqrt{\min(n,d)/r}$                  | $\operatorname{nnz}(A) + r^3$          |
| Estimate one score      | $(\alpha T/\sigma_r)/\varepsilon$                        | $\operatorname{nnz}(A) + r^3$          |
| Rigid regression        | see Sec. 6, quantum part dominates for $r\ll n$          | $nd$ or $\operatorname{nnz}(A) + r^3$  |

## 5. Application: Rigid Regression and Matrix Sketching

A major application of quantum leverage score sampling is in rigid (ridge) regression,
\[
x_{\rm opt} = \arg\min_{x\in\mathbb{R}^d} \|Ax - b\|^2 + \lambda^2\|x\|^2,
\]
or equivalently, least-squares on the augmented system $\widetilde{A}, \widetilde{b}$. Quantum leverage samples for $\widetilde{A}$ can be generated in cost $\widetilde{O}((\alpha T/\lambda)\sqrt{d/\textrm{sd}_\lambda(A)})$, with $\textrm{sd}_\lambda(A)$ the statistical dimension. After $q = O(\textrm{sd}_\lambda/\varepsilon)$ samples, the downsampled system is solved classically at cost $\widetilde{O}(r^\omega(\|A\|/\lambda)^{2\omega}/\varepsilon^\omega)$. For $r\ll n$, overall runtime is
\[
\widetilde{O}\left[\frac{r}{\varepsilon}\frac{\alpha T}{\lambda}\sqrt{\frac{n+d}{\varepsilon} + d} + \frac{r^\omega}{\varepsilon^\omega}\frac{\|A\|^2}{\lambda^2} + r^3\right]
\]
yielding polynomial or even exponential speedup in $n$ (up to $\sqrt{n}$) over classical methods [2301.06107].

Classically, substituting leverage sampling by the classical Clarkson–Woodruff routine yields a fully classical algorithm at cost $\widetilde{O}(\operatorname{nnz}(A)+r^3 + d\,r^\omega(\|A\|/\lambda)^{2\omega}/\varepsilon^\omega)$.

## 6. Quantum-Inspired and Dequantized Methods

Quantum-inspired algorithms, as introduced by Zuo and Xiang [2111.08915], achieve similar exponential speedups in the matrix dimensions $m,n$ using enhanced sampling data structures (BSTs supporting fast $\ell_2$-norm computation and conditional column/row sampling in $O(\log mn)$ time). Their method builds a “quantum-inspired SVD” (QiSVD), outputs $S, V, \Sigma$ so that $\hat U = SV\Sigma^{-1}$ approximates the singular subspace, and then computes leverage score approximations $\tilde{\ell}_i$ through inner-product sampling and postprocessing.

This approach requires polylogarithmic dependence on dimensions and polynomial dependence on parameters $k$, $\kappa$, and $1/\varepsilon$. For practical sampling-based matrix sketching, the method forms the sampling distribution $\tilde{\ell}_i/\sum_j \tilde{\ell}_j$, samples and rescales accordingly, ensuring that the spectral properties of $R^T R$ closely approximate $A^T A$, with only additive error of order $\varepsilon$. The quantum-inspired algorithm matches quantum query complexity up to polynomial factors in $k,\kappa,1/\varepsilon$ (but requires BST-based oracles) [2111.08915].

## 7. Theoretical Guarantees and Optimality

The central theoretical results underpinning quantum leverage score sampling are as follows:

- **Quantum State Preparation and Sampling**: States of the form $|\mathcal{L}_R\rangle$ and $|\mathcal{L}_C\rangle$ can be prepared in $\widetilde{O}((\alpha T/\sigma_r)\sqrt{\min(n,d)/r})$ time; individual score estimation is achieved in $\widetilde{O}((\alpha T/\sigma_r)/\varepsilon)$.
- **Quantum Lower Bounds**: Any quantum leverage sampler must use $\Omega(\sqrt{\min(n,d)/r})$ oracle queries or $\Omega(\alpha/\sigma_r)$ block-encoding calls, and least-squares regression requires $\Omega(\sqrt{n}+d)$ queries.
- **Error Bounds (Quantum-Inspired)**: For the dequantized QiSVD algorithms, with high probability, the leverage score approximations satisfy $|\ell_i - \tilde{\ell}_i| < \varepsilon$ for all $i$, provided $p = O(\operatorname{poly}(k,\kappa,1/\varepsilon)\log(mn))$ samples and proper choice of internal parameters [2111.08915].
- **Algorithmic Optimality**: The quantum runtime dependencies on $\sqrt{\min(n,d)/r}$ and $\alpha/\sigma_r$ are essentially tight, based on oracle-based lower bound reductions to Grover search [2301.06107].

A plausible implication is that further acceleration beyond these limits would require new algorithmic frameworks or stronger matrix or access assumptions.

---

Quantum leverage score sampling enables efficient sampling and regression for large-scale matrices, achieving quadratic or exponential acceleration over classical techniques given block-encoded access to $A$. The underlying primitives—block-encoding, QSVT, and amplitude amplification—are provably optimal up to polylogarithmic factors. These advances also inform classical "dequantized" methods under enhanced data models, illustrating the broader impact of quantum-inspired linear algebra in numerical and data-driven applications [2301.06107], [2111.08915].

Source: https://www.emergentmind.com/topics/quantum-leverage-score-sampling