kwant.qsymm
– Integration with Qsymm¶kwant.qsymm.
builder_to_model
(syst, momenta=None, real_space=True, params=None)[source]¶Make a qsymm.BlochModel out of a Builder
.
Builder
May have translational symmetries.
Names of momentum variables. If None, ‘k_x’, ‘k_y’, … is used.
If False, use the unit cell convention for Bloch basis, the
exponential has the difference in the unit cell coordinates and
k is expressed in the reciprocal lattice basis. This is consistent
with kwant.wraparound
.
If True, the difference in the real space coordinates is used
and k is given in an absolute basis.
Only the default choice guarantees that qsymm is able to find
nonsymmorphic symmetries.
Dictionary of parameter names and their values; used when evaluating the Hamiltonian matrix elements.
Model representing the tight-binding Hamiltonian.
Notes
The sites in the the builder are in lexicographical order, i.e. ordered first by their family and then by their tag. This is the same ordering that is used in finalized kwant systems.
kwant.qsymm.
find_builder_symmetries
(builder, momenta=None, params=None, spatial_symmetries=True, prettify=True, sparse=None)[source]¶Finds the symmetries of a Kwant system using qsymm.
Builder
Names of momentum variables, if None ‘k_x’, ‘k_y’, … is used.
Dictionary of parameter names and their values; used when evaluating the Hamiltonian matrix elements.
If True, search for all symmetries.
If False, only searches for the symmetries that are declarable in
Builder
objects, i.e. time-reversal symmetry,
particle-hole symmetry, chiral symmetry, or conservation laws.
This can save computation time.
Whether to carry out sparsification of the continuous symmetry generators, in general an arbitrary linear combination of the symmetry generators is returned.
Whether to use sparse linear algebra in the calculation. Can give large performance gain in large systems. If None, uses sparse or dense computation depending on the size of the Hamiltonian.
The symmetries of the Kwant system.
kwant.qsymm.
model_to_builder
(model, norbs, lat_vecs, atom_coords, *, coeffs=None)[source]¶Make a Builder
out of qsymm.Models or qsymm.BlochModels.
The Hamiltonian (or terms of the Hamiltonian) to convert to a Builder.
Maps sites to the number of orbitals per site in a unit cell.
Lattice vectors of the underlying tight binding lattice.
Positions of the sites (or atoms) within a unit cell. The ordering of the atoms is the same as in norbs.
Constant prefactors for the individual terms in model, if model is a list of multiple objects. If model is a single Model or BlochModel object, this argument is ignored. By default assigns the coefficient c_n to element model[n].
Builder
The unfinalized Kwant system representing the qsymm Model(s).
Notes
Onsite terms that are not provided in the input model are set to zero by default.
The input model(s) representing the tight binding Hamiltonian in Bloch form should follow the convention where the difference in the real space atomic positions appear in the Bloch factors.