Closed NicoRenaud closed 2 years ago
Quick and dirty implementation in Python:
def non_square_solver(A, b):
""" Solve an overdetermined system
The system Ax = b, where A is a non-square matrix,
can be turned into a square-matrix problem by
A^t A x = A^t b
Q x = c
x = Q^{-1} c
"""
At = np.transpose(A)
Q = np.matmul(At, A)
c = np.matmul(At, b)
Qinv = np.linalg.inv(Q)
return np.matmul(Qinv, c)
we have it implemented and its also part of qalcore now
We can use Quantum Anealler to solve linear systems. We first need to recast the problem as a QUBO and then implement it on the the QA architecture.
Some work has been done in that area already