import hiperwalk as hpw
import numpy as np
N = 128
# adjacency matrix of complete graph with self loops
A = np.ones((N, N))
graph = hpw.Graph(A)
qw = hpw.Coined(graph,
shift='flipflop',
coin='G',
marked={'-G': [0]})
t_final = (round(4*np.pi*np.sqrt(N)/4),1)
states = qw.simulate(time=t_final,
state=qw.uniform_state())
marked_prob = qw.success_probability(states)
hpw.plot_success_probability(t_final,
marked_prob,
figsize=(9,3))