constructterms package#

Submodules#

constructterms.calculations module#

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’.#

param all_fields:

list A list that contains all fields. Fields have to be an object of the ‘Field’-class.

param allowed:

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

param order:

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

return:

list A list, whose elements are the terms whose charges coincide with ‘allowed’. Elements are object of ‘Field’-class

constructterms.field module#

class constructterms.field.Field(name, charges={})[source]#

Bases: object

A field or representation that has a name und is charged under some symmetry-groups.

is_desired(desired_field, print_cause=False) 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. :param desired_field: Compare the charges of ‘self’ to this field. Has to be of ‘Field’-class! :param print_cause: bool, optional

If ‘True’ it prints which symmetry is causing the end-result to be ‘False’

Returns:

bool

times(other_field)[source]#

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

param other_field:

The field that you want to multiply ‘self’ with. Has to be of ‘Field’-class!

return:

An object of the ‘Field’-class that represents the tenosr product of ‘self’ and ‘other_field’.

constructterms.group module#

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

Bases: Group

is_desired(charge_field, charge_desired) bool[source]#
make_product(chargeA: int, chargeB: int) int[source]#
class constructterms.group.Group(name)[source]#

Bases: object

class constructterms.group.NonAbelianGroup(name, gapid=[], representations=[], tensor_products=[[[]]], clebsches=[])[source]#

Bases: Group

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

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

make_product(repA: list, repB: list) list[source]#
class constructterms.group.U1Group(name)[source]#

Bases: Group

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

Module contents#

ConstructTerms

ConstructTerms allows you to make tensor products of fields charged under several symmetries. It can be used for example to find all invariant terms of a Lagrangian/Superpotential