def adj(self,x): """Returns Hermitian adjoint of a matrix""" assert x.shape[0] == x.shape[1] return np.conjugate(x).T