-
Notifications
You must be signed in to change notification settings - Fork 11
fix: Don't rely on command params for pytket barriers #1298
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1298 +/- ##
==========================================
+ Coverage 79.57% 79.60% +0.02%
==========================================
Files 160 160
Lines 20578 20601 +23
Branches 19612 19635 +23
==========================================
+ Hits 16375 16399 +24
+ Misses 3222 3221 -1
Partials 981 981
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
78235ac to
062517f
Compare
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.
Here is the main change, the payloads now include the input_params, and we read that field when decoding.
doug-q
left a comment
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.
Great!
| #[case::false_branch("false_branch", Some(vec![ | ||
| ("TKET1.tk1op", 1), ("tket.quantum.H", 1), ("tket.quantum.QAlloc", 1), ("tket.quantum.MeasureFree", 1) | ||
| ]))] | ||
| #[should_panic = "xfail"] |
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.
Is this new test case related to the rest of the patch? I don't see how.
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.
Ah, the test wasn't actually generating parametric barriers.
I added a qubit parameter to func2 in the guppy program, so now the call gets encoded as a barrier on a qubit with a rotation parameter.
|
This PR contains breaking changes to the public Rust API. cargo-semver-checks summary |
Fixes #1297
Depends on #1295
We now store the subgraph input parameters in the payload, since pytket may remove values from the
paramsfield of a barrier command.BREAKING CHANGE: Added input_parameter fields to
OpaqueSubgraphPayload