reps¶
This submodule adds convenient functions to extend the scope of the package to representations, both reducible and irreducible ones. It is the user’s responsibility to provide the necessary group theory input such as characters and (a mapping of the conjugacy classes into) the appropriate transformations in a format suitable for the package.
The intended use is as follows:
Identify your group: Obtain the character table and the corresponding conjugacy classes including a collection of all their elements.
Hint
This step is not provided by the package.
Map the elements of your conjugacy classes into transformations acting on a
LinearComb. Typically, this will involve an iteration over various transformations to match the specific element. Internally it is handled via a map of labels to some transformation that is expected to be callable with only aLinearCombas an argument. With help of that map, one may then represent each transformation as a collection of labels for the different transformations. For an example seeH4map, which already implements such a map for the built-in transformations on the hypercubic group with reflections.Tip
To make use of
H4map(or any other map) one still has to work out the representation of the group elements in terms of those labels. For any subgroup of the hypercubic group with reflections this can be achieved via a call toreconstructH4GroupElems, which takes as input integer-valued matrices and then iteratively reconstructs those matrices.Obtain a
Projectorinto any of the various (irreducible) representations of your group. This requires as input the characters as well as the reconstructed conjugacy classes together with the chosen map.For irreducible representations (irrep) of dimension larger 1 there exists the option to further break down the operators into different so called rows. To obtain such a
RowProjector, a non-vanishingLinearCombalready projected to the irrep must be provided toconstructDreps. The resulting representation matrices can be reused for any operator already projected to the irrep to ensure the same conventions on the (otherwise equivalent) choices of rows.Caution
For operators of higher canonical mass-dimension multiple copies of the same irrep may be realised leading to a failure of the procedure. A check has been build in to catch this case. Recommendation: Use the operator with lowest canonical mass-dimension as a seed.
- H4map¶
Labels built-in transformations of the hypercubic group with reflections to use them when reconstructing group elements in terms of those transformations.
{ "H4_R0" : lambda x: x.rotation(0), ..., "H4_P0" : lambda x: x.reflection(0), ... }
where
xis aLinearComb.- Type:
dict[str,Callable[[LinearComb],LinearComb]]
- class Projector(d, chars, cclasses: list[list[int | str]], mapToTransf: dict[int | str, ~collections.abc.Callable[[~opbasis.ops.LinearComb], ~opbasis.ops.LinearComb]] = {'H4_P0': <function <lambda>>, 'H4_P1': <function <lambda>>, 'H4_P2': <function <lambda>>, 'H4_P3': <function <lambda>>, 'H4_R0': <function <lambda>>, 'H4_R1': <function <lambda>>, 'H4_R2': <function <lambda>>, 'H4_R3': <function <lambda>>, 'H4_R4': <function <lambda>>, 'H4_R5': <function <lambda>>})¶
Bases:
objectDefines a new projector onto a representation specified by chars of the chosen group.
Each group element must be identified with a chain of transformations acting on the
LinearCombto be projected. The user has to provide a map mapToTransf of identifiers to the actual transformations, which can then be used to describe the various group elements in each conjugacy class.Naming and providing the transformations is up to the user unless he relies on the built-in
H4map, that can be used to map the full hypercubic group with reflections into the built-in transformations.The projector uses the standard projection formula
\[\mathop{\mathrm{proj}}_{\chi}\,O = \frac{d}{|G|}\sum_{C}\chi(C)\sum_{g\in C} [g\circ O]\]where \([g\circ O]\) denotes the transformation of \(O\) and \(\chi\) are the chosen characters for the different conjugacy classes.
- Parameters:
d (int) – Dimension of the representation.
chars (list[Complex|int|Fraction]) – Characters specifying the chosen representation.
cclasses (list[list[int|str]]) – Collections of chains of identifiers resolved in map2transf for each element of each conjugacy class.
map2transf (dict[int|str,Callable[[LinearComb],LinearComb]], optional) – Translates the identifiers used to describe each group element in terms of accessible transformations. The details of the map must be provided by the user. Defaults to H4map.
- __call__(ansatz: LinearComb)¶
Projects the ansatz to the chosen representation.
An operator transforming in a specific representation - not necessarily an irreducible one - is fully described by the characters chars, the conjugacy classes cclasses, and the ansatz on which to perform the projection according to the formula
\[\mathop{\mathrm{proj}}_{\chi}\,O=\frac{d}{|G|}\sum_{C}\chi(C)\sum_{g\in C} [g\circ O]\]where \([g\circ O]\) denotes the transformation of \(O\) and \(\chi\) are the chosen characters for the different conjugacy classes.
- Parameters:
ansatz (LinearComb) – This can be any
LinearComb. Typically, it amounts to a seed, when trying to find an operator transforming in a given representation. It may also be used to act with the projection onto a complete candidate to check if (parts) indeed transform in a specific representation.- Returns:
Projection of input ansatz.
- Return type:
- __str__()¶
Returns a string containing the relevant information about the projector.
- class RowProjector(seed: ~opbasis.ops.LinearComb, d: int, groupElements: list[list[int | str]], mapToTransf: dict[int | str, ~collections.abc.Callable[[~opbasis.ops.LinearComb], ~opbasis.ops.LinearComb]] = {'H4_P0': <function <lambda>>, 'H4_P1': <function <lambda>>, 'H4_P2': <function <lambda>>, 'H4_P3': <function <lambda>>, 'H4_R0': <function <lambda>>, 'H4_R1': <function <lambda>>, 'H4_R2': <function <lambda>>, 'H4_R3': <function <lambda>>, 'H4_R4': <function <lambda>>, 'H4_R5': <function <lambda>>}, ghat: list[int] = None)¶
Bases:
objectImplements a projector onto different rows of a multidimensional irrep.
For the derivation of the representation matrices see
constructDreps.Conceptually, all choices for how to define these rows are equivalent. Here, an arbitrary choice is made for this definition according to the first d linearly independent basis vectors build from the seed operator.
Tip
For other choices of the basis vectors and thus rows one has to either change the order of groupElements or dictate the basis via handing a
listof length d as seed.- Parameters:
seed (LinearComb) – A
LinearCombalready projected into the irrep.d (int) – Dimension of the irrep.
groupElements (list[list[int|str]]) – Representation of all the group elements in terms of the built-in transformations.
mapToTransf (dict[int|str,Callable[[LinearComb],LinearComb]], optional) – Translation table mapping identifiers used in groupElements to the built-in transformations. Defaults to built-in
H4map.ghat (list[int], optional) – Selects by index the group elements to be used when building the representation matrices.
- __call__(projected: list[LinearComb])¶
Applies the projection formula
\[O_i = \frac{d}{|G|} \sum_{g\in G} D_{ii}(g) [g\circ O]\]where \(D(g)\) is a matrix derived in
constructDrepsand \(O\) is required to be already projected into the chosen irrep.- Parameters:
projected (LinearComb) – An operator already projected into the chosen irrep.
- Returns:
Projection into the d rows of the chosen irrep.
- Return type:
- constructDreps(seed: ~opbasis.ops.LinearComb, d: int, groupElements: list[int | str], _map: dict[int | str, ~collections.abc.Callable] = {'H4_P0': <function <lambda>>, 'H4_P1': <function <lambda>>, 'H4_P2': <function <lambda>>, 'H4_P3': <function <lambda>>, 'H4_R0': <function <lambda>>, 'H4_R1': <function <lambda>>, 'H4_R2': <function <lambda>>, 'H4_R3': <function <lambda>>, 'H4_R4': <function <lambda>>, 'H4_R5': <function <lambda>>}, ghat: list[int] = None)¶
Derives the \(d\times d\)-dimensional representation matrices \(D(h)\) for the multi-dimensional irrep identified by the already projected
LinearCombseed via the following strategy:Act separately with the elements of the group on the seed and identify d linearly independent variants. This fixes our basis \(\hat{g}\) to derive \(D(h)\) within the chosen irrep.
From the identity
\[[h\circ [\hat{g}_i \circ O]] = [D(h)]_{ji} [\hat{g}_j \circ O]\,\forall h\in G\]we obtain a linear system of equations. By solving that system we then obtain the representation matrices for each \(h\in G\) for the selected irrep. These matrices only depend on the irrep and thus can be reused for other operators already projected to the same irrep.
- Parameters:
seed (LinearComb) –
A non-vanishing projection of an operator into the chosen irrep. Will be used for constructing a basis.
Hint
Use the
LinearCombwith lowest canonical mass-dimension available to avoid having various copies of the same irrep present in your operator leading towith \(m>1\) and where :math`v_i` are the vectors representing the partner functions.
d (int) – Dimension of the chosen irrep.
groupElements (list[int|str]) – All the group elements of the group expressed in terms of the labels used in _map.
_map (dict[int|str,Callable], optional) – Maps the labels used to represent the group elements into the actual transformations acting on
LinearComb. Defaults toH4map.ghat (list[int], optional) – Indices specifying the group elements to be used for building the basis if desired or needed for reproducibility. Defaults to
None.
- Returns:
The full collection of the representation matrices and the indices of the specific group elements used to derive them (for reproducibility).
- Return type:
- Raises:
ValueError – Indicating that there is a problem with the number of available linearly independent basis vectors.
- reconstructH4GroupElems(elems: list[Matrix])¶
Reconstructs every element of elems in terms of the transformations of the hypercubic group including inversions as they are implemented in the package.
Tip
The general strategy employed here should be feasible for other groups by representing them in their matrix representation.
- Parameters:
elems (list[Matrix]) – All group elements of the chosen (subgroup of the) hypercubic group with reflections, i.e., the literal \(4\times 4\) matrices.
- Returns:
Reconstruction of each element in elems in terms of labels matching the keys of
H4map.- Return type:
- Raises:
ValueError – Indicates that the matrices provided in elems are no elements of the hypercubic group with inversions and thus could not be reconstructed.