hiperwalk.ContinuousTime.optimal_runtime#

ContinuousTime.optimal_runtime(state=None, step=1)#

Find the optimal running time of a quantum-walk-based search.

This method simulates the use of the set_evolution operator, taking the state as an input for the simulation. It then calculates the success probability for each intermediate state and fits these probabilities to a sine-squared function. The optimal running time corresponds to the point in the domain where the sine-squared function reaches its first peak.

Parameters:
statenumpy.ndarray, default=None

The state initial state for the simulation. If None, uses the uniform state.

step

Step of the simulation range. See range argument in simulate() for details.

Returns:
int or float

The optimal runtime that was found after fitting the sine-squared function. The returned type depends on the quantum walk model.