Skip to content

QuantumApplicationLab/hhl-prototype

Repository files navigation

Platform Python Qiskit License Code style: Black Tests Coverage 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

git clone https://github.com/QuantumApplicationLab/hhl_prototype
cd hhl_prototype
pip install -e .

Use

import numpy as np
from hhl_prototype import HHL
from qiskit.primitives import Estimator, Sampler

# create the matrix
A = np.random.rand(4,4)
A = A+A.T

# create the right hand side 
b = np.random.rand(4)

# create the solver and solve
hhl = 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

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages