4.6. 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.

Parameters
systBuilder

May have translational symmetries.

momentalist of strings or None

Names of momentum variables. If None, ‘k_x’, ‘k_y’, … is used.

real_spacebool (default True)

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.

paramsdict, optional

Dictionary of parameter names and their values; used when evaluating the Hamiltonian matrix elements.

Returns
modelqsymm.BlochModel

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.

Parameters
builderBuilder
momentalist of strings or None

Names of momentum variables, if None ‘k_x’, ‘k_y’, … is used.

paramsdict, optional

Dictionary of parameter names and their values; used when evaluating the Hamiltonian matrix elements.

spatial_symmetriesbool (default True)

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.

prettifybool (default True)

Whether to carry out sparsification of the continuous symmetry generators, in general an arbitrary linear combination of the symmetry generators is returned.

sparsebool, or None (default None)

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.

Returns
symmetrieslist of qsymm.PointGroupElements and/or qsymm.ContinuousGroupElement

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.

Parameters
modelqsymm.Model, qsymm.BlochModel, or an iterable thereof

The Hamiltonian (or terms of the Hamiltonian) to convert to a Builder.

norbsOrderedDict or sequence of pairs

Maps sites to the number of orbitals per site in a unit cell.

lat_vecslist of arrays

Lattice vectors of the underlying tight binding lattice.

atom_coordslist of arrays

Positions of the sites (or atoms) within a unit cell. The ordering of the atoms is the same as in norbs.

coeffslist of sympy.Symbol, default None.

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].

Returns
systBuilder

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.

Previous topic

kwant.wraparound.plot_2d_bands

Next topic

5.1. kwant.system – Low-level interface of systems

This Page