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

Fixed MPS save failure when memory limit is ignored #2248

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

gadial
Copy link
Collaborator

@gadial gadial commented Oct 29, 2024

Summary

Fixes a bug preventing MPS runs when the estimated memory usage is too big, even if memory limit is disabled.

Fixes #2246

Details and comments

When max_memory_mb=-1 the maximum memory amount check for MPS should be disabled; however, Executor<state_t>::get_max_parallel_shots still uses the estimated memory in its computation, which might result in the value 0, disabling the run of the engine altogether. To prevent this, get_max_parallel_shots results to the mem==0 case if the maximum memory amount check is disabled.

@gadial
Copy link
Collaborator Author

gadial commented Oct 29, 2024

Should we use this PR to fix the MPS memory usage estimation (here)? I am currently not familiar enough with MPS to see if there's an obvious bug leading to a wrong memory estimation.

@gadial gadial merged commit 5994b77 into Qiskit:main Nov 5, 2024
34 checks passed
@gadial gadial deleted the mps_memory_fix branch November 5, 2024 09:04
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.

Aer fails to save MPS if it estimates (incorrectly) that there is insufficient memory
2 participants