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
Feature/implement probability mp.process counts #4943 #4952
Feature/implement probability mp.process counts #4943 #4952
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4952 +/- ##
==========================================
+ Coverage 99.50% 99.67% +0.16%
==========================================
Files 390 392 +2
Lines 35585 35288 -297
==========================================
- Hits 35409 35173 -236
+ Misses 176 115 -61 ☔ View full report in Codecov by Sentry. |
…P.process_counts-#4943
As I mentioned above, I have a few elementary questions for you:
If you want to test the code and don't want to write something from scratch, I leave you a very basic snippet I used during some of my tests. I wish you all the best once again!
|
…atus to be reported')
Adding my name to list of contributors
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.
Sorry about the delay in getting back to you.
This is looking good 🎉
I left two minor comments, but other than that, this is exactly what I was looking for.
Commit suggestion from Christina (removing specification about the internal assignment) Co-authored-by: Christina Lee <chrissie.c.l@gmail.com>
Hi @albi3ro and @mudit2812. Thank you so much for your review and your time!
No worries, I didn't want to bother you with reminders (especially during Christmas time)
Thank you, Christina! I pushed a commit with your suggestion and removed the asserts as you both suggested. If you are not ready to approve the PR, please tell me if there's something else you want me to modify. Merry Christmas to both of you, as well as to everyone else on the team! |
Regarding the test failure showing up right now. It's unrelated to your PR @PietropaoloFrisoni and there's no need to worry about it. The test validates a finite-shots workflow where the results are non-deterministic. I will resolve this in a different PR. In the mean time, you can re-run CI without having to make new changes by running |
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.
These changes look good to me. I'm happy to approve once CI is passing.
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.
Congratulations @PietropaoloFrisoni ! Everything is passing, and the changes look good to me. Happy to get this in.
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.
Looks great!
I hope you've enjoyed the process and the change to learn a little about pennylane 🎉
### Pull request - issue #4943 **Context: This pull request implements the new feature described in issue #4943 (internal assignment).** **Description of the Change:** Implemented the method `process_counts` in the `ProbabilityMP` class to compute a probability measurement from a counts dictionary. **Benefits:** Representation of store sampling information in the form of a dictionary counts is much more condensed and memory efficient. **Possible Drawbacks:** The new method should reproduce the results of `process_samples`, implemented in the same class. It has been tested extensively, although I still need to become an expert in quantum computing and circuits. The function checks that the provided sampling information is a dictionary matching the format returned by `CountsMP`. **Related GitHub Issues:** #4943 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- **Further details:** First of all, congratulations on the library and your fantastic work! I had the time to explore and play with the code, which is quite amazing. I hope to be considered worthy and help you maintain, expand, and improve it. I am confident you have improvements and interesting suggestions regarding my pull request. I left some questions for you below as a comment on this PR. Since this is an internal assignment (for which I was given a deadline), I include some information below that might be relevant for your evaluation (time zone: GMT-5): - *Start time:* December 15th, 9:07 AM - *Marked as ready for review on:* December 18th, 3:53 AM - *End time:* TBD - *Deadline:* December 29th, 9:07 AM I am incredibly grateful for your time, and I hope to learn so much from all of you! I wish you all the best. --------- Co-authored-by: Christina Lee <chrissie.c.l@gmail.com>
Pull request - issue #4943
Context: This pull request implements the new feature described in issue #4943 (internal assignment).
Description of the Change:
Implemented the method
process_counts
in theProbabilityMP
class to compute a probability measurement from a counts dictionary.Benefits:
Representation of store sampling information in the form of a dictionary counts is much more condensed and memory efficient.
Possible Drawbacks:
The new method should reproduce the results of
process_samples
, implemented in the same class. It has been tested extensively, although I still need to become an expert in quantum computing and circuits.The function checks that the provided sampling information is a dictionary matching the format returned by
CountsMP
.Related GitHub Issues:
#4943
Further details:
First of all, congratulations on the library and your fantastic work!
I had the time to explore and play with the code, which is quite amazing. I hope to be considered worthy and help you maintain, expand, and improve it.
I am confident you have improvements and interesting suggestions regarding my pull request. I left some questions for you below as a comment on this PR.
Since this is an internal assignment (for which I was given a deadline), I include some information below that might be relevant for your evaluation (time zone: GMT-5):
I am incredibly grateful for your time, and I hope to learn so much from all of you!
I wish you all the best.