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
When one runs the list of quantum circuits with qasm_simulator and fixes the seed by seed_simulator, BasicAer uses the seed all over again, so BasicAer gives the same results.
This affects VQE when grouping is disabled because same quantum circuits are executed. As a result, the eigenvalues by VQE with BasicAer (grouping=False) are likely to be biased.
@dhruvbhq Thank you. But please wait. I'm not sure if my suggestion is the right direction to fix it.
I think that BasicAer should be deprecated in the future (related to #4443), so this issue can be left. But, there may be people who run into the same problem, so I've created an issue.
Information
What is the current behavior?
When one runs the list of quantum circuits with qasm_simulator and fixes the seed by seed_simulator, BasicAer uses the seed all over again, so BasicAer gives the same results.
Steps to reproduce the problem
What is the expected behavior?
The initialization of BasicAer's seed should be done only at the beginning of the job, and all the results should change (like Aer).
Suggested solutions
Move this line
https://github.com/Qiskit/qiskit-terra/blob/a9289c085036002fa864b30edcd0b8ce066ea858/qiskit/providers/basicaer/qasm_simulator.py#L504
to
_run_job
.NOTE: This change has a very large influence. It is expected that almost all Application tests will fail.
The text was updated successfully, but these errors were encountered: