# Exercice 1 : (0,6 ; 0,8) et (0,6 ; -0,8), avant et après h
import numpy as np
from common import h
from qsim.etape1_un_qubit import make_state, probabilities

for b in [0.8, -0.8]:
    state = make_state(0.6, b)
    direct = np.round(probabilities(state), 3)
    after_h = np.round(probabilities(h(state)), 3)
    print(f"b = {b:+.1f}   lecture directe : {direct}   après h : {after_h}")
