kwant.system.Symmetry

class kwant.system.Symmetry[source]

Bases: object

Abstract base class for spatial symmetries.

Many physical systems possess a discrete spatial symmetry, which results in special properties of these systems. This class is the standard way to describe discrete spatial symmetries in Kwant. An instance of this class can be passed to a Builder instance at its creation. The most important kind of symmetry is translational symmetry, used to define scattering leads.

Each symmetry has a fundamental domain – a set of sites and hoppings, generating all the possible sites and hoppings upon action of symmetry group elements. A class derived from Symmetry has to implement mapping of any site or hopping into the fundamental domain, applying a symmetry group element to a site or a hopping, and a method which to determine the group element bringing some site from the fundamental domain to the requested one. Additionally, it has to have a property num_directions returning the number of independent symmetry group generators (number of elementary periods for translational symmetry).

A ValueError must be raised by the symmetry class whenever a symmetry is used together with sites whose site family is not compatible with it. A typical example of this is when the vector defining a translational symmetry is not a lattice vector.

The type of the domain objects as handled by the methods of this class is not specified. The only requirement is that it must support the unary minus operation. The reference implementation of to_fd() is hence self.act(-self.which(a), a, b).

Methods

abstract act(element, a, b=None)[source]

Act with symmetry group element(s) on site(s) or hopping(s).

Parameters
  • element (tuple or sequence of tuples) – Group element(s) with which to act on the provided site(s) or hopping(s)

  • a (Site or SiteArray) – If Site then element is a single tuple, if SiteArray then element is a single tuple or a sequence of tuples. If only a is provided then element acts on the site(s) of a. If b is also provided then element acts on the hopping(s) (a, b).

  • b (Site or SiteArray) – If Site then element is a single tuple, if SiteArray then element is a single tuple or a sequence of tuples. If only a is provided then element acts on the site(s) of a. If b is also provided then element acts on the hopping(s) (a, b).

abstract has_subgroup(other)[source]

Test whether self has the subgroup other

or, in other words, whether other is a subgroup of self. The reason why this is the abstract method (and not is_subgroup) is that in general it’s not possible for a subgroup to know its supergroups.

in_fd(site)[source]

Tell whether site lies within the fundamental domain.

Parameters

site (Site or SiteArray) –

Returns

in_fd – single bool if site is a Site, or a sequence of bool if site is a SiteArray. In the latter case we return whether each site in the SiteArray is in the fundamental domain.

Return type

bool or sequence of bool

abstract subgroup(*generators)[source]

Return the subgroup generated by a sequence of group elements.

to_fd(a, b=None)[source]

Map a site or hopping to the fundamental domain.

Parameters
  • a (Site or SiteArray) –

  • b (Site or SiteArray) –

  • b is None (If) –

  • a site equivalent to a within the (return) –

  • domain. Otherwise (fundamental) –

  • a hopping equivalent to ``(a (return) –

:param : :param b)`` but where the first element belongs to the fundamental domain.: :param Equivalent to self.act(-self.which(a): :param a: :param b).:

abstract which(site)[source]

Calculate the domain of the site.

Parameters

site (Site or SiteArray) –

Returns

group_element – A single tuple if site is a Site, or a sequence of tuples if site is a SiteArray. The group element(s) whose action on a certain site(s) from the fundamental domain will result in the given site.

Return type

tuple or sequence of tuples

Attributes

num_directions[source]

Number of elementary periods of the symmetry.

Previous topic

kwant.system.SiteFamily

Next topic

kwant.system.NoSymmetry

This Page