Skip to content

Commit

Permalink
spelling corrections (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeach-aws authored Nov 25, 2022
1 parent d3388a5 commit 9afedde
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion notebooks/textbook/Deutsch_Jozsa_Algorithm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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. "
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9afedde

Please sign in to comment.