arXiv:2610.26472cs.DCOct 2026

Manuscript Offprint

arXiv:2610.26472

KrMM Recurrences: HPC-Enhanced Estimators for Nonlinear Classical Shadows

Matthias Gruber, Sabrina Herbst, Ivona Brandic, Vincenzo De Maio

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Matthias Gruber* †^{\dagger}, Sabrina Herbst* †^{\dagger}, Ivona Brandic*, Vincenzo De Maio †∗^{\dagger*}

*Research Unit of Computational Sustainability

TU Wien, Vienna, Austria

†School of Computing and Mathematical Sciences

University of Leicester, Leicester, United Kingdom

Abstract—While quantum technologies are rapidly evolving, near-term applications heavily rely on hybrid quantum-classical paradigms. Among these, the classical shadows framework has gained a lot of traction, not only for quantum information science, but also for the development and verification of quantum hardware. It allows to efficiently classically estimate many properties of quantum states from randomized measurements alone, a task that is otherwise intractable due to the destructive nature of measurements in quantum systems. There are, however, many properties of interest that are, due to their very problem formulation, not efficiently estimable. In this work, we identify a computational kernel occurring in estimators of polynomial functions, a class of problems that are in general computationally difficult to solve. We show that this structure allows a row-wise partition that, together with a custom SIMD vectorization, enables massive parallelization and can reduce the computational cost significantly. We show applicability and scalability of the approach on different tasks, and our results showcase that the approach allows high sequential throughput and close-to-ideal parallel scaling. The work thus provides a new way of identifying and exploiting structure in classical shadow estimators, resulting in practical advantages on inherently difficult problems.

Index Terms—hybrid quantum-classical computing, classical shadows, randomized measurements

I. INTRODUCTION

Hybrid quantum-classical paradigms have emerged as an important means to harness and improve the capabilities of current quantum hardware. An important application is the classical shadows formalism [1], which allows deriving properties of quantum states based on randomized measurements alone, otherwise difficult due to the very nature of destructive measurements. The protocol enables efficient unbiased estimation of many linear properties, such as expectation values of local observables, fidelity estimation of any state against a pure state, as well as entanglement verification for pure states.

Nonlinear properties, such as the purity, can be estimated, however, the resulting estimator may become computationally expensive. In particular, polynomial quantities are estimated using the U-statistic formalism [1], i.e., we can estimate Tr(ρk)\mathrm{Tr}(\rho^{k}) by averaging over all size-k subsets of the N measurements. This results in a computational complexity of O(Nk)\mathcal{O}(N^{k}), rendering the evaluation of higher-order moments increasingly expensive. Further, many interesting properties, such as the purity [2], have an exponential sample complexity N in the number of qubits n, making the overall estimation procedure inefficient. Nonetheless, such estimators are of practical interest, e.g., for quantifying entanglement [2], thus motivating research for increased scalability.

Storing the (estimated) density matrix of a quantum state ρ\rho requires exponential-in-n memory, which can be avoided by utilizing the Kronecker structure imposed by classical shadows. While used extensively for linear properties, for higher-order terms the sheer amount of operations required becomes a major practical bottleneck [3].

To overcome the combinatorial explosion, batch shadows [4] were proposed, where the measurements are placed into distinct batches, and estimators are built by averaging over the snapshots of a batch. This yields an unbiased estimator with improved scalability, at the cost of storing the NBN_B batch shadows as 2n×2n2^n \times 2^n density matrices. Compared to the vanilla shadows, not all combinations are considered anymore, thus more measurements may be required for the same accuracy.

In this work, we identify a recurring computational kernel in polynomial estimators and formulate it as a chain of Kronecker-matrix-matrix (KrMM) recurrences. These recurrences require many small matrix products, allowing independent row-wise computations, with dependencies only between successive steps. This structure can be exploited for more efficient computation, e.g., through the recent FastKron algorithm [5], and a custom SIMD vectorization scheme. We implement our approach on estimators for mixed-state entanglement verification [2] and the Quantum Fisher Information estimation [6]–[8], as well as batch shadows.

In summary, our contributions are as follows: (1) we identify a computational kernel underlying classical shadows estimators of polynomial functions; (2) we show that this formulation decomposes into independent row-wise calculations; and (3) we leverage this structure to massively parallelize the calculations, achieving near-ideal parallel scaling, and high throughput. Using state-of-the-art methods of parallel computing, we thus obtain a massive practical speed-up for a problem of increasing interest, that has not been parallelized on this scale so-far. Fig. 1 illustrates our approach.

The paper is structured as follows. Sec. II provides background information and Sec. III discusses related work. Sec. IV introduces the KrMM recurrence and execution model. Sec. V discusses our applications and Sec. VI the experimental setup. Finally, we present our results in Sec. VII, discuss limitations in Sec. VIII and conclude the paper in Sec. IX.

†^{\dagger}These authors contributed equally to this work. Corresponding authors: {matthias.gruber,sabrina.herbst}@tuwien.ac.at

Figure

Fig. 1: Our contribution. Polynomial classical shadows estimators, including online and batched [4] estimators for mixed-state entanglement verification and the Quantum Fisher Information, (see Sec. V), share a common representation, the KrMM recurrence, which induces a row-wise splitting by the Kronecker structure of FtF_t. This allows defining a computational kernel KiK_i, that iteratively computes the row estimators independently of each other, as each computation only depends on the previous timestep, making the computation highly parallelizable. Each worker locally aggregates the results, and communication is only required for the final aggregation and reduction. This results in high-throughput and near-ideal parallel scaling.

References (39)