From the paper A survey on HHL algorithm: From theory to application in quantum machine learning ,
I use qasm code from here.
I try to follow the example in page 7. with Ax = b
and
the answer x should be
From the algorithm 2 in page 7 from the paper, They applied measurement on qubit q[0].
If q[0] = $|1\rangle$, the answer will be stored in q[.3] or register b.
But in the example here, I got state $|0\rangle$ from ancilla bit if I use the same rotation angle as the example.
When I measure register b, I always got state $|1\rangle$ even if the result on ancilla bit is $|1\rangle$ (I change ancilla bit rotation angel from the example to 3.6591 and 1.8296).
Does the problem is the rotation angle on ancilla bit?
How can I get the correct result on register b? Can you give me a good example to do this?