View on GitHub
Open this notebook in GitHub to run it yourself
x = sparse.linalg.spsolve(mat_raw_scr, b_raw), one can call the quantum solver cheb_lcu_approx_solver(mat_raw_scr, b_raw,...).
We implemented two versions for block-encoding, one based on Pauli decomposition of the matrix, and another one based on decomposing the matrix to a finite set of diagonals.
lcu_cheb_approx that implements an approximated Chebyshev LCU quantum linear solver.
cheb_lcu_approx_solver function, which gets the matrix and right-hand-side vector, applies the quantum solver, and returns the linear equation solution using a statevector simulator.
The solvers in this directory were developed in the framework of exploring their performance in hybrid CFD schemes.
For simplicity, it is assumed that all the properties of the matrices are known explicitly. In particular, we calculate its singular values for identifying the range in which we apply the inversion polynomial.
Output:
Output:
Output:
Output:
Output:
Output:

debug_mode=False as we can skip the visualization of the quantum program).
For the larger usecase we work with the Banded Diagonals block-encoding. We compare the approximated version of the solver to the exact one.
Output:
Output:
Output:
Output:
Output:
Output:
Output:
Output:
Output:
Output:
Output:
