3
$\begingroup$

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. enter image description here

enter image description here enter image description here

$\endgroup$
1
  • $\begingroup$ I will open an issue in GitHub on this to investigate further. $\endgroup$ Oct 19, 2020 at 6:46

1 Answer 1

0
$\begingroup$

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?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.