hiperwalk.Coined.probability_distribution#

Coined.probability_distribution(states)[source]#

Compute the probability distribution of given state(s).

The probability of the walker being found on each vertex for the given state(s).

Parameters:
statesnumpy.ndarray

The state(s) used to compute the probabilities. It may be a single state or a list of states.

Returns:
probabilitiesnumpy.ndarray

If states is a single state, probabilities[v] is the probability of the walker being found on vertex v.

If states is a list of states, probabilities[i][v] is the probability of the walker beign found at vertex v in states[i].

Notes

The probability for a given vertex \(u\) is calculated as the sum of the absolute squares of the amplitudes of the arcs originating from \(u\). More precisely, if the state of the walker is

\[\sum_{(v, w) \in \mathcal{A}(\vec G)} \alpha_{v,w} \ket{v,w},\]

where \(\mathcal{A}(\vec G)\) is the set of arcs of the symmetric directed graph formed by replacing each edge in \(G\) with two arcs, one for each direction, then the probability associated with vertex \(u\) is given by

\[\sum_{v \in N(u)}|\alpha_{u, v}|^2,\]

with \(N(u)\) being the set of out neighbors of \(u\). A loop at \(u\) is the arc \((u,u)\).

The probability distribution, which is returned by this method as a numpy.ndarray, is the collection of these probabilities for all vertices.