-
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
Extend qcut.tape_to_graph
to support sampling measurements
#2313
Extend qcut.tape_to_graph
to support sampling measurements
#2313
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2313 +/- ##
=======================================
Coverage 99.32% 99.32%
=======================================
Files 242 242
Lines 19160 19166 +6
=======================================
+ Hits 19031 19037 +6
Misses 129 129
Continue to review full report at Codecov.
|
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 @anthayes92! Looks good, left a few suggestions.
[sc-15861] |
Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.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 @anthayes92. Please resolve the suggestions, but otherwise approved!
Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com>
Context:
Many practical applications of quantum circuits require sampling measurements. Here we begin extending the existing manual circuit cutting pipeline to support sampling measurements.
Description of the Change:
The existing
qcut.tape_to_graph
method has been extended to convert a sampling in the computational basis over all wires in a circuit. The single sampling measurement is converted into distinct nodes in the computational graph; one for each wire.Benefits:
First step toward supporting cutting circuit with sampling measurements.
Possible Drawbacks:
Does not support sample measurements containing observables.Related GitHub Issues:
#2297 sampling with and without observables in a single circuit causes an error. As such, the sample nodes added to the graph contain an explicit projection measurement equivalent to sampling in the computational basis. This is required for later steps in the cutting pipeline when converting subgraphs to fragment tapes.