-
Notifications
You must be signed in to change notification settings - Fork 0
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(barrier): add support for barrier meta instruction #56
Conversation
Should fix https://github.com/CQCL/phir/issues/53 Requires CQCL/phir#56 Also requires support for barrier instructions in pecos
@@ -243,14 +261,14 @@ class MOp(Op): | |||
|
|||
|
|||
QOp: TypeAlias = MeasOp | SQOp | TQOp | |||
OpType: TypeAlias = FFCall | COp | QOp | MOp | |||
OpType: TypeAlias = FFCall | COp | QOp | MOp | Barrier |
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 required to be able to treat Barrier as, e.g., an op under a conditional. See CQCL/pytket-phir#119
Should fix https://github.com/CQCL/phir/issues/53 Requires CQCL/phir#56 Also requires support for barrier instructions in pecos
Should fix https://github.com/CQCL/phir/issues/53 Requires CQCL/phir#56 Also requires support for barrier instructions in pecos
Normal blocks seem to be working well for me; however, conditional blocks give me a validation error. I am guessing the true and false branches of the if block need to accept "meta" or "block" instructions. |
That's surprising. I have your test included in my PR at https://github.com/CQCL/pytket-phir/pull/118/files#diff-d6e59c872f76d32d22d06c331425ef74680d731ed77c20029e26f5fcfe551491 and I don't see a validation error there. Can you share more what example is failing? |
I am not using pytket-phir but instead testing a PHIR file directly. If I set But doing the same for https://github.com/PECOS-packages/PECOS/blob/fb01d5caab71c743353dac76a22ea60ed64441ef/tests/integration/test_phir.py#L308 leads to a validation error. Maybe the fault it mine, though. |
You were right, the failure is because of the "qparallel" blocks being inside the branches of the conditional. "meta" (really "barrier" only) is already included as part of |
@qciaran if you try again, it should pass. Thanks for pointing this issue out even though it was unrelated to the "barrier" instruction. |
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.
Works for me.
Also updates some deps.