When there are multiple samples corresponding to the same (minimum) energy and with the same probability, how does qiskit pick the final result?

In my experiments, if I check all samples, I can see there are 32 states all having the minimum energy and the same probability, enter image description here

And the QAOA solver will output results like this, which seems it picks the first one as the final result.

enter image description here

The question is, how is this order decided? and why qiskit chooses the first one as the final result, even other samples have the same energy and probability?

  • 1
    $\begingroup$ Welcome to QCSE! Please post output as text in the markdown codeblock instead of an image so it will be easier to read. Also, include your code if possible. $\endgroup$
    – FDGod
    Mar 6 at 19:00


Your Answer

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

Browse other questions tagged or ask your own question.