qiskit.algorithms.linear_solvers¶
Linear solvers (qiskit.algorithms.linear_solvers
)¶
It contains classical and quantum algorithms to solve systems of linear equations such as
HHL
.
Although the quantum algorithm accepts a general Hermitian matrix as input, Qiskit’s default
Hamiltonian evolution is exponential in such cases and therefore the quantum linear solver will
not achieve an exponential speedup.
Furthermore, the quantum algorithm can find a solution exponentially faster in the size of the
system than their classical counterparts (i.e. logarithmic complexity instead of polynomial),
meaning that reading the full solution vector would kill such speedup (since this would take
linear time in the size of the system).
Therefore, to achieve an exponential speedup we can only compute functions from the solution
vector (the so called observables) to learn information about the solution.
Known efficient implementations of Hamiltonian evolutions or observables are contained in the
following subfolders:
 Matrices
A placeholder for efficient implementations of the Hamiltonian evolution of particular types of matrices.
 Observables
A placeholder for efficient implementations of functions that can be computed from the solution vector to a system of linear equations.
Linear Solvers¶
An abstract class for linear system solvers in Qiskit. 

A base class for linear systems results. 

Systems of linear equations arise naturally in many reallife applications in a wide range of areas, such as in the solution of Partial Differential Equations, the calibration of financial models, fluid simulation or numerical field calculation. 

The Numpy Linear Solver algorithm (classical). 
Matrices¶
Base class for linear system matrices. 

Class of matrices given as a numpy array. 

Class of tridiagonal Toeplitz symmetric matrices. 
Observables¶
An abstract class for linear system observables in Qiskit. 

An observable for the absolute average of a linear system of equations solution. 


A class for the matrix functional of the vector solution to the linear systems. 