diff --git a/src/qrisp/core/quantum_array.py b/src/qrisp/core/quantum_array.py index 732e276e..3fb88337 100644 --- a/src/qrisp/core/quantum_array.py +++ b/src/qrisp/core/quantum_array.py @@ -667,7 +667,7 @@ def __getitem__(self, index): def init_state(self, tuple_list): """ - Method to initiate arbitrary quantum states in this array. The semantics are + Method to initialize arbitrary quantum states in this array. The semantics are similar to the :meth:`QuantumVariable equivalent ` of this method. @@ -676,7 +676,7 @@ def init_state(self, tuple_list): Parameters ---------- tuple_list : list of tuples - The list of tuples describing the quantum state. The first componenet of the + The list of tuples describing the quantum state. The first component of the tuples needs to represent the array and the second the required amplitude. Raises @@ -687,9 +687,10 @@ def init_state(self, tuple_list): Examples -------- - We initiate a quantum state on an array and evaluate the measurement + We initialize a quantum state on an array and evaluate the measurement probabilities. + >>> import numpy as np >>> from qrisp import QuantumArray, QuantumFloat >>> qtype = QuantumFloat(3) >>> q_array = QuantumArray(qtype, shape = 3)