-
Notifications
You must be signed in to change notification settings - Fork 368
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
MPS: Added thresholds to loops that use parallelization #638
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to see that we have fixed the performance degradation!
So a comment in general, there's no need for commenting code, we can safely remove it because we can always go back in git history and see the old code.
Could you remove all commented code that you see in the MPS simulator?
Thanks!!
src/simulators/matrix_product_state/matrix_product_state_internal.cpp
Outdated
Show resolved
Hide resolved
src/simulators/matrix_product_state/matrix_product_state_internal.cpp
Outdated
Show resolved
Hide resolved
src/simulators/matrix_product_state/matrix_product_state_internal.hpp
Outdated
Show resolved
Hide resolved
src/simulators/matrix_product_state/matrix_product_state_tensor.hpp
Outdated
Show resolved
Hide resolved
…skit-aer into parallelization
* Adding conditions on invoking parallelization (cherry picked from commit 7fb9147)
* Adding conditions on invoking parallelization
Summary
Parallelization on for-loops without a threshold caused a severe deterioration of performance in MPS. I added reasonable thresholds that bring the performance back to the previous values. Determining the optimal values should be done in future work, but for now this is good enough.
Details and comments
It would be great to include this in the current release because it dramatically affects performance of MPS. This closes issue #619.