symmetric_group_manipulations
Functions for computations related to group symmetry.
- calculate_degenerate_orbit(l)[source]
Calculate frequency partitions of a list AS ORDERED.
For example: l=[1,1,2,3] -> ((2, 1, 1), ((0, 1), (2,), (3,))).
For example: l=[1,2,2,3] -> ((1, 2, 1), ((0,), (1, 2), (3,)))
- Parameters:
l (List) – multiset of indices to find frequency partitions for
- Returns:
degenerate_orbit – returns partiton of N corresponding to frequency partition and the cycles of the frequency partition ((<partition>),(<cycles>))
- Return type:
Tuple
- check_sequential(list_to_check)[source]
Check if a list is sequential/ordered.
- Parameters:
list_to_check (List) – List which _may_ be sequential.
- Returns:
is_sequential – If True, list is sequential (i.e., ordered).
- Return type:
bool
- enforce_sorted_orbit(partition_indices)[source]
Resorts partitions of N to be compatible in increasing cycle size.
Also breaks apart frequency partitions that aren’t even to make them compatible with ladder relationships.
For example enforce_sorted_orbit(((1,2,3),(0,))) returns the partition (1,1,2) corresponding to the permutation compatible with ladder relationships in the pairwise coupling scheme ((0,), (1,), (2, 3))). In this case, it took the (1,2,3) cycle and broke it into (1)(2,3).
TODO: change partition_indices to permutation_indices.
- Parameters:
partition_indices (List) – A list (presumably of lists) of indices.
- Returns:
part_tup – Partition of N, sorted by increasing cycle size, that is obtained from the input permutation indices
- Return type:
Tuple