def print_result(order): """prints the basis for a given order of k""" print('Order:', order) for m in kp.symmetric_hamiltonian(c2y, parity, time_reversal, expr_basis=kp.monomial_basis(order), repr_basis=basis): print(m) print()
def print_result(order): """prints the basis for a given order of k""" print('Order:', order) for m in kp.symmetric_hamiltonian( *symmetry_generators, expr_basis=kp.monomial_basis(order), repr_basis=kp.hermitian_basis(len(orbitals)) ): print(m) print()
kx, ky, kz = sp.symbols('kx, ky, kz') PAULI_VEC = [sp.eye(2), *(sm.msigma(i) for i in range(1, 4))] @pytest.mark.parametrize( 'symmetry_operations,expr_basis,repr_basis,result', [ ( [ sr.SymmetryOperation( rotation_matrix=[[0, 1, 0], [1, 0, 0], [0, 0, 1]], repr_matrix=[[0, 1], [1, 0]], repr_has_cc=False, numeric=False ) ], kp.monomial_basis(0), 'auto', [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [1, 0]])] ), ( [ sr.SymmetryOperation( rotation_matrix=[[0, 1, 0], [1, 0, 0], [0, 0, 1]], repr_matrix=[[0, 1], [1, 0]], repr_has_cc=False, numeric=False ) ], kp.monomial_basis(1), 'auto', [ Matrix([[kx, 0], [0, ky]]), Matrix([[ky, 0], [0, kx]]), Matrix([[0, kx + ky], [kx + ky, 0]]), Matrix([[0, I * kx - I * ky], [-I * kx + I * ky, 0]]),