my_list = [1,2,3 ,4,5, 6,8,8,3,23,7,75,54,3]

def my_oracle(my_input):
    winner=7
    if my_input is winner:
        response = True
    else:
        response = False
    return response
    

for index, trial_number in enumerate(my_list):
    if my_oracle(trial_number) is True:
        print('Winner found at index :%i'%index)
        print('%i calls to the Oracle used'%(index+1))
        break
        

from qiskit import *
from qiskit.qiskit_aer import Aer
from qiskit import QuantumCircuit
import matplotlib.pyplot as plt
import numpy as np

oracle = QuantumCircuit(2, name='oracle')
oracle.cz(0,1)
oracle.to_gate()
oracle.draw(output='mpl')

backend = Aer.get_backend('statevector_simulator')
grover_circ = QuantumCircuit(2,2)
grover_circ.h(0)
grover_circ.append(oracle,[0,1])
grover_circ.draw(output='mpl')

job = execute(grover_circ, backend)
result = job.result()

sv = result.get_statevector()
np.arount(sv, 2)