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 required_memory_mb for MPS and extended stabilizer #1933

Merged
merged 3 commits into from
Sep 12, 2023

Conversation

doichanj
Copy link
Collaborator

@doichanj doichanj commented Sep 8, 2023

Summary

This is the fix for required_memory_mb that returned wrong (larger) memory size for MPS and extended stabilizer.
Fix for issues #1920 , #1921 and #1927

Details and comments

required_memory_mb for MPS returned only initial size and returned size in byte not MB so it was very large. I added size estimator to calculate max bond dimension and now it returns reasonable memory size.
This size estimation only calculates size of tensors from the input operators and it takes ignorable time, but I think it is not good to call this multiple times. Before this fix, required_memory_mb was called from some functions. I changed to call this once at the beginning of simulation.

required_memory_mb for extended stabilizer did not refer to the configurable option extended_stabilizer_approximation_error becuase State::set_config was not called before calling required_memory_mb.
The issue #1921 and #1927 are not resolved as is, but we can decrease required memory size by setting larger extended_stabilizer_approximation_error option.

@doichanj doichanj added stable-backport-potential The issue or PR might be minimal and/or import enough to backport to stable Changelog: Bugfix Include in the Fixed section of the changelog labels Sep 8, 2023
@doichanj doichanj added this to the Aer 0.13.0 milestone Sep 8, 2023
@doichanj doichanj requested a review from hhorii September 8, 2023 07:15
Copy link
Collaborator

@hhorii hhorii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now LGTM.

@hhorii hhorii merged commit 39487db into Qiskit:main Sep 12, 2023
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the Fixed section of the changelog stable-backport-potential The issue or PR might be minimal and/or import enough to backport to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants