-
Notifications
You must be signed in to change notification settings - Fork 983
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
Split the Transformers page into Transformers and Custom Transformers #5414
Split the Transformers page into Transformers and Custom Transformers #5414
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -0,0 +1,491 @@ | |||
{ |
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.
nit: Update the links in this header to point to custom_transformers.ipynb
instead of transformers.ipynb
.
Reply via ReviewNB
@@ -0,0 +1,491 @@ | |||
{ |
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.
nit: Replace "Cirq provides primitive and decomposition utilities" with "Cirq provides circuit compilation primitives and gate decomposition utilities"
Reply via ReviewNB
@@ -0,0 +1,491 @@ | |||
{ |
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.
nit:
"Primitives don't necessarily support everything that could go into a cirq.TransformContext
object"
The reason we don't directly take a context object in primitives is:
a) We want users to be able to call the transformer primitives without necessarily creating a transformer that expects a transformer context (for example, if the transformation that they want to do can be expressed in just a single call to cirq.map_operations(circuit, custom_map_func)
.
b) Transformer primitives don't support automated logging, like the cirq transformers do.
Can we reword the sentence to better reflect this?
Reply via ReviewNB
@@ -9,7 +9,7 @@ | |||
}, |
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.
@@ -9,7 +9,7 @@ | |||
}, |
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.
nit: "which composes a couple of the available" --> use few instead of couple, since we are composing more than 2 transformers.
Reply via ReviewNB
@@ -9,7 +9,7 @@ | |||
}, |
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.
nit: cirq.CircuitOperation
instead of cirq.CircuitOperations
nit:
Replace "one of those operations was not very impactful" with "one of the merged connected component was equivalent to the identity operation"
nit:
Replace "without cirq.CircuitOperation
s and with terminal measurements." with "expanding intermediate cirq.CircuitOperation
s and aligning measurements to be terminal measurements".
Reply via ReviewNB
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 % nits
…quantumlib#5414) The existing Transformers page was pretty long, and this seemed like a suitable place to split it. Also added changed some phrasing, added some additional explanations/comments, and changed a couple examples. Also ran a formatter.
The existing Transformers page was pretty long, and this seemed like a suitable place to split it. Also added changed some phrasing, added some additional explanations/comments, and changed a couple examples. Also ran a formatter.