On the connection between least squares, regularization, and classical shadows

Zhihui Zhu, Joseph M. Lukens, Brian T. Kirby

TL;DR

This paper bridges the gap between the "disruptive" quantum technique of Classical Shadows (CS) and traditional statistical methods like Least Squares (LS) and Regularized Least Squares (RLS). By framing all three as different ways to calculate "shadow" estimators, the authors reveal that CS is essentially a computationally efficient regularizer that trades higher variance for zero bias and extreme scalability.

What Problem Does This Paper Address?

Characterizing a quantum state—knowing exactly what "shape" it takes—usually requires Quantum State Tomography (QST). However, QST is a nightmare for large systems because the number of measurements needed scales exponentially with the number of qubits.

Classical Shadows (CS) emerged as a hero in this space, allowing researchers to estimate many properties of a state using very few measurements. While CS has been wildly successful, its relationship to classical data analysis tools like Least Squares was somewhat murky. This paper asks: Is CS just a fancy version of the regression tools we already use in machine learning? And if so, when should we prefer one over the other?

Methods

The authors provide a unifying mathematical framework where LS, RLS, and CS are all expressed as an average of individual "shadows"—point estimators derived from single measurement outcomes.

  • Least Squares (LS) Shadows: These use the pseudoinverse of the measurement operator. The authors show that in the "underdetermined" regime (where you have fewer measurements than parameters), LS suffers from a "double descent" phenomenon, where error spikes before it gets better.
  • Regularized Least Squares (RLS) Shadows: This adds a penalty term ($\ell_2$ regularization) to stabilize the LS solution. It prevents the error spikes but introduces "bias"—the estimate is systematically pulled toward zero.
  • Classical Shadows (CS): Instead of inverting the actual measurement matrix, CS inverts a "fictitious" quantum channel that represents the expected distribution of measurements.

The researchers tested these methods using numerical simulations of a 5-qubit system ($D=32$ dimensions) to compare their performance across different measurement regimes.

Datasets

The paper does not use external real-world datasets. Instead, it relies on synthetic data generated via numerical simulations:

  • System: A 5-qubit quantum state.
  • Measurements: Rank-1 POVMs (Positive Operator-Valued Measures) generated using Haar-random unitaries.
  • Observables: Three specific rank-1 observables designed to test different ground truth values (1, 0.5, and 0).
  • Distribution Shifts: A mixture distribution was used to simulate "mismatched" measurements, where the actual measurement basis differs from what the algorithm expects.

Key Insights and Ideas

  • CS as a Regularizer: The most profound "aha" moment is that CS can be viewed as a regularizer for the underdetermined regime. It replaces the unstable pseudoinverse of LS with a well-conditioned, invertible "quantum channel" inverse.
  • The Bias-Variance Tradeoff: RLS and CS sit on opposite ends of a spectrum. RLS achieves much lower variance (the estimates are consistent) but is biased. CS is strictly unbiased (it hits the target on average) but has much higher variance when measurements are scarce.
  • Robustness vs. Efficiency: RLS is "distribution independent"—it only cares about the measurements you actually did. CS is "distribution dependent"—it relies on knowing the probability distribution from which measurements were sampled. If your experimental hardware has a "drift" or mismatch, CS performance tanks, while RLS remains stable.
  • The "Double Descent" in Quantum: The authors observed that LS estimation error doesn't just go down as you add measurements; it peaks sharply when the number of measurements roughly equals the system dimension ($M \approx D$) before falling again.

Key Results

  • Scalability: CS is the clear winner for large systems. Because it uses an analytical inverse, it requires zero matrix inversions. While LS/RLS are limited to roughly 14 qubits by current classical computing power, CS has been demonstrated on up to 120 qubits.
  • Likelihood Paradox: Interestingly, while RLS is often "closer" to the ground truth in terms of error (Frobenius norm), CS estimators often yield higher likelihood values. This is because CS shadows are constructed directly from projectors of measured outcomes, making them "look" more like the data they came from.
  • Multishot Sensitivity: RLS is highly sensitive to the number of "shots" per measurement setting. Increasing shots ($L$) can actually hurt RLS in some regimes due to its inherent bias, whereas CS scales predictably and favorably with any combination of measurement settings and shots.

Limitations and Future Work

  • Double Descent Theory: While the authors observed the "double descent" in LS shadows, a formal theoretical proof of this phenomenon in the specific context of quantum state estimation is left for future work.
  • Scope of POVMs: The study focused primarily on rank-1 orthonormal POVMs. Extending this "shadow" comparison to more complex measurement setups (like those involving noise or specific hardware constraints) would be a valuable next step.
  • Physical Constraints: The estimators used here don't strictly enforce "physicality" (e.g., ensuring the density matrix is positive semi-definite). Exploring how these connections hold when adding physical constraints (like Maximum Likelihood Estimation) is a suggested path forward.

Summary updated

BibTeX
@article{zhu2024connection,
  author = {Zhihui Zhu and Joseph M. Lukens and Brian T. Kirby},
  title = {{On the connection between least squares, regularization, and classical shadows}},
  journal = {Quantum},
  year = {2024},
  doi = {10.22331/q-2024-08-29-1455},
}
Figure