-
Notifications
You must be signed in to change notification settings - Fork 16
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 quir.declare_parameter, quir.load_parameter and generate quir.circuits #100
Conversation
clang-tidy review says "All clean, LGTM! 👍" |
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.
Overall LGTM, just a couple comments here and there.
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.
Overall this looks very good to me, and much further along than I was expecting 😄 🎉.
@@ -238,6 +248,8 @@ QUIRGenQASM3Visitor::reportError(ASTBase const *location, | |||
} | |||
|
|||
void QUIRGenQASM3Visitor::visit(const ASTForStatementNode *node) { | |||
switchCircuit(false, getLocation(node)); |
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've been trying to think of a good way of avoiding the need to repeat switchCircuit
in most methods as this could be brittle. I haven't thought of one yet.
Co-authored-by: Thomas Alexander <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Co-authored-by: Thomas Alexander <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
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, thank you for your changes!
This PR adds two new operations to the QCS dialect,
declare_parameter
andparameter_load
. These operations are used to support input parameters, specifically those defined in QASM asThe PR also updates the
QUIRGenQASM3Visitor
to handle input parameters as well as put real time operations intoquir.circuits
.A command line option
--enable-parameters
is used as a feature flag to gate use of the new features.New tests have been added to check the new features. All existing tests should pass without the new feature flag. Enabling support for the new feature throughout the stack and removing the feature flag is reserved for a future PR.
This PR does not change the handling of gate functions. That is
quir.circuits
are not inserted into the functions generated by QASM3gate h q { }
statements.