hiperwalk.Coined.probability#
- Coined.probability(states, vertices)[source]#
Computes the sum of probabilities for the specified vertices.
Computes the probability of the walker being located on a vertex within the set of provided vertices, given that the walk is on specified states.
- Parameters:
- states
numpy.ndarray The state(s) used to compute the probability.
statescan be a single state or a list of states.- vertices: list of int
The subset of vertices.
- states
- Returns:
- probabilitiesfloat or
numpy.ndarray - float:
If
statesis a single state.numpy.ndarray:If
statesis a list of states,probabilities[i]is the probability corresponding to thei-th state.
- probabilitiesfloat or
See also
Notes
The probability of finding the walker on vertex \(v\), given the state of the walk \(|\psi \rangle\), is calculated as
\[\begin{split}\sum_{\substack{a\in{\mathcal{A}}\\ \operatorname{tail}(a)=v}} \, \left|{\langle a} | {\psi \rangle}\right|^2,\end{split}\]where \(\mathcal{A}\) denotes the set of arcs.