Skip to content
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

with_probability docstring #5697

Merged
merged 5 commits into from Jul 9, 2022
Merged

with_probability docstring #5697

merged 5 commits into from Jul 9, 2022

Conversation

95-martin-orion
Copy link
Collaborator

@95-martin-orion 95-martin-orion commented Jul 8, 2022

Adds a docstring for Operation.with_probability.

@95-martin-orion 95-martin-orion requested review from a team, vtomole and cduck as code owners July 8, 2022 21:17
@CirqBot CirqBot added the size: S 10< lines changed <50 label Jul 8, 2022
@95-martin-orion
Copy link
Collaborator Author

Replaced with what appears to be the "canonical" docstring from Gate.with_probability.

"""Creates a probabalistic channel with this operation.

Args:
probability: floating value between 0 and 1, giving the probability
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: floating value -> floating point value

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, also for Gate.with_probability.

@dabacon dabacon added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jul 9, 2022
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jul 9, 2022
@CirqBot CirqBot merged commit 178869c into master Jul 9, 2022
@CirqBot CirqBot removed the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jul 9, 2022
@CirqBot CirqBot deleted the with-prob-doc branch July 9, 2022 00:47
@CirqBot CirqBot removed the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jul 9, 2022
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
Adds a docstring for `Operation.with_probability`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants