From 9afeddeddeda35c9b885550c573e8e18b007bcf5 Mon Sep 17 00:00:00 2001 From: mbeach-aws <85963088+mbeach-aws@users.noreply.github.com> Date: Fri, 25 Nov 2022 13:34:13 -0500 Subject: [PATCH] spelling corrections (#76) --- notebooks/textbook/Deutsch_Jozsa_Algorithm.ipynb | 2 +- .../experimental/algorithms/deutsch_jozsa/deutsch_jozsa.py | 4 ++-- .../experimental/algorithms/grovers_search/grovers_search.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/notebooks/textbook/Deutsch_Jozsa_Algorithm.ipynb b/notebooks/textbook/Deutsch_Jozsa_Algorithm.ipynb index f87cf59a..311ac642 100644 --- a/notebooks/textbook/Deutsch_Jozsa_Algorithm.ipynb +++ b/notebooks/textbook/Deutsch_Jozsa_Algorithm.ipynb @@ -54,7 +54,7 @@ "metadata": {}, "source": [ "\n", - "The initalization function prepares a superposition of all possible input values and the second register is in a superposition of 0 and 1. " + "The initialization function prepares a superposition of all possible input values and the second register is in a superposition of 0 and 1. " ] }, { diff --git a/src/braket/experimental/algorithms/deutsch_jozsa/deutsch_jozsa.py b/src/braket/experimental/algorithms/deutsch_jozsa/deutsch_jozsa.py index 33dacfdd..46334c99 100644 --- a/src/braket/experimental/algorithms/deutsch_jozsa/deutsch_jozsa.py +++ b/src/braket/experimental/algorithms/deutsch_jozsa/deutsch_jozsa.py @@ -27,7 +27,7 @@ def constant_oracle(n_qubits: int) -> Circuit: Circuit: Constant oracle circuit """ if n_qubits < 1: - raise ValueError(f"Number of qubits must be greater than 0. Recieved {n_qubits}") + raise ValueError(f"Number of qubits must be greater than 0. Received {n_qubits}") circ = Circuit().i(range(n_qubits)) rand_output = np.random.randint(0, 2) @@ -48,7 +48,7 @@ def balanced_oracle(n_qubits: int) -> Circuit: Circuit: Balanced oracle circuit """ if n_qubits < 1: - raise ValueError(f"Number of qubits must be greater than 0. Recieved {n_qubits}") + raise ValueError(f"Number of qubits must be greater than 0. Received {n_qubits}") # generate a random array of 0s and 1s to figure out where to place x gates random_num = np.random.randint(2, size=n_qubits) diff --git a/src/braket/experimental/algorithms/grovers_search/grovers_search.py b/src/braket/experimental/algorithms/grovers_search/grovers_search.py index 7543fce3..e8fa6e59 100644 --- a/src/braket/experimental/algorithms/grovers_search/grovers_search.py +++ b/src/braket/experimental/algorithms/grovers_search/grovers_search.py @@ -100,7 +100,7 @@ def multi_control_not_constructor( decompose_ccnot: bool, is_outermost_call: bool = True, ) -> Tuple[Circuit, int]: - """Recusive constructor of a multi-contol Not circuit (generalized Toffoli gate). + """Recursive constructor of a multi-contol Not circuit (generalized Toffoli gate). Ref: https://arxiv.org/abs/1904.01671 Args: