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.
The Group classes#
- 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
- 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, optional) – A list of all (relevant) representations of this non-Abelian group
tensor_products (list, optional) – A matrix that contains the tensor products.
clebsches (dict, optional) – For now this has no relevance. The idea would be to later add a function to the package that can give you the Clebsch-Gordans so that a multiplication of actual matrix representations is possible.
- 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
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']]}}
- 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 of ‘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 object of ‘Field’-class
- Return type:
list