Skip to content
This repository was archived by the owner on Aug 19, 2026. It is now read-only.

Repository files navigation

PlatformPythonQiskitLicenseCode style: BlackTestsCoverage Status

hhl

HHL Quantum Linear Solver

The hhl-prototype allows to use the HHL algorithm to solve linear system of euqations. Original implementation was implemented by @anedumla : https://github.com/anedumla/quantum_linear_solvers

Installation

gitclonehttps://github.com/QuantumApplicationLab/hhl_prototypecdhhl_prototypepipinstall-e .

Use

importnumpyasnpfromhhl_prototypeimportHHLfromqiskit.primitivesimportEstimator, Sampler# create the matrixA=np.random.rand(4,4)
A=A+A.T# create the right hand side b=np.random.rand(4)
# create the solver and solvehhl=HHL(estimator=Estimator(), sampler=Sampler())
hhl.solve(A, b)

Documentation

Tutorial: https://qiskit.org/textbook/ch-applications/hhl_tutorial.html

About

HHL algorithm for Linear system

Resources

Code of conduct

Contributing

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages