Basic¶
numqi
implements a minimum set of group theory operations required in other numqi modules. It is based on the sympy
library.
Cayley table (multiplication table): a table of all possible products of group elements.
Left regular form: a permutation representation of a group.
One featured function is to give all inequivalent, irreducible representations of a finite group.
TODO
- analytical results for Dihedral group and cyclic group (@book-ZhongqiMA)
su(n)
- space group
import numpy as np
try:
import numqi
except ImportError:
%pip install numqi
import numqi
Irreducible representations of S3¶
N0 = 3
cayley_table = numqi.group.get_symmetric_group_cayley_table(N0)
print(f'Cayley Table:', cayley_table, sep='\n')
print(f'shape: {cayley_table.shape}, dtype: {cayley_table.dtype}')
print('#group elements:', cayley_table.shape[0])
Cayley Table: [[0 1 2 3 4 5] [1 0 4 5 2 3] [2 3 0 1 5 4] [3 2 5 4 0 1] [4 5 1 0 3 2] [5 4 3 2 1 0]] shape: (6, 6), dtype: int64 #group elements: 6
Above shows the Cayley table of Symmetric group S3. The group has 6 elements g0,g1,g2,g3,g4,g5, and the Cayley table is a 6x6 matrix. Each row of Cayley table represents one element of the group. For example, the third element of the group g2 is represented as [2,3,0,1,5,4]
, which means g2g0=g2, g2g1=g3, g2g2=g0, g2g3=g1, g2g4=g5, and g2g5=g4.
Below, we first convert the Cayley table to the left regular form, which is a permutation representation of the group. Then we find all inequivalent, irreducible representations (irrep) of the group using the algorithm from Sheaves-blog
left_regular_form = numqi.group.cayley_table_to_left_regular_form(cayley_table)
irrep_list = numqi.group.reduce_group_representation(left_regular_form)
# irrep_list
dim_list = [x.shape[1] for x in irrep_list]
for ind0,irrep in enumerate(irrep_list):
print(f'irrep[{ind0}]:', irrep.shape)
irrep[0]: (6, 1, 1) irrep[1]: (6, 1, 1) irrep[2]: (6, 2, 2)
Above, irrep_list
is a list of 3-dimensional array, each array is of shape (#element, dim(irrep), dim(irrep))
. From Cayley table, we know that g2g4=g5 and we can also verify this from irrep.
for ind0, irrep in enumerate(irrep_list):
print(f'irrep[{ind0}]')
g2 = irrep[2]
g4 = irrep[4]
g5 = irrep[5]
print(f'g2:', g2)
print(f'g4:', g4)
print(f'g5:', g5)
print(f'g2*g4:', g2 @ g4, '\n')
irrep[0] g2: [[-1.]] g4: [[1.]] g5: [[-1.]] g2*g4: [[-1.]] irrep[1] g2: [[1.]] g4: [[1.]] g5: [[1.]] g2*g4: [[1.]] irrep[2] g2: [[-0.5 -0.8660254] [-0.8660254 0.5 ]] g4: [[-0.5 -0.8660254] [ 0.8660254 -0.5 ]] g5: [[-0.5 0.8660254] [ 0.8660254 0.5 ]] g2*g4: [[-0.5 0.8660254] [ 0.8660254 0.5 ]]
From irrep_list
, we can obtain the character table of the group, which is a 2-dimensional array of shape (#irrep, #class)
. According to ((TODO-theorem)) stackexchange-link, number of inequivalent irreducible representations #irrep
equals to number of conjugacy classes #class
.
character,class_list,character_table = numqi.group.get_character_and_class(irrep_list)
print(np.array2string(character_table, precision=3))
[[ 1.00e+00 1.00e+00 -1.00e+00] [ 1.00e+00 1.00e+00 1.00e+00] [ 2.00e+00 -1.00e+00 -1.11e-16]]
The following function can print the character table in a more readable format (rounded to nearest integer).
numqi.group.pretty_print_character_table(character_table, class_list)
| $\chi$ | 1 | 2 | 3 | | :-: | :-: | :-: | :-: | | $A_{0}$ | 1 | 1 | -1 | | $A_{1}$ | 1 | 1 | 1 | | $A_{2}$ | 2 | -1 | 0 |
NumQI have several more built-in finite groups, and user can also input their own Cayley table to find the irreducible representations.
# cayley_table = numqi.group.get_multiplicative_group_cayley_table(N0)
# cayley_table = numqi.group.get_symmetric_group_cayley_table(N0, alternating=True)
# cayley_table = numqi.group.get_dihedral_group_cayley_table(N0)
# cayley_table = numqi.group.get_cyclic_group_cayley_table(N0)
# cayley_table = numqi.group.get_klein_four_group_cayley_table()
# cayley_table = numqi.group.get_quaternion_cayley_table()
Character table¶
Here, we show the character tables solved by NumQI.
Klein four-group¶
χ | 1 | 1 | 1 | 1 |
---|---|---|---|---|
A0 | 1 | -1 | -1 | 1 |
A1 | 1 | -1 | 1 | -1 |
A2 | 1 | 1 | -1 | -1 |
A3 | 1 | 1 | 1 | 1 |
Symmetric group¶
Sn | order | dim(irrep) |
---|---|---|
S2 | 2 | 1,1 |
S3 | 6 | 1,1,2 |
S4 | 24 | 1,1,2,3,3 |
S5 | 120 | 1,1,4,4,5,5,6 |
S6 | 720 | 1,1,5,5,5,5,9,9,10,10,16 |
S2
χ | 1 | 1 |
---|---|---|
A0 | 1 | -1 |
A1 | 1 | 1 |
S3
χ | 1 | 2 | 3 |
---|---|---|---|
A0 | 1 | 1 | -1 |
A1 | 1 | 1 | 1 |
A2 | 2 | -1 | 0 |
S4
χ | 1 | 3 | 6 | 6 | 8 |
---|---|---|---|---|---|
A0 | 1 | 1 | -1 | -1 | 1 |
A1 | 1 | 1 | 1 | 1 | 1 |
A2 | 2 | 2 | 0 | 0 | -1 |
A3 | 3 | -1 | -1 | 1 | 0 |
A4 | 3 | -1 | 1 | -1 | 0 |
S5
χ | 1 | 10 | 15 | 20 | 20 | 24 | 30 |
---|---|---|---|---|---|---|---|
A0 | 1 | -1 | 1 | 1 | -1 | 1 | -1 |
A1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
A2 | 4 | -2 | 0 | 1 | 1 | -1 | 0 |
A3 | 4 | 2 | 0 | 1 | -1 | -1 | 0 |
A4 | 5 | -1 | 1 | -1 | -1 | 0 | 1 |
A5 | 5 | 1 | 1 | -1 | 1 | 0 | -1 |
A6 | 6 | 0 | -2 | 0 | 0 | 1 | 0 |
S6
χ | 1 | 15 | 15 | 40 | 40 | 45 | 90 | 90 | 120 | 120 | 144 |
---|---|---|---|---|---|---|---|---|---|---|---|
A0 | 1 | -1 | -1 | 1 | 1 | 1 | -1 | 1 | -1 | -1 | 1 |
A1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
A2 | 5 | 3 | -1 | 2 | -1 | 1 | 1 | -1 | 0 | -1 | 0 |
A3 | 5 | -1 | 3 | -1 | 2 | 1 | 1 | -1 | -1 | 0 | 0 |
A4 | 5 | -3 | 1 | 2 | -1 | 1 | -1 | -1 | 0 | 1 | 0 |
A5 | 5 | 1 | -3 | -1 | 2 | 1 | -1 | -1 | 1 | 0 | 0 |
A6 | 9 | -3 | -3 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | -1 |
A7 | 9 | 3 | 3 | 0 | 0 | 1 | -1 | 1 | 0 | 0 | -1 |
A8 | 10 | 2 | -2 | 1 | 1 | -2 | 0 | 0 | -1 | 1 | 0 |
A9 | 10 | -2 | 2 | 1 | 1 | -2 | 0 | 0 | 1 | -1 | 0 |
A10 | 16 | 0 | 0 | -2 | -2 | 0 | 0 | 0 | 0 | 0 | 1 |
Alternating group¶
A2={e}
A3=C3
An | order | dim(irrep) |
---|---|---|
A2 | 1 | 1 |
A3 | 3 | 1,1,1 |
A4 | 12 | 1,1,1,3 |
A5 | 60 | 1,3,3,4,5 |
A6 | 360 | 1,5,5,8,8,9,10 |
A3: a=ei2π/3
χ | 1 | 1 | 1 |
---|---|---|---|
A0 | 1 | a | a−1 |
A1 | 1 | a−1 | a |
A2 | 1 | 1 | 1 |
A4: a=ei2π/3
χ | 1 | 3 | 4 | 4 |
---|---|---|---|---|
A0 | 1 | 1 | a | a−1 |
A1 | 1 | 1 | a−1 | a |
A2 | 1 | 1 | 1 | 1 |
A3 | 3 | -1 | 0 | 0 |
A5: a=√5−12≃0.618
χ | 1 | 12 | 12 | 15 | 20 |
---|---|---|---|---|---|
A0 | 1 | 1 | 1 | 1 | 1 |
A1 | 3 | −a | a−1 | -1 | 0 |
A2 | 3 | a−1 | −a | -1 | 0 |
A3 | 4 | -1 | -1 | 0 | 1 |
A4 | 5 | 0 | 0 | 1 | -1 |
A6: a=√5−12≃0.618
χ | 1 | 40 | 40 | 45 | 72 | 72 | 90 |
---|---|---|---|---|---|---|---|
A0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
A1 | 5 | -1 | 2 | 1 | 0 | 0 | -1 |
A2 | 5 | 2 | -1 | 1 | 0 | 0 | -1 |
A3 | 8 | -1 | -1 | 0 | −a | a−1 | 0 |
A4 | 8 | -1 | -1 | 0 | a−1 | −a | 0 |
A5 | 9 | 0 | 0 | 1 | -1 | -1 | 1 |
A6 | 10 | 1 | 1 | -2 | 0 | 0 | 0 |
Dihedral group¶
Dn | order | dim(irrep) |
---|---|---|
D3 | 6 | 1,1,2 |
D4 | 8 | 1,1,1,1,2 |
D5 | 10 | 1,1,2,2 |
D6 | 12 | 1,1,1,1,2,2 |
D7 | 14 | 1,1,2,2,2 |
D8 | 16 | 1,1,1,1,2,2,2 |
D3 (S3)
χ | 1 | 2 | 3 |
---|---|---|---|
A0 | 1 | 1 | -1 |
A1 | 1 | 1 | 1 |
A2 | 2 | -1 | 0 |
D4
χ | 1 | 1 | 2 | 2 | 2 |
---|---|---|---|---|---|
A0 | 1 | 1 | -1 | -1 | 1 |
A1 | 1 | 1 | -1 | 1 | -1 |
A2 | 1 | 1 | 1 | -1 | -1 |
A3 | 1 | 1 | 1 | 1 | 1 |
A4 | 2 | -2 | 0 | 0 | 0 |
D5
a=√5−12≃0.618
χ | 1 | 2 | 2 | 5 |
---|---|---|---|---|
A0 | 1 | 1 | 1 | -1 |
A1 | 1 | 1 | 1 | 1 |
A2 | 2 | −a | a−1 | 0 |
A3 | 2 | a−1 | −a | 0 |
D6
χ | 1 | 1 | 2 | 2 | 3 | 3 |
---|---|---|---|---|---|---|
A0 | 1 | -1 | -1 | 1 | -1 | 1 |
A1 | 1 | -1 | -1 | 1 | 1 | -1 |
A2 | 1 | 1 | 1 | 1 | -1 | -1 |
A3 | 1 | 1 | 1 | 1 | 1 | 1 |
A4 | 2 | 2 | -1 | -1 | 0 | 0 |
A5 | 2 | -2 | 1 | -1 | 0 | 0 |
D7
a=2cos(2π7)≃1.247
b=sin(5π/7)sin(π/7)≃1.802
c=1a+1≃0.445
χ | 1 | 2 | 2 | 2 | 7 |
---|---|---|---|---|---|
A0 | 1 | 1 | 1 | 1 | -1 |
A1 | 1 | 1 | 1 | 1 | 1 |
A2 | 2 | −b | a | −c | 0 |
A3 | 2 | −c | −b | a | 0 |
A4 | 2 | a | −c | −b | 0 |
D8
χ | 1 | 1 | 2 | 2 | 2 | 4 | 4 |
---|---|---|---|---|---|---|---|
A0 | 1 | 1 | -1 | 1 | -1 | -1 | 1 |
A1 | 1 | 1 | -1 | 1 | -1 | 1 | -1 |
A2 | 1 | 1 | 1 | 1 | 1 | -1 | -1 |
A3 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
A4 | 2 | -2 | −√2 | 0 | √2 | 0 | 0 |
A5 | 2 | 2 | 0 | -2 | 0 | 0 | 0 |
A6 | 2 | -2 | √2 | 0 | −√2 | 0 | 0 |