You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update: If I change the extracting vector index:
"""
naive_full_vector = np.array([naive_sv[16], naive_sv[17] ])
tridi_full_vector = np.array([tridi_sv[16], tridi_sv[17] ])
"""
Now, I can get the exact solution same as classical:
full naive solution vector: [1.125 0.375]
full tridi solution vector: [1.125 0.375]
classical state: [1.125 0.375]
But if I try another example i.e., matrix = np.array([[1, -1/4], [-1/4, 1]])
and keeping other code the same, the solution won't match.
full naive solution vector: [1.00580738 0.32752595]
full tridi solution vector: [1.125 0.375]
classical state: [1.06666667 0.26666667]
Why does allow negative eigenvalues considering adding 1 more qubit in the circuit? If I set neg_value to False, the rendered result showed exactly like the example.
This is a snapshot from the textbook.
This is from runtime.
The same code shows different circuit in the textbook and execution time. Not sure what’s wrong with this? https://learn.qiskit.org/course/ch-applications/solving-linear-systems-of-equations-using-hhl-and-its-qiskit-implementation
Also, the solution states are different.
The text was updated successfully, but these errors were encountered: