diff --git a/docs/_index.yaml b/docs/_index.yaml
index 1110cd224..94453a822 100644
--- a/docs/_index.yaml
+++ b/docs/_index.yaml
@@ -55,7 +55,7 @@ landing_page:
qubits = [cirq.GridQubit(i,j) for i in range(5) for j in range(5)]
# Define a circuit to run
- # (Example is from the 2019 "Quantum Supremacy" experiement)
+ # (Example is from the 2019 "Quantum Supremacy" experiment)
circuit = (cirq.experiments.
random_rotations_between_grid_interaction_layers_circuit(
qubits=qubits, depth=16))
diff --git a/docs/choose_hw.md b/docs/choose_hw.md
index 53d23e28c..077dbd099 100644
--- a/docs/choose_hw.md
+++ b/docs/choose_hw.md
@@ -65,8 +65,8 @@ noisy simulation, using a phase damping channel (p=0.01). The charts use a log
scale. These benchmarks were all performed using qsim's native GPU and CPU
backends and do not involve sampling bitstrings (i.e. no measure gates).
-
-
+
+
### 4. If using GPUs, select a backend
diff --git a/docs/tutorials/gcp_cpu.md b/docs/tutorials/gcp_cpu.md
index 19c1a6d54..6902167f3 100644
--- a/docs/tutorials/gcp_cpu.md
+++ b/docs/tutorials/gcp_cpu.md
@@ -120,7 +120,7 @@ and run your code.
When your connection is ready, Colab displays a green checkmark beside the
Connected (Local) drop-down menu.
-
+
The code cells in your notebook now execute on your VM instead of your local
computer.
diff --git a/docs/tutorials/qsimcirq_gcp.md b/docs/tutorials/qsimcirq_gcp.md
index 92b924aae..ddd874b46 100644
--- a/docs/tutorials/qsimcirq_gcp.md
+++ b/docs/tutorials/qsimcirq_gcp.md
@@ -63,7 +63,7 @@ To create the VM use the steps in sequence below:
[make a different choice](https://cloud.google.com/compute/docs/regions-zones#available).
* Choose the machine family / series: N2
* Quantum simulation requires powerful processors—the N2, N1, or C2 will work.
- * But if you have your own prefences, other
+ * But if you have your own preferences, other
[machine types](https://cloud.google.com/blog/products/compute/choose-the-right-google-compute-engine-machine-type-for-you)
are available.
diff --git a/jupyter/README.md b/jupyter/README.md
index 1470dd791..07fbc803b 100644
--- a/jupyter/README.md
+++ b/jupyter/README.md
@@ -1,5 +1,5 @@
# Docker container for Jupyter with _Cirq_ and _qsim_
-You can build this container with the standard build commmand.
+You can build this container with the standard build command.
More details on how to use this container can be found [here](../docs/tutorials/qsimcirq_gcp.md).
\ No newline at end of file
diff --git a/lib/channels_cirq.h b/lib/channels_cirq.h
index 473d1d64f..6734881bc 100644
--- a/lib/channels_cirq.h
+++ b/lib/channels_cirq.h
@@ -453,7 +453,7 @@ inline BitFlipChannel bit_flip(double p) {
return BitFlipChannel(p);
}
-} // namesapce Cirq
+} // namespace Cirq
} // namespace qsim
diff --git a/lib/fuser_mqubit.h b/lib/fuser_mqubit.h
index 8bf973919..d30d788ea 100644
--- a/lib/fuser_mqubit.h
+++ b/lib/fuser_mqubit.h
@@ -40,7 +40,7 @@ class MultiQubitGateFuser final : public Fuser {
private:
using Base = Fuser;
- // Auxillary classes and structs.
+ // Auxiliary classes and structs.
// Manages doubly-linked lists.
template
@@ -102,7 +102,7 @@ class MultiQubitGateFuser final : public Fuser {
};
// Possible values for visited in GateF.
- // Note that MakeGateSequence assignes values from kSecond to the number of
+ // Note that MakeGateSequence assigns values from kSecond to the number of
// gates in the sequence plus one, see below.
enum Visited {
kZero = 0, // Start value for matrix gates.
@@ -310,7 +310,7 @@ class MultiQubitGateFuser final : public Fuser {
LinkManager link_manager(max_qubit1 * num_ops);
- // Auxillary data structures.
+ // Auxiliary data structures.
// Sequence of intermediate fused gates.
std::vector gates_seq;
// Gate "lattice".
@@ -365,7 +365,7 @@ class MultiQubitGateFuser final : public Fuser {
return fused_ops;
}
- // Fill in auxillary data structures.
+ // Fill in auxiliary data structures.
if (OpGetAlternative(op)) {
// Measurement gate.
@@ -1247,3 +1247,4 @@ class MultiQubitGateFuser final : public Fuser {
} // namespace qsim
#endif // FUSER_MQUBIT_H_
+
diff --git a/lib/gates_cirq.h b/lib/gates_cirq.h
index 2fc5960aa..644070689 100644
--- a/lib/gates_cirq.h
+++ b/lib/gates_cirq.h
@@ -1631,7 +1631,7 @@ inline schmidt_decomp_type GetSchmidtDecomp(
}
}
-} // namesapce Cirq
+} // namespace Cirq
} // namespace qsim
diff --git a/lib/hybrid.h b/lib/hybrid.h
index 526cdef4e..6e0d77a80 100644
--- a/lib/hybrid.h
+++ b/lib/hybrid.h
@@ -164,7 +164,7 @@ struct HybridSimulator final {
for (const auto& op : ops) {
if (!OpGetAlternative(op)) {
IO::errorf("measurement, controlled or other non-matrix gates "
- "are not suported by qsimh.\n");
+ "are not supported by qsimh.\n");
return false;
}
@@ -218,7 +218,7 @@ struct HybridSimulator final {
}
break;
default:
- IO::errorf("multi-qubit gates are not suported by qsimh.\n");
+ IO::errorf("multi-qubit gates are not supported by qsimh.\n");
return false;
}
}
diff --git a/lib/multiprocess_custatevecex.h b/lib/multiprocess_custatevecex.h
index 4636b461b..98133e6ea 100644
--- a/lib/multiprocess_custatevecex.h
+++ b/lib/multiprocess_custatevecex.h
@@ -134,7 +134,7 @@ struct MultiProcessCuStateVecEx {
}
if (num_acc_global_qubits < num_global_qubits_) {
- IO::errorf("erorr: too few network layers at %s %d.\n",
+ IO::errorf("error: too few network layers at %s %d.\n",
__FILE__, __LINE__);
exit(1);
}
diff --git a/lib/operation_base.h b/lib/operation_base.h
index 6aa1f9cfc..4fa2bf2f8 100644
--- a/lib/operation_base.h
+++ b/lib/operation_base.h
@@ -172,7 +172,7 @@ const T* OpGetAlternative(const Operation& op) {
/**
* Recursively retrieves the time step from a (nested) variant.
* This function traverses the provided `op` (concrete type, pointer,
- * or variant) to access the `time` memeber in the underlying `BaseOperation`.
+ * or variant) to access the `time` member in the underlying `BaseOperation`.
* This function handles recursive `std::variant` structures and can
* transparently dereference pointers (e.g., `std::variant`
* or `std::variant`) to find the target value.
@@ -208,7 +208,7 @@ inline unsigned OpTime(const Operation& op) {
/**
* Recursively retrieves the qubit indices from a (nested) variant.
* This function traverses the provided `op` (concrete type, pointer,
- * or variant) to access the `qubits` memeber in the underlying `BaseOperation`.
+ * or variant) to access the `qubits` member in the underlying `BaseOperation`.
* This function handles recursive `std::variant` structures and can
* transparently dereference pointers (e.g., `std::variant`
* or `std::variant`) to find the target value.
diff --git a/lib/qtrajectory.h b/lib/qtrajectory.h
index 1b6ae2d6f..26c51a188 100644
--- a/lib/qtrajectory.h
+++ b/lib/qtrajectory.h
@@ -68,7 +68,7 @@ class QuantumTrajectorySimulator {
* of circuits with weak noise and without measurements by reusing
* the primary trajectory results. There is an additional condition for
* RunBatch. In this case, the deferred operators after the main loop are
- * still applied for the first occurence of the primary trajectory.
+ * still applied for the first occurrence of the primary trajectory.
* The primary Kraus operators should have the highest sampling
* probabilities to achieve the highest speedup.
*
@@ -361,7 +361,7 @@ class QuantumTrajectorySimulator {
if (r < cp || i == channel.kops.size() - 1) {
// Sample ith Kraus operator if r < cp
// Sample the highest probability Kraus operator if r is greater
- // than the sum of all probablities due to round-off errors.
+ // than the sum of all probabilities due to round-off errors.
uint64_t k = r < cp ? i : max_prob_index;
DeferOps(channel.kops[k].ops, deferred_ops);
diff --git a/lib/simulator.h b/lib/simulator.h
index eff544153..e46f929f3 100644
--- a/lib/simulator.h
+++ b/lib/simulator.h
@@ -26,7 +26,7 @@ namespace qsim {
*/
class SimulatorBase {
protected:
- // The follwoing template parameters are used for functions below.
+ // The following template parameters are used for functions below.
// H - the number of high (target) qubits.
// L - the number of low (target) qubits.
// R - SIMD register width in floats.
diff --git a/lib/statespace_cuda.h b/lib/statespace_cuda.h
index e0f3cfe03..c943aa294 100644
--- a/lib/statespace_cuda.h
+++ b/lib/statespace_cuda.h
@@ -36,7 +36,7 @@ namespace qsim {
/**
* Object containing context and routines for CUDA state-vector manipulations.
* State is a vectorized sequence of 32 real components followed by 32
- * imaginary components. 32 floating numbers can be proccessed in parallel by
+ * imaginary components. 32 floating numbers can be processed in parallel by
* a single warp. It is not recommended to use `GetAmpl` and `SetAmpl`.
*/
template
diff --git a/tests/unitaryspace_avx512_test.cc b/tests/unitaryspace_avx512_test.cc
index 6301ec4db..c60fc8822 100644
--- a/tests/unitaryspace_avx512_test.cc
+++ b/tests/unitaryspace_avx512_test.cc
@@ -37,7 +37,7 @@ TEST(UnitarySpaceAVX512Test, GetEntry) {
TestSetEntry>();
}
-} // namspace
+} // namespace
} // namespace unitary
} // namespace qsim
diff --git a/tests/unitaryspace_avx_test.cc b/tests/unitaryspace_avx_test.cc
index cec1119ef..5475fa87f 100644
--- a/tests/unitaryspace_avx_test.cc
+++ b/tests/unitaryspace_avx_test.cc
@@ -36,7 +36,7 @@ TEST(UnitarySpaceAVXTest, GetEntry) {
TestSetEntry>();
}
-} // namspace
+} // namespace
} // namespace unitary
} // namespace qsim
diff --git a/tests/unitaryspace_basic_test.cc b/tests/unitaryspace_basic_test.cc
index ac8441ec6..02bdab8c9 100644
--- a/tests/unitaryspace_basic_test.cc
+++ b/tests/unitaryspace_basic_test.cc
@@ -36,7 +36,7 @@ TEST(UnitarySpaceBasicTest, GetEntry) {
TestSetEntry>();
}
-} // namspace
+} // namespace
} // namespace unitary
} // namespace qsim
diff --git a/tests/unitaryspace_sse_test.cc b/tests/unitaryspace_sse_test.cc
index ef245f020..fd622804a 100644
--- a/tests/unitaryspace_sse_test.cc
+++ b/tests/unitaryspace_sse_test.cc
@@ -36,7 +36,7 @@ TEST(UnitarySpaceSSETest, GetEntry) {
TestSetEntry>();
}
-} // namspace
+} // namespace
} // namespace unitary
} // namespace qsim