Make qsymm work with non-Hermitian Hamiltonians
Making qsymm work with non-Hermitian Hamiltonians can be achieved by a few relatively simple steps:
-
Modelalready works with non-Hermitian Hamiltonians. All symbols are assumed real (this we should clarify in the docstring), but it is still possible to express an arbitrary Hamiltonian family by separating the Hermitian and anti-Hermitian parts. -
The symmetry finder doesn't rely on any assumption about the input being Hermitian as far as I know, and should work as is. We should still review the code with this in mind and write some tests. To be clear, we do not allow non-Hermitian conserved quantities or non-(anti)unitary discrete (anti)symmetries, because this would require dealing with non-compact Lie-algebras, which is hard.
-
We should add a
transposeattribute toPointGroupElements to signal that the transformed operator is also transposed, which requires amending theapplymethod. This will allow declaring hermiticity-like constraints as symmetries by settingconjugate=Trueandtranspose=True. Should provide a constructorhermiticityfor convenience. The symmetry finder should work to find such symmetries if they are provided incandidates(this is not completely obvious, should think more and test it). -
The Hamiltonian generator now only produces Hermitian Hamiltonians. We could add a
hermitianflag that controls whether the result is made Hermitian. This requires changing the basis the Hamiltonian terms are generated from to a full matrix basis from the current Hermitian matrix basis incontinuum generator, the same in the onsites inbloch_generatorand skipping the Hermitian symmetrization for the hoppings. Withhermitian=Falseand some hermiticity-like symmetries provided insymmetrieseverything should work the same.