-
Notifications
You must be signed in to change notification settings - Fork 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
Add M and R aliases for cirq.measure and cirq.reset #5993
Conversation
@@ -779,6 +780,10 @@ def reset(qubit: 'cirq.Qid') -> raw_types.Operation: | |||
return ResetChannel(qubit.dimension).on(qubit) | |||
|
|||
|
|||
R = reset | |||
document(R, """Alias for cirq.reset""") |
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 overwrites the reset docstring here.
Perhaps we should just add a note about the R
alias to the reset docstring?
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.
If we want references to cirq.M in the generated docs, we might need to create a wrapper function so it is a different object.
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.
We need to keep the actual docstrings for measure and reset.
Thanks, @pavoljuhas. I fixed the docstrings and added notes there about the new aliases. |
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
Fixes #5992