-
Notifications
You must be signed in to change notification settings - Fork 603
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
Add quickstart page on mid-circuit measurements #5870
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5870 +/- ##
==========================================
- Coverage 99.67% 99.66% -0.01%
==========================================
Files 422 422
Lines 40658 40362 -296
==========================================
- Hits 40525 40228 -297
- Misses 133 134 +1 ☔ 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.
Some suggestions, but otherwise looks good to me. Thanks @dwierichs .
Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com>
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.
Thanks a lot @dwierichs . I'm quite happy with this overall. I left a bunch of suggestions. One thought I had while reviewing this is to potentially reorganize the sections. The first 4 sections are really about "what features are available and how to use them", and the next 4 sections are about "simulating MCMs", and maybe it's worth organizing the doc as such. Example hierarchy below
Mid-circuit measurements in PennyLane: info about `qml.measure`
- Qubit reuse/reset
- Conditional operations
- Postselection
- Collecting MCM statistics
Simulation of MCMs: mostly the same as this section is currently
- deferred measurements
- one-shot
- tree traversal
Configuring MCMs: as it is currently
Another suggestion (though I would really like @trbromley 's input here) is to avoid applying the transforms themselves to the qnodes in the examples, as I believe we want to start using mcm_method
. We can probably still say that the transforms are available to apply directly to tapes, but that qnodes should request specific configurations using mcm_method
rather than decorators.
Thanks @mudit2812 for the detailed feedback! 🚀 Regarding applying transforms vs QNode config, I would suggest that for now we do not explicitly discourage users from using the transforms, but we do so implicitly by advertising the config path in the examples. |
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.
Thanks @dwierichs, this is looking great! I've left a few comments.
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.
Thanks @dwierichs . Once again this looks really good. I'm quite happy with the content of the doc, and am happy to approve once the remaining (small) comments are resolved, with the only blocking comment being the note about defer_measurements
differentiability 😄
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 good. Mostly non-blocking comments. Happy to approve :)
**Context:** The PennyLane documentation has a quickstart page on measurements, which includes a large section about mid-circuit measurements. With the focus on dynamic circuits and mid-circuit measurements more generally, we would like to make the content on MCMs more visible. **Description of the Change:** Extracts the MCM part of the measurements quickstart and adds it as its own quickstart page. Adds some details on simulation techniques and polishes the content. **Benefits:** Visibility, documentation extent for MCMs **Possible Drawbacks:** **Related GitHub Issues:** [sc-65318] --------- Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com>
Context:
The PennyLane documentation has a quickstart page on measurements, which includes a large section about mid-circuit measurements.
With the focus on dynamic circuits and mid-circuit measurements more generally, we would like to make the content on MCMs more visible.
Description of the Change:
Extracts the MCM part of the measurements quickstart and adds it as its own quickstart page.
Adds some details on simulation techniques and polishes the content.
Benefits:
Visibility, documentation extent for MCMs
Possible Drawbacks:
Related GitHub Issues:
[sc-65318]