I am following this very nice qiskit tutorial on how to implement a simple variational quantum linear solver (VQLS). There are 3 examples implemented in the tutorial all of which are solving the $Ax=b$ problem, however I can only get the first one to work consistently. To be clear, for the discussion below, I am using the exact code given on their page.
Looking at their second example where $A = 0.55I + 0.225Z_2 + 0.225Z_3$ the solver fails to find an adequate solution. To show this, I use a metric defined on their page to measure the accuracy of the solution: $b(Ax)/|Ax|^2$. An accurate solution will be near $1$, however, they report $0.2920$ demonstrating that their method has failed. This is strange because they claim that it has succeeded. This can be easily checked by taking the optimized parameters they provide which are given as the following vector:
x: array([2.38122341, 1.98992817, 4.69971104, 1.56178653, 3.12971691,1.56423666, 0.66469388, 4.26774393, 0.7439952 ])
These parameters can be directly input into their apply_fixed_ansatz
function to obtain the solution $x$. Doing this, one finds that $Ax\neq b$.
My question is, is the tutorial wrong as I have stated? If so, how is it wrong and what can I do to fix it? Otherwise, am I misunderstanding the tutorial and if so, where am I going wrong?