ConstructTerms#

ConstructTerms is a module for group theoretical calculations around discrete flavor symmetries. With this module one can define the symmetries and fields of a theory and determine the invariant terms of the lagrangian.

As a quick start guide, take a look at this Simple Example.

For the more advanced features, consider this Detailed Example.

The Group classes#

class constructterms.group.Group(name)[source]#

Bases: object

copy()[source]#

Returns a deep copy.

class constructterms.group.AbelianGroup(name, order=1)[source]#

Bases: Group

An Abelian group Z_order

Parameters:
  • name (bool, optional) – The name of this Abelian group

  • order (int, optional, default:1) – The order N of this Abelian group Z_N

make_product(chargeA: int, chargeB: int) int[source]#
is_desired(charge_field, charge_desired) bool[source]#
class constructterms.group.NonAbelianGroup(name, gapid=None, representations=None, tensor_products=None, clebsches=None)[source]#

Bases: Group

A non-Abelian group

Parameters:
  • name (str) – The name of this non-Abelian group

  • gapid (list, optional) – The Gap-Id of this group. For now this has no relevance. The idea is to later add a function that can obtain the ‘tensor_products’ out of gap or sage.

  • representations (list) – A list of all (relevant) representations of this non-Abelian group, e.g. ['repA', 'repB', ... ]

  • tensor_products (list) – A matrix that contains the tensor products such that tensor_products[i,j] = representations[i] x representations[j] = [representations[k], representations[l], ...].

  • clebsches (dict, optional) –

    You can give the Clebsch-Gordans in a specific basis. This allows you to determine the explicit components of a tensor product. Enter the Clebsches in the following form:

    {'repA x repB': {'repC': [mat1, mat2, ...],
                     'repD': [mat3, mat4, ...]}}
    

    if mathematically

    \[\begin{split}\begin{pmatrix}\text{repA}_1\\\text{repA}_2\end{pmatrix}_\text{repA} \otimes \begin{pmatrix}\text{repA}_1\\\text{repA}_2\end{pmatrix}_\text{repA} ~=~ \text{mat1} \cdot \begin{pmatrix} \text{repA}_1\,\text{repB}_1 \\ \text{repA}_1\,\text{repB}_2 \\ \text{repA}_2\,\text{repB}_1 \\ \text{repA}_2\,\text{repB}_2 \\ \end{pmatrix}_\text{repC} \oplus \dots\end{split}\]

make_product(repA: list, repB: list) list[source]#

Calculates the resulting representations of the tensor product between repA and repB.

Parameters:
  • repA (list) – A list of irreducible representations. E.g. ['3_1', '3_2']. Entries have to be in ‘self.representations’!

  • repB (list) – A list of irreducible representations. E.g. ['3_1', '3_2']. Entries have to be in ‘self.representations’!

Returns:

A list of irreducible representations.

Return type:

list

make_product_components(compA: dict, compB: dict) dict[source]#

Calculates the components of the tensor product of compA and compB, while using the Clebsch-Gordans that have been defined for the group.

Parameters:
  • compA (dict) – The components of representation A. E.g. {'2':[['A1','A2']]}.

  • compB (dict) – The components of representation B. E.g. {'3':[['B1','B2','B3], ['B4','B5','B6']]} for a 3 + 3 representation.

Returns:

The components of the product. E.g. {'1':[['A1 B2 + A2 B1']], '2':[['A1 B1 - A2 B2','A1 B3 + A2 B2']]}.

Return type:

dict

is_desired(rep_field: list, rep_desired: list) bool[source]#

Note that this function does not check if ‘rep_desired’ and ‘rep_field’ are the same, but rather if any of the reps in ‘rep_desired’ is contained in ‘rep_field’ !!

class constructterms.group.U1Group(name)[source]#

Bases: Group

A U(1) group

Parameters:

name (str) – The name of the group

make_product(chargeA, chargeB)[source]#
is_desired(charge_field, charge_desired) bool[source]#

The Field class#

class constructterms.field.Field(name, charges=None, components=None)[source]#

Bases: object

Mathematically this object is a representation charged under some symmetry groups. Physically it is a field of the theory.

Parameters:
  • name (str) – The name of the field / representation

  • charges (dict, optional) –

    The charges / irreps under the Groups. Has the form {Group1: charge1, Group2: charge2}, where Group1 and Group2 have to be an Object of the Group() class. Note that Abelian groups have integer charges, U(1) groups have integer or float charges and non-Abelian groups have a list of one or more irreps, e.g.:

    charges = {Abelian_Group: 2, U1_Group: 0.5, Non_Abelian_Group: ['3_1','3_2']}
    

  • components (dict, optional) –

    The single components of a field. E.g. if the field is a ‘3’ representation under A4, it would be:

    components = {A4: {'3': [['x1', 'x2', 'x3']]}}
    

copy()[source]#

Returns a deep copy.

times(other_field)[source]#

Calculates the tensor product of ‘self’ and ‘other_field’.

Parameters:

other_field (Field()) – The other field that you want to multiply this field with.

Returns:

A field that represents the tensor product of ‘self’ and ‘other_field’.

Return type:

Field()

is_desired(desired_field, print_cause=False, ignore=None) bool[source]#

Check if ‘self’ is charged in the same way as ‘desired_field’ under all symmetries. For non-Abelian symmetries it checks, if ‘self’ contains at least one of the irreps of ‘desired_field’. Use this for example to check if a Lagrangian-term is invariant.

Parameters:
  • desired_field (Field()) – Compare the charges of ‘self’ to this field. Has to be an instance of the Field class!

  • ignore (list, optional) – List here any symmetry that you do not want to compare to the desired field.

  • print_cause (bool, optional) – If ‘True’ it prints which symmetry is causing the end-result to be ‘False’

Returns:

True or False

Return type:

bool

Some calculations utils#

constructterms.calculations.list_allowed_terms(all_fields: list, allowed, order=4) list[source]#

Make a list of all combinations of fields, that contain the charges of the field ‘allowed’.

Parameters:
  • all_fields (list) – A list that contains all fields. Fields have to be an object of the Field() class.

  • allowed (Field()) – All returned terms have to contain the representations/charges of this field. Has to be an object of the ‘Field’-class.

  • order (int) – The order up to which terms are considered, i.e. how many fields are multiplied to yield a term.

Returns:

A list, whose elements are the terms whose charges coincide with ‘allowed’. Elements are objects of Field() class.

Return type:

list