-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Create cirq_google.InternalGate #6194
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
Conversation
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 with some nits.
@maffoo let me know if this makes sense |
Discussed over chat with @NoureldinYosri. I want to be sure we think carefully about how to handle units here, and I actually lean toward putting units in names (e.g. |
@dstrain115 @maffoo concerning the problem of passing units it's a symptom of a larger problem which is that we won't be able to pass values that in themselves are instances of internal classes. adding a suffix to the argument name opens a can of worms for who to say that the gate doesn't have an argument with the modified name and it will be a nightmare to support and maintain. while exposing some internal classes defeats the purpose of this project. The most suitable solution is to support internal classes the same way we support internal gates, that's why I introduced cirq_gate.InternalClass please take another look |
f7f1db3
to
b236df6
Compare
I discarded the last change after talking with @dstrain115 since we won't support units in the first version of this work. |
This is the first step towards porting internal gates to Cirq.