import numpy as np


def is_product(state):
    p, q, r, s = state
    return bool(np.isclose(p * s, q * r))


states = {
    "|01⟩": np.array([0, 1, 0, 0]),
    "(|00⟩ + |01⟩)/√2": np.array([1, 1, 0, 0]) / np.sqrt(2),
    "(|01⟩ + |10⟩)/√2": np.array([0, 1, 1, 0]) / np.sqrt(2),
    "(|00⟩ + |01⟩ + |10⟩ + |11⟩)/2": np.array([1, 1, 1, 1]) / 2,
    "(|00⟩ + |01⟩ + |10⟩ − |11⟩)/2": np.array([1, 1, 1, -1]) / 2,
}
for name, state in states.items():
    print(f"{name:<32}", "produit" if is_product(state) else "intriqué")
