I implemented Grover algorithm with matrix_product_state method in qiskit. But I found something strange. I designed the oracle part come out $|1111\rangle$ but, real output was $0011\rangle$. I check out my code, but there is nothing wrong with it. Even simulating with the other simulation method (such as statevector
, density_matrix
etc.) I got correct output. I really don't understand why only matrix_product_state method's output is strange. My code is below.
-
$\begingroup$ I will open an issue in GitHub on this to investigate further. $\endgroup$– merav-aharoniOct 19, 2020 at 6:46
1 Answer
Lines 22-25 are a bit strange. Why do you use i in both nested loops? Can you point out exactly where you see the error? is it in the oracle part only or in the whole program?