import numpy as np
from common import H, basis, cnot, single

prepare = cnot(0, 1, 2) @ single(H, 0, 2)
bell = [prepare @ basis(label) for label in ["00", "01", "10", "11"]]

# Produits scalaires deux à deux : 1 sur la diagonale, 0 ailleurs
gram = np.array([[np.vdot(u, v) for v in bell] for u in bell])
print(np.round(gram.real, 3) + 0.0)
