Skip to content

Commit

Permalink
Fix common typos (#6403)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstrain115 authored Jan 9, 2024
1 parent 9e86d36 commit aa57be5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cirq-core/cirq/testing/circuit_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def assert_circuits_have_same_unitary_given_final_permutation(
expected: circuits.AbstractCircuit,
qubit_map: Dict[ops.Qid, ops.Qid],
) -> None:
"""Asserts two circuits have the same unitary up to a final permuation of qubits.
"""Asserts two circuits have the same unitary up to a final permutation of qubits.
Args:
actual: A circuit computed by some code under test.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def map_clean_and_borrowable_qubits(
inserting all mapped operations in a resulting circuit using EARLIEST strategy. The reason
is that preserving moment structure forces additional constraints on the qubit allocation
strategy (i.e. if two operations `op1` and `op2` are in the same moment, then we cannot
reuse ancilla across `op1` and `op2`). We leave it upto the user to force such constraints
reuse ancilla across `op1` and `op2`). We leave it up to the user to force such constraints
using the qubit manager instead of making it part of the transformer.
3. However, for borrowable system qubits managed by the transformer, we do not reuse qubits
within the same moment.
Expand Down
2 changes: 1 addition & 1 deletion cirq-ft/cirq_ft/algos/state_preparation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_state_preparation_via_coherent_alias_sampling(num_sites, epsilon):
assert all(np.abs(prepared_state[:L]) > 1e-6) and all(np.abs(prepared_state[L:]) <= 1e-6)
prepared_state = prepared_state[:L] / np.sqrt(num_non_zero[:L])
# Assert that the absolute square of prepared state (probabilities instead of amplitudes) is
# same as `lcu_coefficients` upto `epsilon`.
# same as `lcu_coefficients` up to `epsilon`.
np.testing.assert_allclose(lcu_coefficients, abs(prepared_state) ** 2, atol=epsilon)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def get_mtls_endpoint_and_cert_source(cls, client_options: Optional[ClientOption
The API endpoint is determined in the following order:
(1) if `client_options.api_endpoint` if provided, use the provided one.
(2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the
default mTLS endpoint; if the environment variabel is "never", use the default API
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def get_mtls_endpoint_and_cert_source(cls, client_options: Optional[client_optio
The API endpoint is determined in the following order:
(1) if `client_options.api_endpoint` if provided, use the provided one.
(2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the
default mTLS endpoint; if the environment variabel is "never", use the default API
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
Expand Down
2 changes: 1 addition & 1 deletion docs/google/best_practices.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"id": "35ed540d7845"
},
"source": [
"### Using built-in tranformers as a first pass\n",
"### Using built-in transformers as a first pass\n",
"\n",
"Using built-in transformers will allow you to compile to the correct gate set. As they are\n",
"automated solutions, they will not always perform as well as a hand-crafted solution, but\n",
Expand Down

0 comments on commit aa57be5

Please sign in to comment.