PennyLaneAI / pennylane

PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
https://pennylane.ai
Apache License 2.0
2.17k stars 568 forks source link

Add quickstart page on mid-circuit measurements #5870

Closed dwierichs closed 1 week ago

dwierichs commented 1 week ago

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]

github-actions[bot] commented 1 week ago

Hello. You may have forgotten to update the changelog! Please edit doc/releases/changelog-dev.md with:

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.66%. Comparing base (14a0b63) to head (f28f967).

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dwierichs commented 1 week ago

Thanks @mudit2812 for the detailed feedback! :rocket: Regarding the structure, I went for your suggestion, except for the last part (configuring MCMs) being part of the "Simulating MCMs" section.

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.

mudit2812 commented 1 week ago

Couple of weird things are happening: