Symmetry finder and symmetric Hamiltonian generator
qsymm is an open-source Python library that makes symmetry analysis simple.
It automatically generates model Hamiltonians from symmetry constraints and finds the full symmetry group of your Hamiltonian.
Check out the introductory tutorial to see examples of how to use
The two core concepts in
qsymm are Hamiltonian families (Hamiltonians that may depend on
free parameters) and symmetries. We provide powerful classes to handle these:
Modelis used to store symbolic Hamiltonians that may depend on momenta and other free parameters. We use
sympyfor symbolic manipulation, but our implementation utilizes
numpyarrays for efficient calculations with matrix valued functions.
ContinuousGroupGeneratorare used to store symmetry operators. Besides the ability to combine symmetries, they can also be applied to a
Modelto transform it.
We implement algorithms that form a two-way connection between Hamiltonian families and symmetries.
Symmetry finding is handled by
symmetries, it takes a
Modelas input and finds all of its symmetries, including conserved quantities, time reversal, particle-hole, and spatial rotation symmetries. See the symmetry finder tutorial and the kekule tutorial for detailed examples.
bloch_familyare used to generate k.p or lattice Hamiltonians from symmetry constraints. See the k-dot-p generator tutorial, the Bloch generator tutorial and the kekule tutorial for detailed examples.
qsymm works with Python 3.5 and is available on PyPI:
pip install qsymm
Some of the example notebooks also require Kwant.