Pith. sign in

REVIEW 4 major objections 6 minor 19 references

Depth-Based Matrix Classification for the HHL Quantum Algorithm

T0 review · 4 major / 6 minor · reviewed 2026-08-07 · deepseek-v4-flash

Pith's one-line read A machine-learning classifier can look at the matrix of a linear system and predict whether the HHL quantum algorithm will stay within a chosen circuit-depth budget, without computing the condition number.

desk verdict A sound proof-of-concept pipeline, but the iris experiment undercuts the paper's own claim: balanced accuracy is near chance for every classifier that lacks the condition number. read the letter →

arxiv 2505.22454 v1 pith:XROAKLWW submitted 2025-05-28 quant-ph cs.LG

classification quant-phcs.LG PACS 03.67.Ac
keywords HHLalgorithmquantumcircuitdepthmatrixclassificationconditionnumbermulti-layerperceptronmachinelearninglinearsystemsofequationstrainingdistribution
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

The paper asks whether a machine-learning classifier can look at a matrix and predict, before building any circuit, whether the HHL quantum algorithm will solve the linear system within a chosen circuit-depth budget. It shows that with a depth threshold, matrices can indeed be labeled as suitable or non-suitable, and a multi-layer perceptron trained on extracted matrix features reaches high accuracy when condition-number information is provided. When only raw matrix entries are used, accuracy drops to about 64 percent, but the classifier still correctly flags 84 percent of non-suitable systems. The authors also show that training on data whose distribution matches the target problem, as they demonstrate on the iris classification problem, substantially improves predictions. The point of the exercise is to give practitioners a cheap pre-screening tool that avoids calculating the condition number, which is as hard as solving the system itself.

What carries the argument

The central object is the depth oracle: the HHL circuit as constructed by the paper's chosen linear-solver implementation, recursively decomposed until its measured depth stabilizes, giving the ground-truth label for each matrix. Around this oracle, the paper builds a binary classifier pipeline: 104 matrix features organized into structural, value, diagonal, and condition-number categories, fed into a five-layer ReLU multi-layer perceptron trained with stochastic gradient descent. The condition number, or a Gershgorin- or Cassini-estimated surrogate, acts as the strongest predictor because the circuit depth grows in steps whenever the eigenvalue ratio crosses a power of two. The second critical piece is the training distribution: the paper shows that matching the κ and sparsity distribution of the target problem, as it does for the iris matrices, is what makes the raw-data and feature classifiers transfer.

What would settle it

If a second HHL construction—for instance one using a different eigenvalue-inversion method or a different phase-estimation schedule—produces a depth ordering of matrices that contradicts the first, then a classifier trained on the first oracle's labels would misclassify under the second. Concretely, one could take a sample of matrices where the two oracles disagree on suitability and check whether the classifier's predicted labels track one oracle rather than the other.

Watch

Extended reading notes

Core claim

On the paper's own terms, the central claim is that 'given a certain depth threshold, matrices representing the linear system of equations can be classified as suitable or non-suitable for HHL through machine learning.' The classification is learned from HHL circuit depths produced by a fixed quantum-linear-solver implementation, and the paper demonstrates that the depth behaves as a step function of the condition number, jumping when the eigenvalue ratio crosses powers of two. A multi-layer perceptron with five hidden layers, trained on 58,325 randomly generated Hermitian matrices of sizes up to 16 by 16, achieves 99.2 percent accuracy when the exact condition number is supplied as a feature, and 78.1 percent with only estimated condition numbers. With no condition-number information at all, accuracy falls to about 74.9 percent on engineered features and 64.3 percent on raw matrix entries; the raw-data model is conservative, labeling only 41 percent of suitable matrices as suitable while correctly rejecting 84 percent of unsuitable ones. On iris-derived matrices, the generically trained models fail, but retraining on an iris-like distribution recovers accuracy and F1 above 0.87, showing that training distribution is the critical factor.

Load-bearing premise

The paper assumes that the depth measured by one specific HHL implementation, using a particular exact-reciprocal eigenvalue-inversion circuit and a fixed decomposition process, is a reliable proxy for the practical cost of any HHL implementation on future error-corrected hardware.

Editorial extensions

If this is right

  • A practitioner can obtain a binary go/no-go signal for HHL without computing the condition number, by running the classifier on cheap matrix features or raw entries.
  • Models trained on generic random matrices transfer poorly to structured real-world matrices; a distribution-matched training set is required for reliable predictions.
  • When no condition-number information is available, the classifier errs toward rejecting HHL, so it will rarely over-promise quantum advantage.
  • Raw-matrix training plateaus in accuracy with more data, suggesting that for the current feature set, extracting engineered features is necessary to break past about 64 percent accuracy.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • Inference: the same pipeline could be retrained per depth threshold on future hardware, and the paper's two cutoff experiments suggest the optimal feature set shifts with the threshold, with sparsity mattering more at lower depth budgets.
  • Inference: because depth jumps at powers of two in the condition number, a simple classical pre-screen might match the ML classifier when κ is roughly known; the ML value lies in estimating κ cheaply from matrix statistics, a task that could be benchmarked against standard estimators.
  • Inference: the paper does not fold in the depth cost of preparing the state |b⟩, so a complete screening tool would need to add that cost for real problems.
  • Inference: a natural extension is to classify not just binary suitability but the depth band the matrix falls into, giving a finer-grained resource estimate for HHL.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

4 major / 6 minor

Summary. This paper asks whether a supervised ML model can label a matrix A as 'well suited' or 'poorly suited' for the HHL quantum linear-system algorithm, where the label is obtained by computing the full decomposed circuit depth in Qiskit and comparing it with a fixed depth cutoff. The authors generate 58,325 random Hermitian matrices, extract 104 hand-crafted features, train five-layer MLPs on four feature sets (exact condition number, estimated condition number, no condition information, and raw 4x4 entries), and report accuracy/F1/recall/specificity on generic test matrices and on 8,301 matrices drawn from the Iris classification problem. The exact-condition-number model is nearly perfect; feature-only and raw-data models degrade; re-training on an iris-like distribution raises accuracy and F1 on the Iris test set for the raw-data model, but with specificity near zero.

Significance. If the results were valid, the approach would offer a practical pre-screening tool for deciding when HHL is worth attempting on a given linear system, without computing the condition number. The paper's main useful observations are the step-function dependence of Qiskit HHL depth on condition number and the detailed feature taxonomy in the appendix. The manuscript is transparent about the label-generation procedure and gives enough detail to reproduce the data generation. However, the central empirical claim is currently over-stated: the Iris demonstration for the raw-data classifier operates at chance level once class imbalance is accounted for, and the distribution-matching retraining leaks test-set information. The contribution is best viewed as a scoped benchmarking or negative result unless the evaluation is corrected.

major comments (4)
  1. [V.B, Table V] The Iris results for the raw-data classifier do not demonstrate discrimination. For dataset 4 in Table V, recall is 0.960 and specificity is 0.043 on the iris test set, so balanced accuracy is (0.960+0.043)/2 = 0.502, equal to random guessing; on the validation set balanced accuracy is (0.960+0.072)/2 = 0.516. Accuracy (0.773) and F1 (0.871) are high only because roughly 80% of iris matrices are positive. The statement in Section V.B that 'the specificity is greater than zero, which means that the classifier did learn some way to determine poorly suited samples' is misleading: with about 20% negatives, a specificity of 0.043 corresponds to only about 70 true negatives among approximately 1660 negatives, which is consistent with a model that predicts positive almost always. This contradicts the claim of 'accurate classifications' for the Iris problem.
  2. [V.B] The retraining protocol in Section V.B uses the distribution of condition numbers measured on the iris test matrices to select the training samples ('iris-like matrix set') and then evaluates the retrained classifiers on those same iris matrices. This is a form of test-set leakage: the univariate distribution of a quantity strongly correlated with the labels is used to shape the training distribution, and the target evaluation is not independent of that design choice. The authors should either estimate the kappa histogram from a separate set of iris matrices or from domain knowledge about the problem family and reserve a disjoint set of iris matrices for final evaluation, or explicitly characterize the procedure as transductive and analyze it as such. As written, the improvement from Table IV to Table V is not a valid estimate of generalization.
  3. [IV, Tables II-III] All reported performance metrics in Tables II, III, IV, and V are point estimates from a single evaluation, with no confidence intervals, standard errors, or repeated runs. The learning-curve analysis in Fig. 6 uses five-fold cross-validation, but the headline tables do not. Given that the differences the authors rely on are often small (e.g., dataset 3 accuracy 0.749 vs. dataset 4 accuracy 0.643 in Table II; F1 0.693 vs. 0.517), these comparisons need error bars or a significance test to support the claim that progressive loss of condition-number information degrades classification. Without them, the relative ordering of datasets 2-4 is not established.
  4. [III.A, IV.A] The depth threshold f(A)=1,000,000 layers is chosen arbitrarily, and the alternative f(A)=500,000 changes results substantially (Tables II and III). The paper explicitly disclaims setting a practical depth criterion, but the central proposition in Section I.A is that matrices can be classified as suitable or non-suitable 'given a certain depth threshold.' As a proof of concept this is acceptable, but the main claim should be scoped to the chosen thresholds, and the sensitivity analysis should go beyond two cutoffs; without any relation to actual fault-tolerant hardware budgets, the practical significance of the 'suitable' label remains unclear.
minor comments (6)
  1. [V.B] The final paragraph of Section V.B states that the models' ability to identify well suited samples is improved significantly; this should be qualified by the chance-level balanced accuracy, and balanced accuracy should be reported as a headline metric alongside accuracy and F1.
  2. [General] The code and generated datasets are not provided; releasing them would substantially aid reproducibility, especially because the label-generation pipeline is a central contribution.
  3. [Fig. 1] The y-axis of Figure 1 is not described in the caption; since depths span orders of magnitude, a log-scale plot or explicit axis labels with units would improve readability.
  4. [Eq. (7)] The F1 formula is undefined when precision plus recall equals zero; the standard convention of setting F1 to zero in that case should be stated.
  5. [References] Reference [8] appears to be an unpublished manuscript; if it is a preprint, the arXiv identifier or repository should be provided.
  6. [III.A, Table I] Section III-A says matrices in sizes 2x2 to 16x16 are generated, but Table I and the learning curve restrict dataset 4 to 4x4 cases; the text should state explicitly that all raw-data results concern N=4 only.

Circularity Check

1 steps flagged · score 2.0 of 10

The generic training/evaluation pipeline is not circular, but the iris retraining in Section V.B is self-referential because the training set is constructed from the iris test set's condition-number distribution, and the reported iris test scores are presented as predictions despite this leakage.

  1. fitted input called prediction [Section V.B, Modified Classifiers on the Iris Dataset (Table V)]
    "Then, the distribution of κ in the iris matrices is measured by counting the number of iris matrices in each of five ”condition number bins” that evenly divide the interval from 1 to 1000. Finally, matrices are drawn from the original random training set in groups proportional to the number of samples in each κ bin. The resulting set of matrices, called the selected matrix set or iris-like matrix set, has a κ distribution matching the iris matrices."

    The iris test matrices' condition-number histogram is used to build the training distribution, and then the same iris matrices serve as the test set in Table V. Thus the reported iris accuracy and F1 are not an independent prediction: the model was deliberately trained on a distribution matched to the target distribution's κ, which is exactly the hard-to-compute quantity the paper argues the classifier should avoid. This construction, together with threshold selection, inflates positive-prediction metrics (dataset 4: recall 0.961, specificity 0.043) and explains the apparent improvement over the generically trained classifiers. The central random-matrix experiments are unaffected, but the iris demonstration is partly circular as an evaluation.

full rationale

The main training pipeline is not circular: suitability labels are produced by an external Qiskit HHL depth computation (Section III-A), not by the ML model, and the generic classifiers in Tables II-IV are evaluated on held-out matrices from the same random-generation distribution. No load-bearing self-citation or imported uniqueness theorem is involved. The one self-referential step is the iris retraining in Section V.B: the authors measure the κ distribution of the 8301 iris test matrices and construct an 'iris-like' training set with the same κ distribution, then report Table V as the iris result. This is not label-forced, since the depth labels still come from Qiskit, but it makes the iris test scores an in-distribution, target-adapted evaluation rather than an independent condition-number-free prediction. The paper's own Table V shows specificity near zero for the raw-data classifier (0.043 on iris and 0.072 on validation), so the claim that the classifier 'did learn some way to determine poorly suited samples' is essentially driven by the positive prior and the adapted training distribution. This does not invalidate the external-oracle random-matrix experiments, but the iris demonstration should not be read as a prediction from condition-number-free features alone.

Assumptions & free parameters 4 free parameters · 5 assumptions · 0 invented entities

The central claim depends on a series of hand-chosen thresholds (depth cutoff, κ cap, number of bins) and on the assumption that Qiskit's HHL depth is a representative cost measure. These choices shape the labels, so they are the most honest measure of what the paper contributes beyond the raw data.

free parameters (4)
  • Depth cutoff threshold = 1,000,000 layers
    Hand-chosen constant that defines the positive/negative labels; the paper states it is arbitrary and presumes future hardware has a constant depth limit. The alternative cutoff of 500,000 is also tested.
  • Condition number cap = 1000
    Matrices with κ > 1000 are discarded from the dataset, narrowing the classification problem to well-conditioned systems.
  • MLP hyperparameters = lr=0.01, momentum=0.9, layers 512/256/256/256/256, early stopping patience=15
    Selected by grid search and manual tuning; classifier performance depends on these choices.
  • Number of κ bins for iris-like matching = 5
    The iris training distribution is formed by sampling from random matrices in five condition-number bins proportional to the iris histogram; the bin count is a modeling choice.
assumptions (5)
  • standard math Gershgorin disk theorem and Cassini ovals theorem provide valid bounds on the eigenvalues of a matrix, used as features for condition-number estimation.
    Invoked in Section III-B and appendix D as the basis for estimated condition-number features.
  • domain assumption Future fault-tolerant quantum computers will have a constant maximum circuit depth, independent of problem size, for which a depth threshold is meaningful.
    Invoked in Section III-A to justify labeling matrices by a fixed depth cutoff.
  • domain assumption Qiskit's HHL implementation with exact reciprocal and repeated decomposition yields circuit depths that are representative of any practical HHL implementation.
    Invoked in Section III-A where the entire labeled dataset is built from Qiskit depth measurements.
  • domain assumption The |b⟩ state preparation contributes constant, negligible depth for all matrices of a given size, so it can be excluded from the classification.
    Stated in Section III: 'All linear systems of equations considered in this work use an efficiently implementable |b⟩' whose impact is consistent and negligible.
  • domain assumption Randomly generated Hermitian matrices with entries normalized by matrix norm and κ < 1000 are representative of matrices arising in practical HHL applications.
    Assumed in Section III-A when generating the 58,325 training matrices; later contradicted by the iris results, which motivates the distribution-matching retraining.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Depth-Based Matrix Classification for the HHL Quantum Algorithm." pith.science (2026). https://pith.science/paper/XROAKLWW

@misc{pith2026250522454,
  author       = {Pith},
  title        = {Pith review of: Depth-Based Matrix Classification for the HHL Quantum Algorithm},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/XROAKLWW}},
  note         = {Machine review of arXiv:2505.22454}
}
read the original abstract

Under the nearing error-corrected era of quantum computing, it is necessary to understand the suitability of certain post-NISQ algorithms for practical problems. One of the most promising, applicable and yet difficult to implement in practical terms is the Harrow, Hassidim and Lloyd (HHL) algorithm for linear systems of equations. An enormous number of problems can be expressed as linear systems of equations, from Machine Learning to fluid dynamics. However, in most cases, HHL will not be able to provide a practical, reasonable solution to these problems. This paper's goal inquires about whether problems can be labeled using Machine Learning classifiers as suitable or unsuitable for HHL implementation when some numerical information about the problem is known beforehand. This work demonstrates that training on significantly representative data distributions is critical to achieve good classifications of the problems based on the numerical properties of the matrix representing the system of equations. Accurate classification is possible through Multi-Layer Perceptrons, although with careful design of the training data distribution and classifier parameters.

Figures

Figures reproduced from arXiv: 2505.22454 by the authors.

Figure 1
Figure 1. Quantum Circuit Depth vs. Ideal Matrix Size [PITH_FULL_IMAGE:figures/full_fig_p002_1.png] view at source ↗
Figure 3
Figure 3. Quantum phase estimation (not inverse) circuit [PITH_FULL_IMAGE:figures/full_fig_p002_3.png] view at source ↗
Figure 4
Figure 4. Distribution of HHL circuit depths for 4 × 4 matrices. Each point represents a sample corresponding to one matrix in the dataset. Purple points have the highest depth, and light blue have the lowest. be to make this classification, but intends to find out if given a classification criteria based on depth, the ML model can learn if the matrix falls on one side or the other of this criteria. In addition, it should be … view at source ↗
Figures from the paper (3 more)
Figure 5
Figure 5. Figure 5: Average HHL circuit depth vs. random matrix size for [PITH_FULL_IMAGE:figures/full_fig_p005_5.png]
Figure 6
Figure 6. Figure 6: Learning curve with five-fold cross validation for the [PITH_FULL_IMAGE:figures/full_fig_p006_6.png]
Figure 7
Figure 7. Figure 7: Distribution of condition numbers in the set of random [PITH_FULL_IMAGE:figures/full_fig_p008_7.png]

Discussion (0). Sign in to comment.

Reference graph

Works this paper leans on

19 extracted references · 13 canonical work pages

  1. [1]

    Quantum Algorithm for Linear Systems of Equations,

    A. W. Harrow, A. Hassidim, and S. Lloyd, “Quantum Algorithm for Linear Systems of Equations,” Physical Review Letters, vol. 103, no. 15, Oct 2009

  2. [2]

    Quantum machine learning algorithms: Read the fine print,

    S. Aaronson, “Quantum machine learning algorithms: Read the fine print,” Nature Physics, p. 5, 2014

  3. [3]

    Qiskit: An Open-source Framework for Quantum Computing,

    IBM Quantum, “Qiskit: An Open-source Framework for Quantum Computing,” 2021. [Online]. Available: https://qiskit.org/

  4. [4]

    Approximate Quantum Array Mul- tiplier,

    A. Crimmins and S. Lopez Alarcon, “Approximate Quantum Array Mul- tiplier,” in 2024 IEEE International Conference on Quantum Computing and Engineering (QCE) , vol. 01, 2024, pp. 58–66

  5. [5]

    Approximate Quantum Circuit Synthesis using Block Encodings,

    D. Camps and R. Van Beeumen, “Approximate Quantum Circuit Synthesis using Block Encodings,” Physical Review A , vol. 102, no. 5, Nov 2020. [Online]. Available: http://dx.doi.org/10.1103/PhysRevA. 102.052411

  6. [6]

    Practical approximate quantum multipliers for NISQ devices,

    S. Sajadimanesh, J. P. L. Faye, and E. Atoofian, “Practical approximate quantum multipliers for NISQ devices,” in Proceedings of the 19th ACM International Conference on Computing Frontiers , ser. CF ’22. Association for Computing Machinery, pp. 121–130. [Online]. Available: https://dl.acm.org/doi/10.1145/3528416.3530244

  7. [7]

    R. A. Fisher, “Iris,” UCI Machine Learning Repository, 1936, DOI: https://doi.org/10.24432/C56C76

  8. [8]

    Accelerating the Training of Single Layer Binary Neural Networks using the HHL Quantum Algorithm,

    S. Lopez Alarcon, C. Merkel, A. Pozas-Kersjens, S. Ly, and M. Hoffna- gle, “Accelerating the Training of Single Layer Binary Neural Networks using the HHL Quantum Algorithm,” Oct 2022

Show all 19 references
  1. [9]

    Hybrid quantum linear equation algorithm and its experimental test on IBM Quantum Experience,

    Y . Lee, J. Joo, and S. Lee, “Hybrid quantum linear equation algorithm and its experimental test on IBM Quantum Experience,” Scientific Reports, vol. 9, no. 1, p. 4778, Mar. 2019. [Online]. Available: https://www.nature.com/articles/s41598-019-41324-9

  2. [10]

    Hybrid HHL with Dynamic Quantum Circuits on Real Hardware,

    R. Yalovetzky, P. Minssen, D. Herman, and M. Pistoia, “Hybrid HHL with Dynamic Quantum Circuits on Real Hardware,” Aug. 2023, arXiv:2110.15958 [quant-ph]. [Online]. Available: http://arxiv.org/abs/ 2110.15958

  3. [11]

    Quantum Circuit Design Methodology for Multiple Linear Regression,

    S. Dutta, A. Suau, S. Dutta, S. Roy, B. K. Behera, and P. K. Panigrahi, “Quantum Circuit Design Methodology for Multiple Linear Regression,” IET Quantum Communication , vol. 1, pp. 55–61(6), December 2020. [Online]. Available: https://digital-library.theiet.org/ content/journa...

  4. [12]

    Bayesian Deep Learning on a Quantum Computer,

    Z. Zhao, A. Pozas-Kerstjens, P. Rebentrost, and P. Wittek, “Bayesian Deep Learning on a Quantum Computer,” Quantum Machine Intelli- gence, vol. 1, pp. 41–51, 2019

  5. [13]

    Read the fine print,

    S. Aaronson, “Read the fine print,” Nature Physics , vol. 11, no. 4, pp. 291–293, Apr. 2015. [Online]. Available: https://doi.org/10.1038/ nphys3272

  6. [14]

    A New Data Mining Approach to Predicting Matrix Condition Numbers,

    S. Xu and J. Zhang, “A New Data Mining Approach to Predicting Matrix Condition Numbers,” Communications in Information & Systems , vol. 4, no. 4, pp. 325–340, Jan. 2004, publisher: International Press of Boston. [Online]. Available: https://projecteuclid.org/journals/ communic...

  7. [15]

    A comparison of two algorithms for predicting the condition number,

    D. Han and J. Zhang, “A comparison of two algorithms for predicting the condition number,” in Sixth International Conference on Machine Learning and Applications (ICMLA 2007) , Dec. 2007, pp. 223–228. [Online]. Available: https://ieeexplore.ieee.org/document/4457235

  8. [16]

    anedumla/quantum linear solvers,

    A. C. Vazquez, “anedumla/quantum linear solvers,” Feb. 2025, original- date: 2022-09-21T07:52:34Z. [Online]. Available: https://github.com/ anedumla/quantum linear solvers

  9. [17]

    textbook/notebooks/ch-applications/hhl tutorial.ipynb at main · Qiskit/textbook

    “textbook/notebooks/ch-applications/hhl tutorial.ipynb at main · Qiskit/textbook.” [Online]. Available: https://github.com/Qiskit/ textbook/blob/main/notebooks/ch-applications/hhl tutorial.ipynb

  10. [18]

    Bounds for the eigenvalues of a matrix,

    K. R. Garren, “Bounds for the eigenvalues of a matrix,” Tech. Rep. NASA-TN-D-4373, Mar. 1968, nTRS Author Affiliations: NASA Langley Research Center NTRS Document ID: 19680007865 NTRS Research Center: Legacy CDMS (CDMS). [Online]. Available: https://ntrs.nasa.gov/citations/19680007865

  11. [19]

    scikit-learn: machine learning in Python — scikit-learn 1.6.1 documentation

    “scikit-learn: machine learning in Python — scikit-learn 1.6.1 documentation.” [Online]. Available: https://scikit-learn.org/stable/

Pith tools

Reviewed August 7, 2026 · model on record in the stance chip above.