from common import amplify, h_all, mark, probability, zero

ENTRIES = 64  # 64 entrées possibles : 6 qubits
GOOD = 42  # la bonne réponse

print(f"en classique, on teste en moyenne ({ENTRIES} + 1) / 2 = {(ENTRIES + 1) / 2} entrées, environ la moitié")
state = h_all(zero(6))
for rounds in range(1, 10):
    state = amplify(mark(state, GOOD))
    print(f"{rounds} tour(s) : P(bonne réponse) = {probability(state, GOOD)}")
