-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hey @koenleijnse, @samuelvanbeek-QAL and @NicoRenaud, I was investigating this issue and came up with another.
So, I was testing with Net0.inp and, after applying our preconditioner to the original linear system, I noticed that the HHL shows difficulties to solve the resulting problem. Interestingly, the original problem (without preconditioning) is solved very efficiently, despite A having a condition number of ~36.
Here is an example with the exact matrices I obtain after preconditioning the original system:
import numpy as np
from scipy.sparse import csc_matrix
from qiskit.primitives import Estimator
from quantum_newton_raphson.hhl_solver import HHL_SOLVER
A = csc_matrix([[1., -0.21697899], [-0.21697899, 1.]])
b = np.array([-4.74931887, 146.99031501])
solver = HHL_SOLVER(estimator=Estimator())
results = solver(A, b)
if np.linalg.norm(A.dot(results.solution) - b) > 0.1:
print("HHL solution innacurate...")
print("A @ x:", A.dot(results.solution))
print("b:", b)
The A matrix looks very good with a condition number of ~1.5. Maybe I am foreseeing something. Do you have any hint as for the reason HHL is not being able to solve it accurately ?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels