Quantum Algorithms Database

Variational Quantum Linear Solver (VQLS)

A near-term hybrid alternative to HHL for solving linear systems, using variational circuits to avoid HHL's deep circuit requirements.

Last reviewed September 30, 2026. Check the linked sources for anything that may have changed since.

Year

2019 (arXiv); 2023 (published in Quantum)

Inventor(s)

Carlos Bravo-Prieto, Ryan LaRose, Marco Cerezo, Yigit Subasi, Lukasz Cincio, and Patrick Coles; related work by Xiaosi Xu and coauthors and by Hsin-Yuan Huang, Kishor Bharti, and Patrick Rebentrost

Speedup Type

Heuristic (No Proven Speedup)

Difficulty

★★★★☆

Overview

The variational quantum linear solver, or VQLS, is a hybrid algorithm for solving linear systems of equations on a noisy quantum computer. Instead of the deep, fault-tolerant circuits of the HHL algorithm, VQLS uses a short parameterized circuit that is trained to prepare a state proportional to the solution, with a classical optimizer adjusting the parameters to minimize a cost that measures how well the candidate satisfies the equations.

As with other variational methods, there is no proven speedup. The appeal is that the circuits are shallow enough to run on today's devices, which makes VQLS a testbed for hybrid linear algebra and for studying the trainability of variational circuits.

The problem

Solve the linear system Ax=b on NISQ hardware without the exponentially deep circuits required by HHL.

History

HHL, published in 2009, showed that quantum computers could in principle solve sparse linear systems exponentially faster, but its circuits are far beyond current hardware. In 2019, three groups proposed variational alternatives within months: Bravo-Prieto and coauthors at Los Alamos, Xu and coauthors, and Huang, Bharti, and Rebentrost, who each used a parameterized circuit and a cost function in place of phase estimation.

The Bravo-Prieto paper was published in Quantum in 2023. It introduced a local cost function that avoids barren plateaus in some cases, and showed numerical examples with matrices of enormous size but special structure, such as those built from Ising-model Hamiltonians, as well as experiments on small quantum hardware. Later work analyzed the trainability of VQLS and extended it to preconditioning, differential equations, and fluid dynamics problems, though results remain at toy scale.

Intuition

We want x such that A x equals b, where A is a large matrix and b a vector. On a quantum computer the vector b is a state and A is an operator, written as a sum of simple pieces such as Pauli strings. A parameterized circuit V of alpha prepares a trial state x of alpha.

If x of alpha is a good solution, then applying A gives a state proportional to b. VQLS quantifies this by the overlap between A times x of alpha and b. The cost is zero exactly when the two are parallel, and larger otherwise. The global cost looks at the overlap of the whole state and can be hard to train for many qubits. The local cost compares the states qubit by qubit, with a similar minimum but gradients that do not vanish as quickly.

The quantum computer's job is to estimate the cost and, with it, the gradient, using Hadamard tests between circuits that implement V, A, and the preparation of b. The classical computer's job is to update alpha. As in VQE, the loop repeats until the cost is small, at which point the circuit prepares the desired solution state.

How it works

Prepares a variational ansatz state and minimizes a cost function measuring how well Ax matches b. Uses a classical optimizer to tune circuit parameters, similar to VQE's approach for chemistry.

  1. Write the matrix as a linear combination of unitaries, such as a sum of Pauli strings with coefficients, and write a circuit that prepares the state b.
  2. Choose a parameterized ansatz circuit V of alpha that will prepare the candidate solution state.
  3. Define a cost function, global or local, that is zero when A times the candidate is proportional to b.
  4. Estimate the cost by running Hadamard tests that compute the needed overlaps between terms, using measurements on a quantum computer.
  5. Feed the cost to a classical optimizer, which updates the parameters alpha, using gradients from parameter-shift rules if available.
  6. Iterate until the cost falls below a tolerance, then use the final circuit to prepare the solution state and measure observables of interest.

Worked example

Take a small matrix A equal to the identity plus a small multiple of the Pauli X operator on each of three qubits, and b equal to a simple product state. The solution x is close to b with corrections that are easy to find. A hardware-efficient ansatz with a few layers and about a dozen parameters can learn x of alpha with a cost near zero after tens of iterations.

For a larger structured matrix, such as one built from an Ising-type Hamiltonian on 50 qubits, the number of terms in A grows only linearly, and the cost evaluation scales polynomially in the number of terms. Researchers have simulated such cases at sizes far beyond what is possible to solve classically in naive form, but those examples rely on special structure that also helps classical solvers.

Complexity and resources

Circuit depthShallow, set by the ansatz depth, suited to near-term hardware
Cost evaluationNumber of Hadamard tests scales with the square of the number of terms in the Pauli decomposition of A
Classical optimizationMany iterations, with possible barren plateaus for global costs
Accuracy guaranteeNone: the solution is approximate and depends on ansatz expressibility and optimization
OutputA parameterized circuit that prepares the solution state, from which observables can be estimated

Hardware needs

A near-term device capable of running Hadamard tests and the ansatz circuit with moderate fidelity.

Many shots per cost evaluation and a classical optimizer.

For useful problems, matrices with a sparse Pauli decomposition and a state b that is easy to prepare.

Real-world impact

More practical than HHL on near-term hardware, though without provable exponential speedup. Used in early-stage quantum linear algebra pilots in finance and logistics.

Applications

Linear systems arising in solving differential equations, including simple fluid dynamics and electromagnetics problems.

Regression and data fitting, in toy examples of quantum machine learning.

A benchmark for variational methods and trainability studies.

Preconditioning and subroutines inside larger hybrid algorithms.

Limitations

  • No proven speedup over classical solvers, which are extremely efficient for most linear systems.
  • Barren plateaus and local minima can make training hard, especially with the global cost.
  • The number of terms in the Pauli decomposition of A can be large for general matrices.
  • The output is a quantum state, so extracting the full solution vector is exponentially costly.

Common misconceptions

  • VQLS is not a drop-in replacement for HHL with the same guarantees. It is a heuristic.
  • A low cost does not always mean the solution state is accurate for every observable.
  • Solving a structured 2 to the 50 by 2 to the 50 system in simulation does not demonstrate advantage if classical methods exploit the same structure.

How it compares

HHL has provable scaling but needs fault-tolerant hardware, while VQLS runs on noisy devices without guarantees.

QSVT-based solvers have optimal scaling in the condition number and need deep circuits.

Classical conjugate gradient and direct solvers are fast and widely used.

Why it matters

VQLS is one of the clearest examples of the near-term strategy: replace a deep, provably efficient algorithm with a shallow, trainable one. It shows both the promise and the problems of that strategy, particularly trainability.

The cost-function lessons, especially the benefit of local costs, carry over to other variational algorithms.

HHL-style problem, near-term method

HHL solves linear systems on a fault-tolerant quantum computer, but needs circuit depths out of reach for current devices. Bravo-Prieto, LaRose, Cerezo, Subasi, Cincio and Coles' 'Variational Quantum Linear Solver' (arXiv 1909.05820) proposes a hybrid quantum-classical alternative. A parameterised quantum circuit prepares a state |x> such that A|x> is proportional to |b>, and a classical optimiser tunes the circuit parameters to minimise a cost function C.

The authors prove that C is at least epsilon squared divided by kappa squared, where epsilon is the desired solution precision and kappa is the condition number of A. So reaching a given cost value certifies a precision guarantee. They also give efficient circuits for estimating C and argue that estimating it classically is likely hard.

What was run, and what is only heuristic

The algorithm was run on Rigetti's quantum computer for problems up to 1024 by 1024. Numerical solutions up to 2^50 by 2^50 were computed, but these are simulations, not hardware runs. For the examples studied, the authors heuristically find that time complexity scales efficiently with epsilon, kappa and system size N. That is an empirical observation, not a proven result.

As with HHL, the output is a quantum state |x>, not the vector itself, and loading the input b and reading out features of x have their own costs. Variational training also inherits the usual difficulties of noisy cost landscapes.

  • Method: variational circuit plus classical optimiser.
  • Guarantee: cost value certifies precision, C >= epsilon^2 / kappa^2.
  • Hardware run: up to 1024 x 1024 on Rigetti; larger sizes only simulated.
  • Scaling claim: heuristic, not proven.

Frequently asked questions

What does VQLS do?

It solves linear systems A x equal to b by training a parameterized quantum circuit to prepare a state proportional to the solution.

How is it different from HHL?

HHL uses phase estimation and deep circuits with proven scaling. VQLS uses shallow circuits and a classical optimizer without guarantees.

Does VQLS beat classical solvers?

Not shown. Demonstrations are on small problems or structured matrices that classical methods also handle well.

What is the local cost function?

A cost that compares the candidate and target states qubit by qubit, which often has larger gradients and is easier to train than the global cost.

Can I run VQLS on today's hardware?

Yes, for small systems, using the Hadamard test and a variational ansatz.

Related algorithms

References and further reading

Sources opened and checked on December 2, 2026. Resource estimates and claims change, so check the originals.

  1. Variational Quantum Linear Solver (arXiv (Bravo-Prieto et al.)) Opened. Source for the cost-function bound, the Rigetti run and the heuristic scaling.
  2. Quantum algorithm for solving linear systems of equations (arXiv (Harrow, Hassidim, Lloyd)) Opened. The fault-tolerant algorithm this replaces on near-term devices.

← Back to Algorithms Database