0
$\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$
  • $\begingroup$ I will open an issue in GitHub on this to investigate further. $\endgroup$ – merav-aharoni Oct 19 at 6:46
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?

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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