import numpy as np

from common import X, Y, Z, circuit_matrix

# Le sandwich « S†, X, S » : S† d'abord, S en dernier
print("S†, X, S égale Y :", np.allclose(circuit_matrix(["S†", "X", "S"]), Y))
# Et l'autre sens
print("S, Y, S† égale X :", np.allclose(circuit_matrix(["S", "Y", "S†"]), X))
# S ne change pas Z
print("S†, Z, S égale Z :", np.allclose(circuit_matrix(["S†", "Z", "S"]), Z))
