Skip to content

Commit 998965e

Browse files
authored
Fix miscellaneous trivial typos (#1071)
This PR fixes random typos in the text of about three dozen files. The typos were flagged by `codespell`, which I'm beginning to use in my own pre-commit workflows. This is admittedly trivial stuff, but we may as well fix these silly typos in the source and be done with it. With these out of the way, we'll also be able to address #908 (request for a pre-commit hooks configuration) with a codespell check as one of the hooks.
1 parent 24137df commit 998965e

33 files changed

Lines changed: 46 additions & 46 deletions

.github/workflows/ci-nightly-cirq-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# For testing, this workflow can be invoked manually from the GitHub page at
2020
# https://github.com/tensorflow/quantum/actions/workflows/ci-nightly-cirq-test.yaml
2121
# Clicking the "Run workflow" button there will present a form interface with
22-
# options for overridding some of the parameters for the run.
22+
# options for overriding some of the parameters for the run.
2323

2424
# yamllint disable rule:line-length
2525

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
# 2024-11-30 [mhucka] temporarily turning off leak-tests because it produces
119119
# false positives on GH that we can't immediately address. TODO: if updating
120120
# TFQ to use Clang and the latest TF does not resolve this, find a way to
121-
# skip the handful of failing tests and renable the rest of the msan tests.
121+
# skip the handful of failing tests and re-enable the rest of the msan tests.
122122
#
123123
# leak-tests:
124124
# name: Memory Leak tests

configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ fi
201201

202202
write_bazelrc ""
203203

204-
# The following supressions are for warnings coming from external dependencies.
204+
# The following suppressions are for warnings coming from external dependencies.
205205
# They're most likely inconsequential or false positives. Since we can't fix
206206
# them, we suppress the warnings to reduce noise. Note: single quotes are needed
207207
# for the first two so that the $ anchors are preserved in the .bazelrc file.

release/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ into the upstream repository before proceeding further.
8282

8383
This will update the dependency versions in the file `requirements.txt` to
8484
the latest versions based on `requirements.in`. If this process fails, you
85-
may have to iterate on adjusting the contraints in `requirements.in`
85+
may have to iterate on adjusting the constraints in `requirements.in`
8686
followed by running `generate_requirements.sh` again until it succeeds.
8787

8888
3. If any changes were made to `requirements.in`, check the requirements listed

tensorflow_quantum/core/ops/batch_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def on_job_result(self, job, result):
7373
self._ones[job_id] += parities[1]
7474

7575
def collect(self, sampler):
76-
"""Synchronus collect."""
76+
"""Synchronous collect."""
7777
# See #562, this is a workaround to an event loop issue in the tutorials
7878
# see also:
7979
# https://stackoverflow.com/questions/55409641/asyncio-run-cannot-be-called-from-a-running-event-loop

tensorflow_quantum/core/ops/cirq_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def cirq_sample(programs, symbol_names, symbol_values, num_samples):
437437
symbol labeled 'b' and 1 into the symbol labeled 'c'. Then it would
438438
draw 100 samples from the circuit.
439439
440-
Note: In the case of circuits with varying size, all nonexistant
440+
Note: In the case of circuits with varying size, all nonexistent
441441
samples for a particular circuit are padded with -2.
442442
443443
Args:

tensorflow_quantum/core/ops/cirq_ops_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def test_simulate_state_output_padding(self, op_and_sim, all_n_qubits):
295295
for circuit in circuit_batch:
296296
result = sim.simulate(circuit)
297297

298-
# density matricies should be zero everywhere except for the
298+
# density matrices should be zero everywhere except for the
299299
# top left corner
300300
if isinstance(result, cirq.DensityMatrixTrialResult):
301301
dm = result.final_density_matrix

tensorflow_quantum/core/ops/math_ops/fidelity_op.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def fidelity(programs, symbol_names, symbol_values, other_programs):
7070
`programs`.
7171
symbol_values: `tf.Tensor` of real numbers with shape
7272
[batch_size, n_params] specifying parameter values to resolve
73-
into the circuits specificed by programs, following the ordering
73+
into the circuits specified by programs, following the ordering
7474
dictated by `symbol_names`.
7575
other_programs: `tf.Tensor` of strings with shape [batch_size, n_others]
7676
containing the string representations of the circuits with which to

tensorflow_quantum/core/ops/math_ops/inner_product_grad_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def test_inner_product_grad_inputs(self):
122122
with self.assertRaisesRegex(tf.errors.InvalidArgumentError,
123123
'not found in reference circuit'):
124124
# other_programs tensor has the right type but operates on
125-
# qubits that the reference ciruit doesn't have.
125+
# qubits that the reference circuit doesn't have.
126126
new_qubits = [cirq.GridQubit(5, 5), cirq.GridQubit(9, 9)]
127127
new_circuits, _ = util.random_circuit_resolver_batch(
128128
new_qubits, batch_size)
@@ -134,7 +134,7 @@ def test_inner_product_grad_inputs(self):
134134
with self.assertRaisesRegex(tf.errors.InvalidArgumentError,
135135
'not found in paired circuit'):
136136
# other_programs tensor has the right type but operates on
137-
# qubits that the reference ciruit doesn't have.
137+
# qubits that the reference circuit doesn't have.
138138
new_qubits = cirq.GridQubit.rect(1, n_qubits - 1)
139139
new_circuits, _ = util.random_circuit_resolver_batch(
140140
new_qubits, batch_size)

tensorflow_quantum/core/ops/math_ops/inner_product_op.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _inner_product_grad(programs, symbol_names, symbol_values, other_programs,
4646
`programs`.
4747
symbol_values: `tf.Tensor` of real numbers with shape
4848
[batch_size, n_params] specifying parameter values to resolve
49-
into the circuits specificed by programs, following the ordering
49+
into the circuits specified by programs, following the ordering
5050
dictated by `symbol_names`.
5151
other_programs: `tf.Tensor` of strings with shape [batch_size, n_others]
5252
containing the string representations of the circuits with which to
@@ -122,7 +122,7 @@ def inner_product(programs, symbol_names, symbol_values, other_programs):
122122
`programs`.
123123
symbol_values: `tf.Tensor` of real numbers with shape
124124
[batch_size, n_params] specifying parameter values to resolve
125-
into the circuits specificed by programs, following the ordering
125+
into the circuits specified by programs, following the ordering
126126
dictated by `symbol_names`.
127127
other_programs: `tf.Tensor` of strings with shape [batch_size, n_others]
128128
containing the string representations of the circuits with which to

0 commit comments

Comments
 (0)