hiperwalk.QuantumWalk.probability#
- QuantumWalk.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.
states
can 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
states
is a single state.numpy.ndarray
:If
states
is a list of states,probabilities[i]
is the probability corresponding to thei
-th state.
- probabilitiesfloat or
See also