import numpy as np

# CNOT : contrôle = qubit 0 (à gauche), cible = qubit 1
CNOT = np.array([[1, 0, 0, 0],
                 [0, 1, 0, 0],
                 [0, 0, 0, 1],
                 [0, 0, 1, 0]])

labels = ["00", "01", "10", "11"]
for index, label in enumerate(labels):
    basis = np.zeros(4)
    basis[index] = 1
    out = CNOT @ basis
    print(label, "->", labels[int(np.argmax(out))])
