---
title: Matrix-Aware Shot Allocation
url: https://www.emergentmind.com/topics/matrix-aware-shot-allocation
type: topic
---

# Matrix-Aware Shot Allocation

Matrix-aware shot allocation denotes a shot-budgeting strategy in which measurement resources are distributed according to the role that matrix entries play in a downstream learning objective, rather than according only to per-entry uncertainty or uniformly across observables. In the quantum-kernel setting, this notion is made explicit by AQKA, which treats the estimation of an \(N\times N\) kernel as a matrix estimation problem under a fixed shot budget and allocates shots to pairs \((i,j)\) according to both classifier sensitivity and Bernoulli measurement variance [2605.14672]. By contrast, not every nonuniform or structure-aware measurement strategy is matrix-aware in this sense: in ADAPT-VQE, shot reduction via Pauli-measurement reuse and variance-based allocation is organized around Pauli-string overlap, commuting groups, and empirical clique variances, not around a covariance matrix, Hessian, Fisher information, or any other dense matrix structure [2507.16879].

## 1. Definition and conceptual scope

The central question of matrix-aware shot allocation is how to distribute a finite shot budget so that the downstream estimator or predictor changes as little as possible. In AQKA, the problem is posed for quantum kernel learning: if the full kernel \(K\) cannot be measured exactly, one seeks shot counts \(\{s_{ij}\}\) that minimize the expected downstream loss induced by the kernel estimator \(\hat K\) subject to \(\sum_{i\le j} s_{ij}\le B\) [2605.14672].

This framing differs from methods that decide only which entries or observables to measure and then allocate shots uniformly within the selected subset. AQKA is described as closing that gap by making allocation not merely uncertainty-aware but also task-aware and matrix-aware. The operative distinction is that importance is assigned at the level of matrix entries through their contribution to the downstream matrix-based predictor. A noisy entry that is irrelevant to the classifier need not receive many shots, whereas an entry with moderate intrinsic measurement noise can receive many shots if it strongly affects the learned model [2605.14672].

A recurring source of confusion is the broader use of “adaptive” or “structure-aware” terminology. The ADAPT-VQE work demonstrates that substantial shot savings can be obtained by exploiting commuting structure, Pauli-string overlap, and empirical variances of grouped observables, while still not being matrix-aware in the linear-algebraic sense. This suggests that “matrix-aware shot allocation” should be reserved for methods whose objective and allocation weights are defined through matrix sensitivity, rather than any procedure that is merely nonuniform or adaptive [2507.16879].

## 2. Formalization in shot-budgeted quantum kernel learning

In AQKA, the fidelity kernel entry is modeled as
\[
K_{ij} = |\langle \phi(x_j)\mid \phi(x_i)\rangle|^2 \in [0,1],
\]
and is estimated from inversion-test shots by
\[
\hat K_{ij}=\frac{1}{s_{ij}}\sum_{t=1}^{s_{ij}} b_{ij}^{(t)}, \qquad b_{ij}^{(t)}\sim \mathrm{Bernoulli}(K_{ij}).
\]
Accordingly,
\[
\mathbb{E}[\hat K_{ij}] = K_{ij},\qquad \mathrm{Var}(\hat K_{ij}) = \frac{K_{ij}(1-K_{ij})}{s_{ij}}.
\]
The budgeted allocation problem is then
\[
\min_{\{s_{ij}\}}\ \mathbb{E}[\mathcal{L}(\hat K)] \quad \text{s.t.}\quad \sum_{i\le j} s_{ij}\le B,
\]
where \(\mathcal{L}\) is the downstream learning objective induced by \(\hat K\) [2605.14672].

For KRR with ridge \(\lambda\),
\[
\alpha = (K+\lambda I)^{-1}y, \qquad \mathcal{L}_{\mathrm{tr}}(K)=\|y-K\alpha\|^2=\lambda^2\|\alpha\|^2.
\]
The key approximation is a delta-method expansion,
\[
\mathrm{Var}[\mathcal{L}(\hat K)] \approx \sum_p g_p^2\,\frac{K_p(1-K_p)}{s_p},
\]
where \(p=(i,j)\) indexes upper-triangular pairs and \(g_p=\partial \mathcal{L}/\partial K_p\). Under this approximation, shot allocation becomes a convex minimum-variance problem under a total budget [2605.14672].

The matrix-aware aspect enters through the gradient term \(g_p\). The allocation is not based only on \(\mathrm{Var}(\hat K_{ij})\); it is based on how perturbations of \(K_{ij}\) propagate through the downstream objective. In KRR this propagation occurs through \((K+\lambda I)^{-1}\), and the paper notes that sensitivity is often spread over a strip of the matrix rather than confined to a small support set. In SVM, the sensitivity is more sharply localized on support-vector pairs [2605.14672].

## 3. Closed-form allocation rule and sensitivity structure

The KKT-optimal pairwise allocation in AQKA has the closed form
\[
s_p^\star = \frac{B}{Z}\sqrt{a_p}
\quad\Longleftrightarrow\quad
s_p^\star \propto |g_p|\sqrt{K_p(1-K_p)},
\]
with
\[
a_p = g_p^2K_p(1-K_p),\qquad Z=\sum_p \sqrt{a_p}.
\]
This rule gives more shots to a pair when the corresponding kernel entry is intrinsically noisy through \(\sqrt{K_{ij}(1-K_{ij})}\) and when the downstream learner is sensitive to that entry through \(|g_{ij}|\) [2605.14672].

For KRR, Lemma 1 gives
\[
g_{ij}=-2\lambda^2(\beta_i\alpha_j+\beta_j\alpha_i),\qquad i\ne j,
\]
where
\[
\alpha=(K+\lambda I)^{-1}y,\qquad \beta=(K+\lambda I)^{-1}\alpha.
\]
Substituting into the KKT rule yields
\[
s_{ij}^\star \propto |\beta_i\alpha_j+\beta_j\alpha_i|\sqrt{K_{ij}(1-K_{ij})}.
\]
The paper also uses the squared-gradient proxy
\[
\tilde h_{ij} = (\beta_i\alpha_j+\beta_j\alpha_i)^2 = \frac{g_{ij}^2}{4\lambda^4},
\]
as the deployable sensitivity weight [2605.14672].

For SVM, the envelope theorem gives
\[
\frac{\partial f^*}{\partial K_{ij}} = -y_i y_j \eta_i^*\eta_j^*,
\]
which leads to the AQKA score
\[
s_{ij}^\star \propto |\eta_i^*\eta_j^*|\sqrt{K_{ij}(1-K_{ij})}.
\]
The conceptual point is that the scoring function combines classifier sensitivity and measurement uncertainty:
\[
\text{importance} = \text{classifier sensitivity} \times \text{measurement uncertainty}.
\]
That combination is the defining matrix-aware feature of AQKA [2605.14672].

Uniform allocation instead sets
\[
s_{ij} = B/M,\qquad M=\binom{N}{2}+N,
\]
and ignores heterogeneity in the weights \(a_{ij}\). The variance ratio between the optimal and uniform allocations is
\[
\rho = \frac{\mathrm{Var}_\star}{\mathrm{Var}_{\mathrm{unif}}}
= \frac{Z^2}{M\sum_p a_p}\le 1,
\]
so the gain over uniform is largest when sensitivity scores are uneven [2605.14672].

## 4. Active acquisition, stability, and regime decomposition

AQKA is not presented only as a closed-form allocator; it is a round-based active acquisition scheme. Its algorithmic structure comprises a warm-up phase, iterative rounds, and target-fill allocation. In warm-up, a small fraction \(\eta_w B\) of the budget is spent uniformly at random to seed an initial estimate \(\hat K\). In later rounds, \(\hat K\) is projected onto the PSD cone if needed, KRR or SVM is trained on \(\hat K\), sensitivities \(\hat g_{ij}\) or their proxy are computed, and target counts are formed from
\[
s_{ij}^\star \propto |\hat g_{ij}|\sqrt{\hat K_{ij}(1-\hat K_{ij})}.
\]
Allocation then uses deterministic target-fill,
\[
\Delta s_{ij} = \max(0, s_{ij}^\star - s_{ij}),
\]
with a small exploration fraction \(\eta_e\) reserved uniformly [2605.14672].

The target-fill step is motivated by matrix-inverse stability. The paper argues that naive multinomial sampling from the same score can underperform because many moderately important pairs may remain at zero shots, which is undesirable when learning depends on inversion of a noisy kernel matrix. This motivates the use of exploration and deterministic filling rather than pure concentration [2605.14672].

The theoretical discussion makes the same point from another angle. Although the first-order optimum gives
\[
\mathrm{Var}_\star = \frac{Z^2}{B},
\]
the higher-order Taylor remainder obeys
\[
\mathbb{E}|R(\hat K)| \le \frac{C}{\lambda^4}\left(\sum_p \frac{1}{s_p}\right)^2.
\]
A plausible implication is that aggressive concentration on a small subset of entries can be counterproductive when it leaves too many entries nearly unmeasured, because this increases the remainder and can destabilize the inverse appearing in KRR [2605.14672].

AQKA also introduces a regime decomposition. It is strongest when the budget is limited, roughly \(B \lesssim 16\,n_{\mathrm{pairs}}\), when sensitivities are heterogeneous, and when KRR exhibits sparse or semi-sparse downstream structure. Nyström-QKE is described as better when the budget is large enough that many entries can be resolved well and the kernel has strong low-rank structure. ShoFaR is described as competitive only at extreme low budgets. The paper’s regime map is therefore: extreme low budget, ShoFaR can be competitive; budget-limited but not tiny, AQKA is best; high budget or saturating regimes, Nyström-QKE may dominate on low-rank planted structure [2605.14672].

## 5. Corrected sparsity rates and the meaning of matrix sensitivity

A major theoretical contribution of AQKA is the corrected sparsity-aware rate for KRR. If the KRR coefficients \(\alpha\) are supported on a set \(S\) of size \(m\), then the nonzero region of \(g_{ij}\) is not only the \(S\times S\) block. Instead it lies on the strip
\[
\mathcal{P}_S=\{(i,j): i\in S \text{ or } j\in S\},
\]
whose size is about \(m(2N-m+1)/2\). This yields
\[
\rho \le \frac{|\mathcal{P}_S|}{M}\approx \frac{2m}{N+1}.
\]
The paper emphasizes that the naive \(m^2/N^2\) guess is wrong because even when \(\alpha\) is sparse, \(\beta=(K+\lambda I)^{-1}\alpha\) is generically dense, so any pair touching the active support can matter [2605.14672].

For SVM, the support is cleaner and the ceiling is tighter:
\[
\rho^{\mathrm{SVM}} \lesssim \frac{m_{\mathrm{sv}}^2}{N^2}.
\]
This contrast clarifies the phrase “matrix-aware.” In KRR the sensitivity propagates through the inverse matrix and is therefore distributed across a broader strip-like pattern. In SVM it is more localized on support-vector pairs. In both cases, the allocation depends on downstream matrix sensitivity rather than solely on the entrywise Bernoulli variance [2605.14672].

The plug-in regret result makes this dependence operational when \(K\) is unknown. With warm-up estimate \(\hat K_w^{\mathrm{PSD}}\), the bound
\[
\mathrm{Var}(s^{\mathrm{plug}}) \le \mathrm{Var}_\star\left(1+\frac{C_K\Delta_w}{\lambda^3\sqrt{a_{\min}}}\right),
\]
where \(\Delta_w=\|\hat K_w^{\mathrm{PSD}}-K\|_{\mathrm{op}}\), shows that better warm-up improves allocation quality, small \(\lambda\) makes the problem harder, and PSD projection stabilizes the warm-start estimate [2605.14672].

## 6. Distinction from structure-aware shot allocation in ADAPT-VQE

The ADAPT-VQE paper is directly relevant because it addresses shot efficiency, but it explicitly does not propose a matrix-aware method in the usual sense. Its two integrated strategies are reuse of Pauli measurement outcomes across ADAPT iterations and variance-based shot allocation for both Hamiltonian and operator-gradient measurements [2507.16879].

In ADAPT-VQE, the ansatz is built iteratively, and each ADAPT iteration requires two costly measurement tasks: VQE parameter optimization for the current ansatz and operator selection through gradients for every candidate operator in the pool. The gradient for operator selection is
\[
\left. \frac{\partial E^{(n)}}{\partial \theta_k} \right|_{\theta_k = 0}
=
\left\langle \psi^{(n-1)} \left| [\hat H, \hat A_k] \right| \psi^{(n-1)} \right\rangle.
\]
The overhead arises from both Hamiltonian term measurements during VQE optimization and gradient measurements of \([\hat H,\hat A_k]\) for operator selection [2507.16879].

The measurement-reuse mechanism exploits the fact that during ADAPT iteration \(n\), VQE optimization measures the Hamiltonian on \(\vert \psi^{(n)}\rangle\), and in iteration \(n+1\) the gradients are measured on the same state,
\[
\vert \psi^{((n+1)-1)}\rangle = \vert \psi^{(n)}\rangle.
\]
Reuse is permitted when the Hamiltonian Pauli strings and the commutator terms share the same state preparation and a common measurement basis or eigenbasis after basis rotation. The paper explicitly states that measurements are kept in the computational basis and that only matching Pauli strings between the Hamiltonian and the commutator decomposition are reused. If
\[
[\hat H,\hat A_k] = \left[\sum_j c_j \hat P_j,\hat A_k\right] = \sum_j c_j[\hat P_j,\hat A_k] = \sum_j c_{jk} C_{jk},
\]
then any \(C_{jk}\) already measured in the VQE Hamiltonian step and compatible with the gradient clique can be reused [2507.16879].

Its variance-based shot allocation is also group-based rather than matrix-based. Observables are partitioned into \(m\) commuting groups, and if clique \(i\) is measured with \(N_i\) shots, then
\[
\bar E = \sum_{i=1}^m \bar E_i, \qquad \bar E_i = \frac{1}{N_i}\sum_{s=1}^{N_i} e_i^s.
\]
Uniform allocation uses
\[
N_i = \frac{N}{m}.
\]
VMSA solves the standard variance-minimization problem
\[
\min \left\{ \frac{\sigma_i(\vec\theta)^2}{N_i} \right\}, \qquad \sum_{i=1}^{m} N_i = N,
\]
and after a pilot budget \(N_0\) assigns
\[
N_i = N_0 + \frac{\sigma_i(\vec\theta)}{\sum_{j=1}^m \sigma_j(\vec\theta)}\left(N - N_0 m\right).
\]
VPSR instead minimizes total shots under a variance threshold,
\[
\min_{\{N_i\}} \left\{\sum_{i=1}^m N_i\right\}, \qquad \sum_{i=1}^m \frac{\sigma_i(\vec\theta)^2}{N_i} \le \delta,
\]
with
\[
N_i = N_0 + \eta \frac{\sigma_i(\vec\theta)}{\sum_{j=1}^m \sigma_j(\vec\theta)}\left(N - N_0 m\right),
\]
and
\[
\eta = \frac{\sum_{i=1}^m \sigma_i(\vec\theta)^2}{m \sum_{j=1}^m \sigma_j(\vec\theta)^2} \le 1.
\]
The paper groups Pauli strings into commuting cliques using qubit-wise commutativity, notes that the scheme is compatible with other grouping methods, and performs allocation at the clique level rather than per single Pauli term [2507.16879].

| Method | Allocation unit | Basis of adaptation |
|---|---|---|
| AQKA | Kernel pairs \((i,j)\) | \(|g_{ij}|\sqrt{K_{ij}(1-K_{ij})}\) |
| ADAPT-VQE reuse | Matching Pauli strings | State-preparation and basis overlap |
| ADAPT-VQE VMSA/VPSR | Commuting cliques | Empirical clique variances |

The contrast is therefore precise. AQKA is matrix-aware because it distributes shots according to downstream matrix sensitivity. The ADAPT-VQE method is structure-aware, clique-aware, and reuse-aware because it distributes shots according to commuting-group structure, empirical variances of those groups, and overlap between Hamiltonian and gradient Pauli strings. It is not matrix-structured in the sense of using a covariance matrix or dense measurement matrix [2507.16879].

## 7. Empirical results, limitations, and interpretive boundaries

AQKA reports strong empirical gains in the budget-limited regime. On synthetic planted-sparse KRR, it outperforms uniform by about \(+8\) to \(+25\) points as \(N\) grows from \(225\) to \(1000\). On a kernel measured on \texttt{ibm\_pittsburgh}, it gives about \(+26\) points at \(B=n_{\mathrm{pairs}}\) and about \(+32\) points at \(B=4n_{\mathrm{pairs}}\). It also reports the first multi-seed live hardware adaptive allocation experiments: on \texttt{ibm\_aachen} at \(N=20\), AQKA gains about \(+17.0\pm 4.8\) points, and on \texttt{ibm\_berlin} at \(N=30\), the advantage persists at higher budget [2605.14672].

The same paper is explicit about failure modes and scope conditions. On dense-\(\alpha\) real data, AQKA is only competitive rather than universally dominant. On an ad-hoc quantum-labeled dataset where the classifier kernel misses the relevant unitary structure, no allocation method helps much. For SVM in small-\(N\), noisy-warm-up regimes, plug-in support estimation can be unstable and AQKA can underperform uniform. These observations delimit the applicability of sensitivity-based matrix-aware allocation rather than undermining its formulation [2605.14672].

The ADAPT-VQE work reports a different empirical profile because its target is not kernel learning but variational eigensolving. The reuse protocol is tested on H\(_2\) (4 qubits), H\(_3\) (6 qubits), H\(_4\) (8 qubits), H\(_5\) (10 qubits), LiH (12 qubits), BeH\(_2\) (14 qubits), and N\(_2\)H\(_4\) with 8 active electrons and 8 active orbitals (16 qubits), across the Fermionic Pool, Qubit Pool, Qubit-Excitation Pool, and CEO Pool. The reported averages are 38.59% of naive full-measurement shots for measurement grouping only and 32.29% for grouping plus reuse, corresponding to an additional reduction of about 6.3% relative to grouping alone. Variance-based shot allocation is tested on H\(_2\) and LiH with approximated Hamiltonians and QWC grouping, using 5 cliques and total budget \(N=5120\) for H\(_2\), and 9 cliques and total budget \(N=9216\) for LiH. Relative to uniform allocation, the reported shot reductions are 6.71% for VMSA and 43.21% for VPSR on H\(_2\), and 5.77% for VMSA and 51.23% for VPSR on LiH. The paper states that both methods preserve chemical accuracy and that LiH requires more iterations but still converges successfully [2507.16879].

Taken together, these results support a narrow but important taxonomy. Matrix-aware shot allocation, as instantiated by AQKA, is a task-aware allocation rule over matrix entries driven by downstream sensitivity and measurement uncertainty. Structure-aware shot optimization, as instantiated by the ADAPT-VQE work, can also reduce shots substantially, but it does so through commuting structure, observable grouping, empirical variances, and term overlap rather than through matrix-valued sensitivity. A plausible implication is that the phrase “matrix-aware shot allocation” is most precise when the optimization target is itself a matrix-based learning problem whose sensitivity structure governs measurement budgeting [2605.14672].

Source: https://www.emergentmind.com/topics/matrix-aware-shot-allocation