Skip to content

Conversation

dabacon
Copy link
Collaborator

@dabacon dabacon commented Jul 1, 2020

Follow up to #3113 to improve the docstrings.

@dabacon dabacon requested a review from smitsanghavi July 1, 2020 23:15
@googlebot googlebot added the cla: yes Makes googlebot stop complaining. label Jul 1, 2020
the ZPowGate is 0, otherwise it produces a normal ControlledGate.
(Note that a CZPowGate is, by definition, a controlled-ZPowGate.)
Returns a `CZPowGate` or a controlled `CZPowGate` when possible.

This comment was marked as resolved.

the CXPowGate is 0, otherwise it produces a normal ControlledGate.
(Note that a CCXPowGate is, by definition, a controlled-CXPowGate.)
Returns a `CCXPowGate` or a controlled `CCXPowGate` when possible.

This comment was marked as resolved.

The `controlled` method of the `Gate` class, of which this class is a
child, returns a `ControlledGate`. This method overrides this behavior
to return a `CXPowGate` or a `ControlledGate` of a `CXPowGate, when
Copy link
Contributor

@balopat balopat Jul 1, 2020

Choose a reason for hiding this comment

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

Suggested change
to return a `CXPowGate` or a `ControlledGate` of a `CXPowGate, when
to return a `CXPowGate` or a `ControlledGate` of a `CXPowGate`, when

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above. Also need to add ` before "," here and below.

If these conditions are met, then the returned object is a `CXPowGate`
or, in the case that there is more than one controlled qudit, a
`ControlledGate` with the `Gate` being a `CXPowGate`. In the

This comment was marked as resolved.

The `controlled` method of the `Gate` class, of which this class is a
child, returns a `ControlledGate`. This method overrides this behavior
to return a `CZPowGate` or a `ControlledGate` of a `CZPowGate`, when

This comment was marked as resolved.

If these conditions are met, then the returned object is a `CCXPowGate`
or, in the case that there is more than one controlled qudit, a
`ControlledGate` with the `Gate` being a `CCXPowGate`. In the

This comment was marked as resolved.

the CZPowGate is 0, otherwise it produces a normal ControlledGate.
(Note that a CCZPowGate is, by definition, a controlled-CZPowGate.)
Returns a `CCZPowGate` or a controlled `CCZPowGate` when possible.

This comment was marked as resolved.

The `controlled` method of the `Gate` class, of which this class is a
child, returns a `ControlledGate`. This method overrides this behavior
to return a `CXPowGate` or a `ControlledGate` of a `CXPowGate, when
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above. Also need to add ` before "," here and below.

@dabacon
Copy link
Collaborator Author

dabacon commented Jul 6, 2020

PTAL. Sorry I missed that you had suggested edits, so did those in my own branch :)

@dabacon dabacon requested a review from balopat July 6, 2020 20:28
@balopat
Copy link
Contributor

balopat commented Jul 6, 2020

PTAL. Sorry I missed that you had suggested edits, so did those in my own branch :)

No worries! I just like to use the suggested edits for typos because it shows the diff better. I don't usually like it to be committed - it creates too many commits, mixes authors, etc.

Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

LGTM

@dabacon
Copy link
Collaborator Author

dabacon commented Jul 6, 2020

@googlebot rescan please

@dabacon dabacon merged commit b37f226 into quantumlib:master Jul 6, 2020
tonybruguier pushed a commit to tonybruguier/Cirq that referenced this pull request Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants