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
PointGroupElements to signal that the transformed operator is also transposed, which requires amending the
applymethod. This will allow declaring hermiticity-like constraints as symmetries by setting
transpose=True. Should provide a constructor
hermiticityfor convenience. The symmetry finder should work to find such symmetries if they are provided in
candidates(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 in
continuum generator, the same in the onsites in
bloch_generatorand skipping the Hermitian symmetrization for the hoppings. With
hermitian=Falseand some hermiticity-like symmetries provided in
symmetrieseverything should work the same.