-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add Expr
support to ControlFlowOp
representation
#10358
Add Expr
support to ControlFlowOp
representation
#10358
Conversation
One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 5552067812
💛 - Coveralls |
cdc231b
to
d0a2bea
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.
Very straightforward. These changes include #10332, so once that merges, this one is good to go too (after a rebase/merge).
I like how you were able to reuse a lot of the existing testing, and the integration points to enable expressions in the conditions and switch target are a lot more minimal than I was expecting!
This commit allows `IfElseOp` and `WhileLoopOp` to have a `condition` that is an `Expr` typed `Bool()`, and `SwitchCaseOp` to have a `target` that is an `Expr`. It does not fully add support to resolving these new allowed values into the control-flow builder interface (that will come later).
d0a2bea
to
88595a5
Compare
Now rebased on top of |
Summary
This commit allows
IfElseOp
andWhileLoopOp
to have acondition
that is anExpr
typedBool()
, andSwitchCaseOp
to have atarget
that is anExpr
. It does not fully add support to resolving these new allowed values into the control-flow builder interface (that will come later).Details and comments
Close #10224.
Depends on #10332. Same consideration about release note.
Originally I was doing the control-flow builder interface as part of this commit as well since there's very little additional work needed to make that work. In practice, though, being able to test the builder interface requires a bunch of the
DAGCircuit
-related bits to be working as well, so I've split it off.