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:
A placeholder for efficient implementations of the Hamiltonian evolution of particular types of matrices.
A placeholder for efficient implementations of functions that can be computed from the solution vector to a system of linear equations.
Linear Solvers
LinearSolver | An abstract class for linear system solvers in Qiskit. |
LinearSolverResult | A base class for linear systems results. |
HHL | Systems of linear equations arise naturally in many real-life 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. |
NumPyLinearSolver | The Numpy Linear Solver algorithm (classical). |
Matrices
LinearSystemMatrix | Base class for linear system matrices. |
NumPyMatrix | Class of matrices given as a numpy array. |
TridiagonalToeplitz | Class of tridiagonal Toeplitz symmetric matrices. |
Observables
LinearSystemObservable () | An abstract class for linear system observables in Qiskit. |
AbsoluteAverage () | An observable for the absolute average of a linear system of equations solution. |
MatrixFunctional (main_diag, off_diag) | A class for the matrix functional of the vector solution to the linear systems. |