Skip to content

Commit cc4f208

Browse files
dstrain115mhuckapavoljuhas
authored
Correct minor typo in BitMaskKeyCondition (#7251)
* Correct minor typo in BitMaskKeyCondition - Noticed it while using the example code. * Fix the same typo in a notebook * Typo - transfomer -> transformer --------- Co-authored-by: Michael Hucka <[email protected]> Co-authored-by: Pavol Juhas <[email protected]>
1 parent b199b21 commit cc4f208

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

cirq-core/cirq/value/condition.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class BitMaskKeyCondition(Condition):
144144
after taking the bitwise and with a bitmask.
145145
146146
Examples:
147-
- BitMaskKeycondition('a') -> a != 0
147+
- BitMaskKeyCondition('a') -> a != 0
148148
- BitMaskKeyCondition('a', bitmask=13) -> (a & 13) != 0
149149
- BitMaskKeyCondition('a', bitmask=13, target_value=9) -> (a & 13) != 9
150150
- BitMaskKeyCondition('a', bitmask=13, target_value=9, equal_target=True) -> (a & 13) == 9

docs/build/classical_control.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
"## Multi-Qubit Measurements and Bit Masks\n",
201201
"\n",
202202
"The `cirq.KeyedCondition` class limited in that it evaluate a simple function `is the value != 0?`. When doing multi-qubit measurement we often need to do more complex function like applying a bitmask before comparison. The class [cirq.BitMaskKeyCondition](https://github.com/quantumlib/Cirq/blob/ebef9bff978f28b032f54eb5f0a2e1cb9ec6464c/cirq-core/cirq/value/condition.py#L140) provides this functionality allowing us to do:\n",
203-
"- `BitMaskKeycondition('a')` $\\rightarrow a \\neq 0$\n",
203+
"- `BitMaskKeyCondition('a')` $\\rightarrow a \\neq 0$\n",
204204
"- `BitMaskKeyCondition('a', bitmask=13)` $\\rightarrow (a \\& 13) \\neq 0$\n",
205205
"- `BitMaskKeyCondition('a', bitmask=13, target_value=9)` $\\rightarrow (a \\& 13) \\neq 9$\n",
206206
"- `BitMaskKeyCondition('a', bitmask=13, target_value=9, equal_target=True)` $\\rightarrow (a \\& 13) = 9$\n",

docs/transform/custom_transformers.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
},
166166
"source": [
167167
"### `cirq.TransformerLogger` and support for automated logging\n",
168-
"The `cirq.TransformerLogger` class is used to log the actions of a transformer on an input circuit. `@cirq.transformer` decorator automatically adds support for logging the initial and final circuits for each transfomer step. "
168+
"The `cirq.TransformerLogger` class is used to log the actions of a transformer on an input circuit. `@cirq.transformer` decorator automatically adds support for logging the initial and final circuits for each transformer step. "
169169
]
170170
},
171171
{

docs/transform/routing_transformer.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"id": "ot9EMHfg0175"
9797
},
9898
"source": [
99-
"## Routing as a `@cirq.transfomer`"
99+
"## Routing as a `@cirq.transformer`"
100100
]
101101
},
102102
{

0 commit comments

Comments
 (0)