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/2258 #2297

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

Conversation

aromanro
Copy link
Contributor

Summary

Calling AerState::probability throws an exception with the message "Save amplitude square must be defined on full width of qubits."

Details and comments

Issue: #2258

The fix is having AerState::probability fill the op.qubits with the list of qubits:

  for (uint_t i = 0; i < num_of_qubits_; ++i)
    op.qubits.push_back(i);

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