Skip to content

Commit

Permalink
Minor updates documentation init_state for QuantumArray
Browse files Browse the repository at this point in the history
  • Loading branch information
renezander90 committed Dec 19, 2024
1 parent f098287 commit 439c472
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/qrisp/core/quantum_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
<qrisp.QuantumVariable.init_state>` of this method.
Expand All @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 439c472

Please sign in to comment.