Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for https://github.com/Qiskit/qiskit-aer/issues/2235 #2239

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

aromanro
Copy link
Contributor

AerState::probability and AerState::amplitude calls for a MPS simulator return the wrong ordering for states

Summary

The MPS simulator returned the wrong states amplitudes and probabilities with AerState::probability and AerState::amplitude calls.

Details and comments

The values were correct, but for the wrong states, the reason being the order of qubits.
The fix is by adding a function reorder_qubits_rev that provides the correct order of qubits and by modifying MPS::get_amplitude_vector to call it instead of the original call to reorder_qubits.

More details on the issue description and in the comments: #2235

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant