Quantum Linear Algebra
The quantum linear-systems problem asks for useful information about the solution of when the coefficient matrix and right-hand side are exposed through specified coherent interfaces. For an invertible matrix, its standard quantum output is the normalized state
not a classical list of the entries of . This distinction is decisive: a state can support selected observables, overlaps, samples, or a subsequent coherent computation, but reading all complex coordinates has an -scale description burden even before precision is counted.
The algorithms on this page range from the phase-estimation construction of Harrow, Hassidim, and Lloyd to variable-time, Fourier/Chebyshev, singular-value-transformation, and discrete-adiabatic methods. Every comparison keeps the task, matrix and state access, normalization, condition number, output metric, success event, and counted oracle explicit. A matrix written on paper is not an executable coherent interface. Consequently, logarithmic dependence on is conditional on supplied access, and an oracle-query theorem is neither an end-to-end runtime theorem nor, by itself, an advantage theorem.
Required background. Quantum Phase Estimation supplies coherent spectral labeling, finite precision, and powered-control cost. Hamiltonian Simulation Algorithms supplies access-normalized controlled evolution and the qualifications needed to translate queries into executable resources.
Helpful background. The Quantum Algorithms and Complexity guide supplies the ten-field claim discipline. Algorithmic Primitives supplies reusable composition and amplitude processing. Singular Value Decomposition supplies singular values and the Moore–Penrose pseudoinverse, while Conditioning and Stability supplies sensitivity, residual, and forward-error concepts.
The Quantum Linear-Systems Problem
Section titled “The Quantum Linear-Systems Problem”Begin with a finite-dimensional system
The data vector and the solution must be normalized separately:
Multiplying by a nonzero scalar does not change either quantum state, and the solution-state output does not reveal . A global phase is also unobservable. These facts make QLSP a state-preparation problem, not ordinary classical linear algebra with a different storage format.
If is not a power of two, use qubits and embed the system in a -dimensional register. The algorithm must protect the unused subspace—for example, by defining an invertible extension with a separated spectrum and ensuring that preparation has no support on the padding basis states. Merely appending zero rows and columns would make the extended matrix singular and change the problem promise.
Throughout this page, successful output means a pure state satisfying the phase-aligned Euclidean guarantee
conditional on a declared herald. A theorem must also give the heralding probability or adopt a stated constant-success convention and charge the amplification or repetition used to reach it. This metric is not interchangeable with a residual , an operator error, infidelity, observable error, or entrywise classical error. Any translation needs its own inequality and hypotheses.
For a singular or rectangular matrix, is not available. One must instead declare a singular-value cutoff, the input support, and whether the task prepares a truncated-pseudoinverse state or solves a specified least-squares problem. In particular, an inconsistent equation may not be silently redefined by projecting onto the column space.
The Ten-Field Quantum-Linear-Algebra Claim Record
Section titled “The Ten-Field Quantum-Linear-Algebra Claim Record”A complexity formula becomes meaningful only as one field in a complete record. For a representative nonsingular QLSP theorem, the record reads as follows.
- Problem family and size. Prepare a solution state for a family of systems, with address qubits and the access, sparsity, conditioning, and precision parameters named separately.
- Promise and instance. State whether is Hermitian, positive definite, square, or rectangular; give its spectral or singular-value interval, rank or cutoff, and the promised support of .
- Access and encoding. Supply executable matrix and right-hand-side interfaces, their normalizations and errors, plus every inverse and controlled use required by the procedure.
- Output and use. Return a normalized state proportional to or to a declared pseudoinverse action, and name the observable, overlap, sample, decision, or coherent downstream operation.
- Success and error. Give the phase-aligned Euclidean-state tolerance, heralding probability, allowed failure probability, confidence if measured, and the amplification or retry convention.
- Algorithmic idea. Identify spectral inversion, polynomial filtering, singular-value transformation, or adiabatic transport as the mechanism; superposition is not simultaneous classical readout.
- Executable procedure. Expand preparation, matrix calls, spectral or polynomial processing, inverses, controls, reflections, uncomputation, heralding, measurement, and stopping rule.
- Resource ledger. Keep matrix-oracle calls, calls, successful preparations, logical gates, depth, width, ancillas, memory, preprocessing, synthesis, samples, classical work, and wall-clock cost in distinct units.
- Classical comparator. Match matrix representation, right-hand-side access, preprocessing, conditioning, output, accuracy, success/confidence, memory, and included costs to a dated classical method.
- Evidence and limits. Label an upper bound, lower bound, matching theorem, finite algebra audit, resource estimate, or frontier result, and state which costs and regimes it does not establish.
The record prevents a common category error: an upper bound under supplied oracles does not prove that those oracles are cheap to construct, nor that the state output answers a classical vector-output question. It also prevents a finite two-dimensional check from being cited as scaling evidence.
Matrix, Right-Hand-Side, and Block-Encoding Access
Section titled “Matrix, Right-Hand-Side, and Block-Encoding Access”The right-hand side enters through a declared unitary
Whether and controlled are available must be stated. An already-prepared copy of is weaker than a repeatable unitary: it cannot automatically be inverted to implement a reflection or coherently embedded in amplitude amplification. A classical array, a QRAM data structure, an amplitude-preparation circuit, and sample/query access likewise represent different inputs. Their setup time, update rules, precision, memory, and reversibility can dominate the advertised query count.
A block encoding makes one matrix interface precise. An block encoding is a unitary on qubits such that and
The scaling , ancilla width , and block error are part of the input contract. So are calls to , controlled calls, and the reflection about the signal ancillas. A block query may expand into many sparse-oracle calls, selected unitaries, arithmetic operations, or memory lookups; the appropriate conversion theorem and its error must be charged.
Sparse access instead often supplies coherent position and value oracles. A row index and an integer label identify a possible nonzero position, and a second reversible operation writes a finite-precision entry. The model needs a sparsity bound, a convention for duplicates or padding, and access to rows and columns where the reduction requires both. A formula for or a promise that is sparse does not implement either oracle. Similarly, a sum of unitaries, controlled Hamiltonian evolution, and a projected-unitary encoding are not interchangeable names for access.
The Quantum Oracles page owns the general semantic audit for such interfaces. Here the obligation is operational: report the reversible data structure, finite precision, ancillas, normalization, controls, inverse calls, and conversion count used by the chosen linear solver. A query theorem may treat these operations as units, but an executable estimate must expand them.
Conditioning, Scaling, and Spectral Promises
Section titled “Conditioning, Scaling, and Spectral Promises”For an invertible matrix, the intrinsic spectral condition number is
This quantity describes sensitivity of the mathematical inverse in the spectral norm. An access model introduces additional scaling. Choose and declare an inverse normalization
and define the block condition number
For an exact invertible instance with tight inverse normalization, and therefore . Over-normalizing the same matrix can enlarge this access-induced parameter without changing or the normalized solution state. It should not be renamed an “effective condition number”: that phrase is also used for an instance- and tolerance-dependent spectral-truncation quantity.
The matching instance amplitude is
It can be much larger than its worst-case lower bound, and modern two-oracle results exploit that distinction. A theorem using a loose but proved must retain the same normalization in both and .
Representation error can be amplified by inversion. If , the resolvent identity gives the exact sensitivity shield
Thus block-encoding error, right-hand-side preparation error, reciprocal or polynomial approximation, Hamiltonian simulation, phase or gate synthesis, and final measurement need separate budgets. A small residual does not by itself imply a small forward error for an ill-conditioned system, and even a forward-vector bound needs normalization control before it implies the state metric used here. Conditioning and Stability develops those general numerical distinctions.
HHL as a Spectral Inversion Procedure
Section titled “HHL as a Spectral Inversion Procedure”The historical HHL construction is clearest for Hermitian , rescaled so that . In this specialization only, write
so the supported eigenvalues obey
Controlled Hamiltonian simulation and phase estimation coherently attach an estimate of to each eigencomponent. A reversible reciprocal step then controls a flag-qubit rotation. With a declared , its selected amplitude is , including the sign of a negative eigenvalue. Before uncomputation, the flag-one branch is proportional to
Uncomputing the eigenvalue register removes the spectral estimate from the ideal branch; measuring the flag heralds the solution state. The sequence is not “invert every eigenvalue in parallel” in the sense of returning them as a classical list. It implements a coherent, nonunitary spectral filter by embedding it in a larger unitary and conditioning on one outcome.
Finite phase estimation matters because the reciprocal is steep near the spectral gap. If , , and , then and
This elementary check connects eigenvalue precision to reciprocal error, but it is not a full output proof. Simulation, phase estimation, reversible arithmetic, rotation synthesis, uncomputation, postselection, and normalization must fit one state-error budget. Harrow, Hassidim, and Lloyd’s 2009 result established the paradigm under efficient sparse access and state preparation; its historical precision dependence should not be presented as the best modern bound.
Success Probability, Amplification, and Variable Time
Section titled “Success Probability, Amplification, and Variable Time”The ideal flag probability follows directly from the branch norm:
Choosing makes . With tight normalization this is . Plain repetition therefore uses complete state-preparation attempts in expectation. Coherent Amplitude Amplification can reduce the dependence to , but only if the full preparation and its inverse, the success test, and the needed reflections and controls are executable. A copy of a prepared input state does not supply that contract.
Worst-case analysis replaces the actual spectral support of by the smallest allowed singular value and can thereby obscure easy instances. Variable-time algorithms partition branches according to the precision or evolution time they require, stop well-resolved branches early, and amplify a procedure with multiple stopping times. Ambainis’s 2012 analysis improved the isolated historical dependence from to in its model. That statement neither supplies a modern precision-resolved end-to-end runtime nor makes early stopping, clocks, inverse operations, or state preparation free.
Success probability and approximation error answer different questions. One can have a highly accurate conditional branch that is almost never observed, or a constant-probability branch implementing a poor reciprocal. A complete solver fixes both, allocates an allowed failure probability, and says whether the reported cost is an average, a worst-case cap, or an expected number of attempts.
Polynomial, Fourier, and QSVT Linear Solvers
Section titled “Polynomial, Fourier, and QSVT Linear Solvers”Later methods replace a high-precision binary eigenvalue register by a direct approximation to the reciprocal on a promised spectral domain. Childs, Kothari, and Somma construct Fourier- and Chebyshev-based linear combinations in a sparse-access model, obtaining polylogarithmic rather than polynomial dependence on after the full success procedure is included. Gilyén, Su, Low, and Wiebe formulate singular-value transformation, which applies an admissible polynomial to the singular values exposed by a projected unitary encoding. Lin and Tong use polynomial filtering and a Zeno-style construction, while Subaşı, Somma, and Orsucci develop a randomized-adiabatic family. These methods share a spectral-inversion goal, not a single access or resource theorem.
For a projected unitary encoding with a singular-value gap , the QSVT pseudoinverse construction approximates the scaled operator with degree and encoded-operator call count
The factor belongs to this conventional bounded polynomial transform; it is not the largest admissible HHL reciprocal-rotation scale. Applying the transform to , heralding or amplification, , construction of the block encoding, and readout remain separate. For a singular matrix, the approximation also needs a cutoff and transition band, so the theorem prepares a truncated-pseudoinverse action only on the promised support.
Block Encodings and QSVT owns the general projected-unitary and block-encoding calculus, QSVT admissibility and singular-value transformation, composition and error rules, and the query and ancilla ledger; this page retains the QLSP-specific pseudoinverse application, success and error guarantees, normalized solution-state output, and readout limits.
Qubitization and Quantum Signal Processing retains the signal-walk construction, polynomial admissibility, phase conventions, synthesis, and validation workflow. This page uses only the QLSP-specific pseudoinverse theorem and the access costs needed to interpret its solution-state claim.
The following ledger deliberately keeps model-specific statements separate. Here and denote the Childs–Kothari–Somma sparse-matrix and right-hand-side oracles, while and denote the encoded-matrix and state-preparation oracles of the final row.
| family | supplied access | counted call | output / error / success | bound and scope |
|---|---|---|---|---|
| HHL phase estimation | Efficiently row-computable -sparse Hermitian and efficient preparation, with controlled finite-precision simulation | Sparse-access simulation, phase estimation, reciprocal rotation, uncomputation, and postselection within the historical runtime model | State proportional to at state error after the declared herald; readout is excluded | Rough historical runtime; model-specific, not a current best bound or classical-vector theorem |
| Ambainis variable time | The paper’s sparse linear-system and preparable-input model, including reversible variable stopping branches | Calls and work in that historical model, with the stopping-time amplification procedure | Heralded approximate solution state under the paper’s bounded-error convention | Improves the isolated dependence to ; not a fully precision-resolved end-to-end bound |
| Fourier/Chebyshev LCU | Hermitian , condition bound , at most nonzeros per row and column, coherent in-place , and unitary | and queries are counted separately; inverses and variable-time amplification are included as specified by the theorem | Heralded solution state within Euclidean error and success at least in the gate-efficient theorem | Direct method: calls and calls. Fourier: calls and calls. Chebyshev: calls and calls. With variable time: calls to both; oracle construction and loading remain excluded |
| QSVT pseudoinverse | Projected unitary encoding of with singular-value gap , its inverse, signal reflections, and phase data | Encoded-operator and inverse calls, equivalently polynomial degree; application and success processing are separate | Operator approximation to on the promised singular subspace with error ; solution-state success depends on the input | encoded-operator calls; block construction, , heralding or amplification, cutoff bias, and readout are excluded |
| Discrete adiabatic solver | Supplied block encoding of with , supplied preparation, and required controlled and inverse calls | Average calls to the block-encoding and preparation interfaces under the theorem’s oracle convention | Constant-success output within Euclidean state error | Costa et al.: average oracle calls; sparse reduction, block construction, gates, loading, and readout are outside the bound |
| Tunable variable time | Low–Su block encoding with declared and inverse normalization, and repeatable , including the adjoint and controlled capabilities required for reflections and variable-time amplification | Queries to and are separate | Constant-success state within phase-aligned Euclidean error under the theorem’s normalization and convention | queries and queries; in the exceptional constant- regime use the theorem’s constant-case interpretation rather than substituting literally |
Costa and collaborators’ 2022 discrete-adiabatic theorem reaches the joint query scaling in its supplied-block model. Their 2025 comparison shows lower constant factors than the randomized-adiabatic solver under the paper’s matched oracle construction; this is a comparison of those algorithms, not a universal hardware ranking. Low and Su’s 2026 theorem sharpens the two-oracle ledger: it makes the optimal preparation-oracle dependence visible while retaining a different matrix-oracle bound. None of these statements prices a classical database, a fault-tolerant implementation, or a downstream measurement unless those costs are separately expanded.
Non-Hermitian, Rectangular, and Least-Squares Problems
Section titled “Non-Hermitian, Rectangular, and Least-Squares Problems”HHL’s Hermitian presentation is not a license to discard non-Hermitian structure. For an invertible square matrix, one standard reduction uses the Hermitian dilation
With compatible ordering of the two block registers,
The nonzero eigenvalue magnitudes of are the singular values of , so this dilation preserves the intrinsic spectral condition number. It does not preserve every implementation constant for free. The register is larger, access to is required, a block or sparse interface for must be constructed, and its normalization, sparsity convention, controls, and precision enter the resource and error ledgers.
For a rectangular matrix with singular-value decomposition , the input and output inhabit different singular-vector spaces. With cutoff , define
The right-hand side is supplied in the left-singular space and the output is proportional to in the right-singular space. A component of below the cutoff or outside the column space must be handled explicitly: reject it as invalid input, project it and disclose the lost norm, or define a least-squares objective whose minimizer uses that projection. The cutoff causes bias, changes the success amplitude, and sets the relevant condition parameter. Singular Value Decomposition owns the factorization and pseudoinverse definitions; this page owns the access-aware state-preparation claim.
Regularization changes the task again. Replacing by, for example, can suppress unstable small singular values, but the output is then a regularized solution state. Its approximation interval, regularization bias, normalization, and downstream statistic must be stated; it is not an exact QLSP with a mysteriously improved condition number.
Outputs, Observables, and Readout
Section titled “Outputs, Observables, and Readout”The solution register is useful when the application can remain quantum or asks for a low-dimensional functional. If is a bounded observable, a natural target is
For phase-aligned unit vectors separated by at most , the preparation contribution obeys the simple bound
Statistical error is additional. If is measured with outcomes in , ordinary independent sampling uses fresh successful preparations; Hoeffding’s inequality gives a sufficient shot count for additive statistical error and failure probability at most . Each shot therefore expands to another preparation, herald check, and possible retry. Coherent amplitude-estimation improvements require a repeatable preparation unitary, its inverse, reflections, and controlled uses, so they invoke a stronger access contract than independent samples.
A computational-basis measurement yields one index distributed according to ; it does not reveal phases, normalization of the unnormalized solution, or all coordinates. Tomography or dense classical output inherits an -scale description requirement before accuracy and confidence are included. A meaningful application should instead name the overlap, expectation, sample, threshold decision, or subsequent coherent transformation that consumes .
Lower Bounds and Limitations owns the general loading, explicit-output, tomography, and query-to-runtime barriers; this page retains QLSP-specific access, conditioning, quantum-state output, observables, verification, and theorem bounds.
Verification is not automatic either. In the black-box model analyzed by Somma and Subaşı, constant-distance coherent verification requires uses of , , or controlled variants in the worst case and typically . A prepare-and-measure strategy requires copies in the worst case and typically . Special structure can provide a cheaper residual, energy, observable, or application-specific certificate, but its measurement and the inequality linking it to the desired state guarantee must be supplied. Preparing a candidate does not certify it.
Complexity Bounds and Matched Classical Comparisons
Section titled “Complexity Bounds and Matched Classical Comparisons”Dimension, conditioning, precision, sparsity, input overlap, and success are independent asymptotic variables. A statement that is polylogarithmic in may still be polynomial in , , sparsity, or inverse success amplitude. It may also count only ideal oracle calls. Query Complexity owns the general distinction between upper bounds, reductions, and query lower bounds; the ledger here keeps the relevant QLSP regimes attached to their access models.
In the block-encoding parity-reduction regime, a proved lower bound requires
encoded-matrix queries. It matches the joint condition-and-precision scaling of the discrete-adiabatic upper bound within that oracle setting. Mori, Kikuchi, Benedetti, and Rosenkranz proved a different 2026 lower bound, , for sparse queries at constant error. These bounds cannot be multiplied or merged: their interfaces and error regimes differ. As of 2026-08-22, the joint , , and dependence remains open. Neither query result is a universal gate-count, circuit-depth, physical- runtime, or wall-clock lower bound.
Classical comparison begins by matching the task. The conjugate-gradient method introduced by Hestenes and Stiefel is a natural comparator for sparse Hermitian positive-definite systems when a classical vector is wanted. Its iteration behavior depends on conditioning, while each iteration charges a sparse matrix–vector product and classical vector operations. That is not the same output contract as preparing . Conversely, comparing a quantum state-output theorem only with the cost of printing a classical dense vector can manufacture a separation by requiring the classical method to solve a stronger problem.
The Classical Information Review supplies the representation and access matching needed here. A dense-memory quantum interface or length-square sample/query access may require substantial preprocessing and can enable stronger classical algorithms too. The comparison must therefore use the same matrix data structure, update model, right-hand-side access, condition and rank promises, output functional, accuracy, confidence, preprocessing, memory, and hardware boundary.
An end-to-end claim then adds state preparation, oracle or block-encoding construction, controlled and inverse operations, phase or polynomial synthesis, fault-tolerant gates, retries, measurement, classical postprocessing, and verification. Algorithmic Benchmarking owns empirical comparison design; Verification of Quantum Advantage owns evidence needed for an advantage conclusion; Claims, Hype, and Evidence Standards owns claim calibration; and Resource Estimation Tools owns the translation to implementation resources. Polylogarithmic dimension dependence in a supplied-oracle theorem, standing alone, establishes no generic exponential quantum advantage.
Two Reproducible Finite Audits
Section titled “Two Reproducible Finite Audits”These audits are deterministic exact-algebra checks. They validate the stated two-dimensional instances, not asymptotic scaling, hardware performance, or a quantum advantage.
Audit 1 — HHL rotation and postselection ledger
Section titled “Audit 1 — HHL rotation and postselection ledger”Take
Then
The two reciprocal-rotation flag amplitudes are and , so
| quantity | exact value | interpretation |
|---|---|---|
| intrinsic condition number | ||
| flag amplitude for | on | |
| flag amplitude for | on | |
| ideal herald probability | ||
| postselected computational-basis probability | ||
| postselected computational-basis probability | ||
| one observable, not both coordinates |
The complete audit record is:
- Problem family and size. One two-dimensional Hermitian QLSP instance with one solution qubit and exact rational data.
- Promise and instance. The diagonal matrix is invertible with spectrum , and the input has equal support on both eigenvectors.
- Access and encoding. The check licenses one exact preparation interface and exact diagonal spectral processing; it does not infer an oracle from the displayed matrix.
- Output and use. The heralded output is , from which a expectation or basis sample may be obtained.
- Success and error. The ideal algebra has zero approximation error and flag probability ; finite implementation error is outside this audit.
- Algorithmic idea. Reciprocal rotation multiplies the two eigenbasis amplitudes by and before normalization.
- Executable procedure. Prepare, label the spectrum, rotate the flag, uncompute, and either postselect the herald or supply the reflections needed for amplification.
- Resource ledger. Count preparation, spectral processing, controlled rotation, uncomputation, successful preparations, and any amplification as separate resources.
- Classical comparator. Direct rational two-by-two algebra checks the finite identities; it is not a scalable comparator to an oracle problem.
- Evidence and limits. The calculation proves the listed values only. A single run does not return both solution coordinates or establish scaling.
Audit 2 — Block normalization and readout remain separate
Section titled “Audit 2 — Block normalization and readout remain separate”Now take
Exact inversion gives
| quantity | exact value | interpretation |
|---|---|---|
| intrinsic condition number | ||
| tight HHL-style success with | ||
| one basis probability | ||
| the other basis probability | ||
| selected observable output | ||
| block condition number for | tight matrix normalization | |
| block condition number for | over-normalized access to the same |
The HHL-style scale produces success . By contrast, the conventional QSVT pseudoinverse theorem applies the extra factor to the encoded inverse. For and tight , the implemented scale is , so its unamplified success is . Combining that transform with the larger HHL success probability would mix two normalization conventions.
The complete audit record is:
- Problem family and size. One two-dimensional diagonal QLSP compares two exact encodings of the same matrix and one selected observable.
- Promise and instance. The spectrum is , the inverse normalization is tightly , and the right-hand side has equal eigenbasis amplitudes.
- Access and encoding. Two supplied exact block encodings use and ; their construction costs are not assumed equal.
- Output and use. Both encode the same normalized solution state, while a basis sample or expectation is the declared classical use.
- Success and error. Exact HHL-style heralding has probability ; the differently scaled QSVT transform has probability before amplification.
- Algorithmic idea. Separating intrinsic conditioning from access normalization prevents an over-normalized block from changing the mathematical problem.
- Executable procedure. Prepare , apply the selected inverse transform, herald success, and repeat successful preparations for the chosen measurement.
- Resource ledger. Keep block-oracle calls, calls, successful states, observable shots, confidence, and construction costs distinct.
- Classical comparator. Exact rational arithmetic verifies this instance; no finite table demonstrates an asymptotic speedup.
- Evidence and limits. The audit proves the normalization and readout distinctions. It does not compare physical implementations of the two block encodings.
One deterministic program reproduces all values in both audits:
const TOL = 1e-14;const assert = (condition, label) => { if (!condition) throw new Error(label);};const close = (actual, expected, label) => { assert(Math.abs(actual - expected) <= TOL, `${label}: ${actual} != ${expected}`);};const vectorClose = (actual, expected, label) => { assert(actual.length === expected.length, `${label}: length`); actual.forEach((value, index) => close(value, expected[index], `${label}[${index}]`));};const norm2 = (vector) => Math.sqrt( vector.reduce((sum, value) => sum + value * value, 0),);const normalize = (vector) => { const norm = norm2(vector); return vector.map((value) => value / norm);};const diagonalMatVec = (diagonal, vector) => diagonal.map((value, index) => value * vector[index]);
const b = [1 / Math.sqrt(2), 1 / Math.sqrt(2)];close(norm2(b), 1, 'right-hand-side norm');
// Audit 1.const diagonal1 = [1, 1 / 2];const inverseApplied1 = b.map((value, index) => value / diagonal1[index]);vectorClose( inverseApplied1, [1 / Math.sqrt(2), 2 / Math.sqrt(2)], 'audit 1 inverse vector',);vectorClose( diagonalMatVec(diagonal1, inverseApplied1), b, 'audit 1 linear equation',);const x1 = normalize(inverseApplied1);vectorClose(x1, [1 / Math.sqrt(5), 2 / Math.sqrt(5)], 'audit 1 x');close(norm2(x1), 1, 'audit 1 unit norm');const kappa1 = Math.max(...diagonal1) / Math.min(...diagonal1);close(kappa1, 2, 'audit 1 intrinsic condition');const C1 = 1 / 2;const flag1 = diagonal1.map((lambda) => C1 / lambda);vectorClose(flag1, [1 / 2, 1], 'audit 1 flag amplitudes');const pC = b.reduce((sum, beta, index) => sum + beta * beta * flag1[index] * flag1[index], 0);close(pC, 5 / 8, 'audit 1 success');close(x1[0] ** 2, 1 / 5, 'audit 1 P(0)');close(x1[1] ** 2, 4 / 5, 'audit 1 P(1)');close(x1[0] ** 2 - x1[1] ** 2, -3 / 5, 'audit 1 Z');
// Audit 2.const diagonal2 = [1, 1 / 4];const inverseApplied2 = b.map((value, index) => value / diagonal2[index]);vectorClose( inverseApplied2, [1 / Math.sqrt(2), 4 / Math.sqrt(2)], 'audit 2 inverse vector',);vectorClose( diagonalMatVec(diagonal2, inverseApplied2), b, 'audit 2 linear equation',);const x2 = normalize(inverseApplied2);vectorClose(x2, [1 / Math.sqrt(17), 4 / Math.sqrt(17)], 'audit 2 x');close(norm2(x2), 1, 'audit 2 unit norm');const kappa2 = Math.max(...diagonal2) / Math.min(...diagonal2);close(kappa2, 4, 'audit 2 intrinsic condition');const alphaInverse = 4;assert(alphaInverse >= 1 / Math.min(...diagonal2), 'inverse normalization');const pB = norm2(inverseApplied2) ** 2 / alphaInverse ** 2;close(pB, 17 / 32, 'audit 2 p_b');close(x2[0] ** 2, 1 / 17, 'audit 2 P(0)');close(x2[1] ** 2, 16 / 17, 'audit 2 P(1)');close(x2[0] ** 2 - x2[1] ** 2, -15 / 17, 'audit 2 Z');const alphaTight = 1;const alphaLoose = 2;assert(alphaTight >= Math.max(...diagonal2), 'tight alpha validity');assert(alphaLoose >= Math.max(...diagonal2), 'loose alpha validity');const blockKappaTight = alphaTight * alphaInverse;const blockKappaLoose = alphaLoose * alphaInverse;close(blockKappaTight, 4, 'tight block condition');close(blockKappaLoose, 8, 'loose block condition');assert(blockKappaTight === kappa2, 'tight block versus intrinsic');assert(blockKappaLoose !== kappa2, 'loose block versus intrinsic');const qsvtScaled = inverseApplied2.map((value) => value / 8);const qsvtSuccess = norm2(qsvtScaled) ** 2;close(qsvtSuccess, 17 / 128, 'QSVT scaled success');
console.log('Quantum-linear-algebra audits: PASS');Common Quantum-Linear-Algebra Claim Failures
Section titled “Common Quantum-Linear-Algebra Claim Failures”Treating stored data as coherent access. A displayed matrix or classical array is not a sparse oracle, block encoding, or controlled evolution. Name the implemented interface, its precision, inverse and control capabilities, construction cost, and memory.
Equating intrinsic and block conditioning. The mathematical is unchanged by rescaling an encoding, whereas depends on declared access normalizations. Keep both quantities and do not hide block error.
Suppressing the success branch. A reciprocal or pseudoinverse filter is nonunitary and therefore appears inside a heralded construction. State its success amplitude and charge retries or the preparations, inverses, reflections, and controls used by amplification.
Reporting a quantum state as a classical vector. Measuring once yields one sample, not coordinates, their relative phases, or . Specify a downstream functional and measurement protocol.
Using residual as state error without conditioning. A small residual can coexist with appreciable forward error when small singular values are present. Provide the stability inequality, cutoff, and normalization step that connect the reported metric to the desired state.
Silently changing a singular problem. Truncation, projection, least squares, and regularization define different outputs. State the chosen support, cutoff bias, and treatment of components outside the column space.
Calling a query bound an end-to-end advantage. Oracle construction, loading, gates, successful repetitions, measurement, verification, and the matched classical baseline remain outside a bare matrix-query formula. A polylogarithmic dependence does not erase them.
Exercises
Section titled “Exercises”1. Normalize a Quantum Linear-System Instance
Section titled “1. Normalize a Quantum Linear-System Instance”Let
Compute , the unnormalized vector , and the normalized solution state. Explain why solving with or with produces the same final quantum state but not the same classical solution vector.
Solution
Because ,
Applying the inverse gives
Therefore
The classical solutions to and differ by the factor . Normalization removes that nonzero scalar, so their solution states coincide. The state consequently does not retain the magnitude needed to reconstruct the original classical vector.
2. Derive the HHL Flag Probability
Section titled “2. Derive the HHL Flag Probability”Assume the ideal Hermitian HHL setting with and flag amplitude . Derive the heralding probability. Then evaluate it for , equal input amplitudes, and ; also give the two postselected basis probabilities.
Solution
Orthogonality of the eigenvectors makes the squared norm of the selected branch
For the stated instance, the flag amplitudes are and . Hence
The unnormalized inverse action is proportional to , so the successful state is . Its basis probabilities are and . They require separate successful shots to estimate; the heralding calculation does not output the pair as a classical record.
3. Separate Intrinsic and Block Condition Numbers
Section titled “3. Separate Intrinsic and Block Condition Numbers”Let and use the tight inverse normalization . Compare exact block encodings with and . Find the intrinsic and block condition numbers, and state what does and does not change for a fixed .
Solution
The singular values are and , so
The two valid matrix normalizations satisfy and give
The matrix, its intrinsic condition number, , and its normalized direction are unchanged. The encoded block amplitude and the access-induced condition parameter change. Consequently, a query theorem expressed in can assign different bounds to the two interfaces even though they represent the same mathematical system.
4. Propagate Eigenvalue-Estimation Error
Section titled “4. Propagate Eigenvalue-Estimation Error”Suppose , , an eigenvalue is , and phase estimation returns . Verify the hypotheses of the reciprocal stability bound, compute the actual reciprocal error, and compare it with the bound. What error sources remain before a state guarantee follows?
Solution
Here and , so the required inequality holds. The actual error is
whereas the elementary bound gives
The bound is valid but not tight for this value. A final state guarantee must also budget Hamiltonian-simulation error, reversible reciprocal arithmetic, rotation synthesis, imperfect uncomputation, input preparation, block error, postselection or amplification error, and the change caused by normalizing the approximate inverse-applied vector.
5. Build a Hermitian Dilation
Section titled “5. Build a Hermitian Dilation”For
write the Hermitian dilation and verify its inverse action on . Name two implementation costs that the algebraic identity does not remove.
Solution
Because
the dilation is
Also . Direct multiplication verifies
The reduction needs an extra block-label qubit and coherent access to both and . It also requires a constructed normalization and may alter sparse-oracle constants, ancilla use, controls, and gate cost. Those costs do not vanish because the nonzero singular values are preserved.
6. Design an Observable Readout
Section titled “6. Design an Observable Readout”A solver prepares within Euclidean distance of after phase alignment. You want to total additive error at most and failure probability at most . Allocate half the error to preparation and half to sampling, and give a sufficient number of successful shots. How does a raw herald probability affect attempts?
Solution
Because , preparation contributes at most . Allocate to it by requiring . Allocate the other to the sample mean. Since outcomes lie in , Hoeffding’s bound is met by
successful, independent preparations. Without coherent amplification, a herald probability makes the expected number of full attempts . Using amplitude estimation would change the sampling dependence, but it would also require coherent preparation inverses, reflections, controls, and its own error and success ledger.
7. Scope a Polylogarithmic-Dimension Claim
Section titled “7. Scope a Polylogarithmic-Dimension Claim”A manuscript says: “The QLSP query count is , so the algorithm solves dense linear systems exponentially faster than every classical method.” Identify the missing assumptions and give a defensible replacement statement.
Solution
The claim omits how the dense matrix and right-hand side are loaded, the cost of constructing and controlling their oracles, condition and rank promises, precision and success dependence, and whether the output is a state or a classical vector. It also omits preprocessing, repeated preparation, measurement, verification, and a classical comparator with the same data access and output functional.
A defensible replacement is conditional: under a supplied coherent matrix interface and repeatable state preparation whose costs are excluded, a named QLSP theorem may use only polylogarithmically many address-dependent operations in while retaining its stated dependence on conditioning, precision, and success. Whether that yields an end-to-end advantage for a selected observable requires explicit oracle construction, readout, and a matched dated classical comparison. No conclusion about every dense system follows.
8. Repair a Quantum-Linear-Algebra Advantage Claim
Section titled “8. Repair a Quantum-Linear-Algebra Advantage Claim”Repair the sentence “HHL returns the solution of any linear system exponentially faster than classical algorithms.” Give a complete record for a claim that could be evaluated rather than merely replacing “any” by “some.”
Solution
A defensible statement concerns a declared family and a useful state-derived quantity, not unrestricted classical vector output. For example: a selected QLSP algorithm can prepare an approximate normalized solution state with its proved query scaling when all stated coherent interfaces and promises are supplied; an end-to-end advantage remains a separate, application-specific claim. The complete record is:
- Problem family and size. Specify an family and whether the task is nonsingular solution-state preparation, truncated pseudoinversion, or least squares; name every scaling parameter.
- Promise and instance. Declare Hermiticity or dilation, rank or spectral interval, condition bound, sparsity or other structure, input support, and any distributional promise.
- Access and encoding. Give executable matrix and interfaces, normalizations, errors, data structures, preprocessing, inverses, controls, and construction costs.
- Output and use. Require a normalized state and identify the particular observable, overlap, sample, decision, or coherent subroutine that consumes it; do not promise an unmeasured classical vector.
- Success and error. State phase-aligned Euclidean error, herald probability, failure and confidence budgets, and the repetition or amplification method.
- Algorithmic idea. Name phase-estimation inversion, polynomial or singular-value transformation, variable time, or adiabatic transport and explain why it implements the desired filter.
- Executable procedure. Expand preparation, oracle calls, arithmetic or polynomial phases, inverses, controls, reflections, uncomputation, heralding, retries, measurement, verification, and stopping.
- Resource ledger. Report matrix and preparation queries separately from logical gates, depth, width, ancillas, memory, preprocessing, synthesis, successful shots, classical work, fault-tolerant overhead, and wall time.
- Classical comparator. Select a dated algorithm with the same matrix and input access, promises, preprocessing, requested output, accuracy, confidence, memory, parallelism, and hardware boundary.
- Evidence and limits. Cite the applicable upper and lower theorems, finite audits, and implementation evidence; exclude unsupported loading, readout, verification, gate, runtime, and universal-advantage conclusions.
This record can support a conditional oracle or end-to-end comparison once its entries are filled with evidence. It cannot support the original universal claim merely from a logarithmic-sized address register.
References
Section titled “References”- A. Ambainis, “Variable Time Amplitude Amplification and Quantum Algorithms for Linear Algebra Problems,” in 29th International Symposium on Theoretical Aspects of Computer Science (STACS 2012), 636–647 (2012), doi:10.4230/LIPIcs.STACS.2012.636.
- A. M. Childs, R. Kothari, and R. D. Somma, “Quantum Algorithm for Systems of Linear Equations with Exponentially Improved Dependence on Precision,” SIAM Journal on Computing 46, 1920–1950 (2017), doi:10.1137/16M1087072.
- P. C. S. Costa, D. An, Y. R. Sanders, Y. Su, R. Babbush, and D. W. Berry, “Optimal Scaling Quantum Linear-Systems Solver via Discrete Adiabatic Theorem,” PRX Quantum 3, 040303 (2022), doi:10.1103/PRXQuantum.3.040303.
- P. C. S. Costa, D. An, R. Babbush, and D. W. Berry, “The Discrete Adiabatic Quantum Linear System Solver Has Lower Constant Factors Than the Randomized Adiabatic Solver,” Quantum 9, 1887 (2025), doi:10.22331/q-2025-10-20-1887.
- A. Gilyén, Y. Su, G. H. Low, and N. Wiebe, “Quantum Singular Value Transformation and Beyond: Exponential Improvements for Quantum Matrix Arithmetics,” in Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, 193–204 (2019), doi:10.1145/3313276.3316366.
- A. W. Harrow, A. Hassidim, and S. Lloyd, “Quantum Algorithm for Linear Systems of Equations,” Physical Review Letters 103, 150502 (2009), doi:10.1103/PhysRevLett.103.150502.
- M. R. Hestenes and E. Stiefel, “Methods of Conjugate Gradients for Solving Linear Systems,” Journal of Research of the National Bureau of Standards 49, 409–436 (1952), doi:10.6028/jres.049.044.
- L. Lin and Y. Tong, “Optimal Polynomial Based Quantum Eigenstate Filtering with Application to Solving Quantum Linear Systems,” Quantum 4, 361 (2020), doi:10.22331/q-2020-11-11-361.
- G. H. Low and Y. Su, “Quantum Linear System Algorithm with Optimal Queries to Initial State Preparation,” Quantum 10, 2041 (2026), doi:10.22331/q-2026-03-23-2041.
- H. Mori, Y. Kikuchi, M. Benedetti, and M. Rosenkranz, “Sparsity-Dependent Complexity Lower Bound of Quantum Linear System Solvers,” Quantum Science and Technology 11, 035063 (2026), doi:10.1088/2058-9565/ae89e0.
- R. D. Somma and Y. Subaşı, “Complexity of Quantum State Verification in the Quantum Linear Systems Problem,” PRX Quantum 2, 010315 (2021), doi:10.1103/PRXQuantum.2.010315.
- Y. Subaşı, R. D. Somma, and D. Orsucci, “Quantum Algorithms for Systems of Linear Equations Inspired by Adiabatic Quantum Computing,” Physical Review Letters 122, 060504 (2019), doi:10.1103/PhysRevLett.122.060504.