Skip to content

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