-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Use a Protocol for TRANSFORMER to ensure common arg names #4871
Conversation
Also cleans up some of the internals of the transformer decorator and simplifies the types. Follow-up to #4797
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 % minor nits.
This looks great, but I have so many doubts regarding why this working!
Kudos for the amazing cleanup btw!
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.
Thanks for the cleanup -- this was a nice strategy to preserve types only in the decorator definition and omit type annotations in the implementation.
…#4871) * Use a Protocol for TRANSFORMER to ensure common arg names Also cleans up some of the internals of the transformer decorator and simplifies the types. Follow-up to quantumlib#4797 * Fix Protocol import for 3.7 * Fixes from review * Add type annotations in transformer implementation Co-authored-by: Tanuj Khattar <[email protected]>
…#4871) * Use a Protocol for TRANSFORMER to ensure common arg names Also cleans up some of the internals of the transformer decorator and simplifies the types. Follow-up to quantumlib#4797 * Fix Protocol import for 3.7 * Fixes from review * Add type annotations in transformer implementation Co-authored-by: Tanuj Khattar <[email protected]>
Also cleans up some of the internals of the transformer decorator by inlining the implementations and simplifies the types.
Follow-up to #4797