qiskit-textbook
qiskit-textbook copied to clipboard
[4.1.1] A miscalculation in the HHL textbook
Describe the issue
A miscalculation in the HHL textbook was found. I spent a lot of time on that xD
Solving Linear Systems of Equations using HHL
In sec. 3. (Example: 4-qubit HHL,),
These eigen vector would be wrong. The pair of eigen value and eigen vector is turned over ! Therefore,
- The scaled eigen value of 1/2 corresponds to eigen vector of [1,-1], not [1,1].
- The scaled eigen value of 1/4 corresponds to eigen vector of [1,1], not [1,-1].
The following calculation about 4-qubit HHL example is also wrong.
Let us check numerically.
From the value of u1 and u2, we can easily show that the second element of solution x is negative.
However, exact (normalized) solution is x_exact = [0.9486833 0.31622777]. The second element of solution x is not negative but positive.
It also can be seen in Sec. 4-A as follows,
Again, the second element of solution x is positive.
Describe what you expect to see In In sec. 3. (Example: 4-qubit HHL,), the eigen vectos should be turned over. The scaled eigen value of 1/2 corresponds to eigen vector of [1,-1], not [1,1]. The scaled eigen value of 1/4 corresponds to eigen vector of [1,1], not [1,-1].
I found the same bug. and still the probability exceeds 1!!!
I found the same bug. and still the probability exceeds 1!!!
Hi, Markus-san. I have found how the miscalculation of the probability was occured in the HHL textbook. (Issue 881) https://github.com/qiskit-community/qiskit-textbook/issues/881
Hi, @frankharkins please assign #883 to amitracal
@frankharkins : I'll look at this issue with Abhijit
@hykavitha @amitracal this is possibly fixed in #1018, can you check please?