def create(J, Z, normalization=None): def base(x, k): return np.cos(k * np.arccos(x)) * np.sqrt(2)**(k>0) return operator_from_matrix(Chebyshev, matrix_from_tensor_indices(J, Z, base, normalization))
def create(J, Z, normalization=None): def base(x, k): return lpn_normalized(k, x) # * 1./np.sqrt(2) return operator_from_matrix(Legendre, matrix_from_tensor_indices(J, Z, base, normalization))
def create(J, Z, normalization=None): def base(x, k): return (1./np.sqrt(2))**np.count_nonzero(k==0) * np.cos(np.pi * x * k) return operator_from_matrix(Cos, matrix_from_tensor_indices(J, Z, base, normalization))