hiperwalk.QuantumWalk.probability_distribution#
- QuantumWalk.probability_distribution(states)[source]#
Compute the probability distribution of the given state(s).
The probability distribution is determined by the state of the walk. It describes the likelihood of the walker being located at each vertex for the specified state(s).
- Parameters:
- states
numpy.ndarray
The state(s) used to compute the probabilities. It may be a single state or a list of states.
- states
- Returns:
- probabilities
numpy.ndarray
If
states
is a single state,probabilities[v]
is the probability of the walker being found on vertexv
.If
states
is a list of states,probabilities[i][v]
is the probability of the walker beign found at vertexv
instates[i]
.
- probabilities
See also
Notes
If the Hilbert space is spanned by the set of vertices, the probability of finding the walker on a given vertex is the absolute square of its amplitude. That is, for an arbitrary superposition
\[\sum_{v \in V} \alpha_v \ket{v},\]the probability associated with vertex \(v\) is \(|\alpha_v|^2\). The calculation of the probability depends on the specifics of the quantum walk model when the Hilbert space is not spanned by the set of vertices.