-
Notifications
You must be signed in to change notification settings - Fork 2
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(phirgen): add support for ZERO/ONE nullary ops #180
Conversation
} | ||
assert phir["ops"][10]["condition"] == { | ||
"cop": "==", | ||
"args": [["tk_SCRATCH_BIT", 1], 1], # evals to False |
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.
@cqc-alec I wanted to double check, is this the correct interpretation of how conditioning with ZERO
works?
I saw pytket returning the following commands for above test:
Comment(c='tk_SCRATCH_BIT[0] = (1)'),
Comment(c='tk_SCRATCH_BIT[1] = (0)'),
Comment(c='IF ([tk_SCRATCH_BIT[0]] == 1) THEN H q[0];'),
Comment(c='IF ([tk_SCRATCH_BIT[1]] == 1) THEN H q[0];'),
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.
I think that's correct.
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.
LGTM. Have you checked that the generated PHIR works with PECOS?
} | ||
assert phir["ops"][10]["condition"] == { | ||
"cop": "==", | ||
"args": [["tk_SCRATCH_BIT", 1], 1], # evals to False |
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.
I think that's correct.
Not yet, let me try that today. EDIT: Done, all clear. |
Description
Fixes #178
Type of change
Checklist