hiperwalk.QuantumWalk.success_probability#
- QuantumWalk.success_probability(states)[source]#
Computes the success probability for the given state(s).
The success probability is the probability of the walker being found in any of the marked vertices. If no vertex is marked, the success probability is 0.
- Parameters:
- states
numpy.ndarray
or list ofnumpy.ndarray
The state(s) used to compute the probability.
states
can be a single state or a list of states.
- 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