-
Notifications
You must be signed in to change notification settings - Fork 65
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
Parallelize classical value in nonlocal games #876
Parallelize classical value in nonlocal games #876
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #876 +/- ##
======================================
Coverage 97.9% 97.9%
======================================
Files 165 165
Lines 3253 3262 +9
Branches 713 714 +1
======================================
+ Hits 3185 3194 +9
Misses 44 44
Partials 24 24 ☔ View full report in Codecov by Sentry. |
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.
Cool! Nice work, @Shivansh20128 ! I've added a few comments and also tagged @purva-thakre to review as well.
Out of curiosity, is there any indication as to how much faster the parallel version is compared to the single-core version?
For this function, my answer would be no. But I used |
Interesting. I would have expected that the total time would have been subdivided by the number of cores on the machine, but perhaps 80 percent or so of the time is spent on the non parallelized parts of the process. Still, since it's faster and not much boilerplate for that boost, I'll still consider that a win! |
Thanks for your recent adaptations to the code, @Shivansh20128 ! This LGTM, but I'll defer to @purva-thakre for the final word. Thank you again for your contributions! |
Thanks again, @Shivansh20128 ! |
Description
Adding parallelism using
multiprocessing
python library. Added a new functionprocess_iteration
that provides reusability of code. the parallelization is done whennum_alice_outputs**num_bob_inputs
is more than 1000.#Resolves #12
Changes
Checklist
Before marking your PR ready for review, make sure you checked the following locally. If this is your first PR, you might be notified of some workflow failures after a maintainer has approved the workflow jobs to be run on your PR.
Additional information is available in the documentation.
ruff
for errors related to code style and formatting.pytest
.Sphinx
build can be checked locally for any failures related to your PRlinkcheck
to check for broken links in the documentationdoctest
to verify the examples in the function docstrings work as expected.