Skip to content

Commit 15d2f2e

Browse files
authored
customer_gates.ipynb - minor content cleanup (#5215)
cc @tanujkhattar
1 parent 7a063f1 commit 15d2f2e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/custom_gates.ipynb

+8-8
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,9 @@
485485
},
486486
"source": [
487487
"As mentioned, methods such as `_unitary_` which we have seen are known as \"magic\n",
488-
"methods.\" Much of cirq relies on \"magic methods\", which are methods prefixed with one or\n",
489-
"two underscores and used by cirq's protocols or built-in python methods.\n",
490-
"For instance, python translates `cirq.Z**0.25` into\n",
488+
"methods.\" Much of Cirq relies on \"magic methods\", which are methods prefixed with one or\n",
489+
"two underscores and used by Cirq's protocols or built-in Python methods.\n",
490+
"For instance, Python translates `cirq.Z**0.25` into\n",
491491
"`cirq.Z.__pow__(0.25)`. Other uses are specific to cirq and are found in the\n",
492492
"protocols subdirectory. They are defined below.\n",
493493
"\n",
@@ -502,11 +502,11 @@
502502
"id": "d05fa2e8d1ab"
503503
},
504504
"source": [
505-
"### Standard python magic methods\n",
505+
"### Standard Python magic methods\n",
506506
"\n",
507-
"There are many standard magic methods in python. Here are a few of the most\n",
508-
"important ones used in cirq:\n",
509-
" * `__str__` for user-friendly string output and `__repr__` is the python-friendly string output, meaning that `eval(repr(y))==y` should always be true.\n",
507+
"There are many standard magic methods in Python. Here are a few of the most\n",
508+
"important ones used in Cirq:\n",
509+
" * `__str__` for user-friendly string output and `__repr__` is the Python-friendly string output, meaning that `eval(repr(y))==y` should always be true.\n",
510510
" * `__eq__` and `__hash__` which define whether objects are equal or not. You\n",
511511
" can also use `cirq.value.value_equality` for objects that have a small list\n",
512512
" of sub-values that can be compared for equality.\n",
@@ -552,7 +552,7 @@
552552
"These gates can be understood by the simulator, optimizers, and other code.\n",
553553
"3. All that matters is functional equivalence.\n",
554554
"Don't worry about staying within or reaching a particular gate set; it's too hard to predict what the caller will want. Gate-set-aware decomposition is useful, but *this is not the protocol that does that*.\n",
555-
"Gate-set-aware decomposition may be added in the future, but doesn't exist within Cirq at the moment.\n",
555+
"Instead, use features available in the [transformer API](transform.ipynb#compiling_to_nisq_targets_cirqcompilationtargetgateset).\n",
556556
"\n",
557557
"For example, `cirq.CCZ` decomposes into a series of `cirq.CNOT` and `cirq.T` operations.\n",
558558
"This allows code that doesn't understand three-qubit operation to work with `cirq.CCZ`; by decomposing it into operations they do understand.\n",

0 commit comments

Comments
 (0)