import numpy as np

from common import show

U = np.array([[0.6, 0.8j],
              [0.8j, 0.6]])

# La transposée conjuguée : on échange lignes et colonnes, et on conjugue chaque nombre
U_dagger = U.conj().T
print("U      =", show(U))
print("U†     =", show(U_dagger))

# Pour cette matrice, U† défait U
print("U† @ U =", show(U_dagger @ U))

v = np.array([1, 2j])
print("v            =", show(v))
print("U @ v        =", show(U @ v))
print("U† @ (U @ v) =", show(U_dagger @ (U @ v)))
