-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: Add almost all missing pure quantum ops from pytket to Tk2Op
#430
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #430 +/- ##
==========================================
- Coverage 81.00% 80.33% -0.67%
==========================================
Files 59 59
Lines 5838 5971 +133
Branches 5349 5440 +91
==========================================
+ Hits 4729 4797 +68
- Misses 870 939 +69
+ Partials 239 235 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I'm not sure we want to do this....I wanted to keep the core opset small and rebase in/out as necessary. Most of these ops are only relevant to certain passes. |
RxF64 = auto() | ||
RyF64 = auto() |
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.
This is not related to this PR, but I wonder why we added the "F64" suffix to Rx, Ry and Rz, but not to other operations that have angle parameters (e.g. U1).
(I actually prefer without, for conciseness.)
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.
Yes, I was going to propose dropping the suffix in another PR
Fair enough, I guess we should make different extensions at some point for the more exotic gates. We do have some holes though that we could fix now; Or do you think we should forego symmetry and keep it as minimal as possible? |
Co-authored-by: Alec Edgington <[email protected]>
don't care too much about symmetry, zzphase is a native gate on H-series so convenient to add |
Adds most of the pure gates from https://docs.rs/tket-json-rs/latest/tket_json_rs/optype/enum.OpType.html.
This is still missing some ops:
Barrier
. Related to the previous point.Phase
. I'm not sure if we want an explicit gate for it? We should discuss it first.PhaseGadget
. It's defined in tket-json-rs, but it doesn't appear in the pytket documentation?I added docstrings, but they are missing the unitary definition. We need to add latex rendering to our rustdocs for that (I'll add an issue).
I filled some commutation properties in
Tk2Op::qubit_commutation
, but I'm sure its missing some more.Closes #428