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 $S_3$¶
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 $S_3$. The group has 6 elements $g_0,g_1,g_2,g_3,g_4,g_5$, 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 $g_2$ is represented as [2,3,0,1,5,4]
, which means $g_2g_0=g_2$, $g_2g_1=g_3$, $g_2g_2=g_0$, $g_2g_3=g_1$, $g_2g_4=g_5$, and $g_2g_5=g_4$.
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 $g_2g_4=g_5$ 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¶
$\chi$ | 1 | 1 | 1 | 1 |
---|---|---|---|---|
$A_0$ | 1 | -1 | -1 | 1 |
$A_1$ | 1 | -1 | 1 | -1 |
$A_2$ | 1 | 1 | -1 | -1 |
$A_3$ | 1 | 1 | 1 | 1 |
Symmetric group¶
$S_n$ | order | dim(irrep) |
---|---|---|
$S_2$ | 2 | 1,1 |
$S_3$ | 6 | 1,1,2 |
$S_4$ | 24 | 1,1,2,3,3 |
$S_5$ | 120 | 1,1,4,4,5,5,6 |
$S_6$ | 720 | 1,1,5,5,5,5,9,9,10,10,16 |
$S_2$
$\chi$ | 1 | 1 |
---|---|---|
$A_0$ | 1 | -1 |
$A_1$ | 1 | 1 |
$S_3$
$\chi$ | 1 | 2 | 3 |
---|---|---|---|
$A_0$ | 1 | 1 | -1 |
$A_1$ | 1 | 1 | 1 |
$A_2$ | 2 | -1 | 0 |
$S_4$
$\chi$ | 1 | 3 | 6 | 6 | 8 |
---|---|---|---|---|---|
$A_0$ | 1 | 1 | -1 | -1 | 1 |
$A_1$ | 1 | 1 | 1 | 1 | 1 |
$A_2$ | 2 | 2 | 0 | 0 | -1 |
$A_3$ | 3 | -1 | -1 | 1 | 0 |
$A_4$ | 3 | -1 | 1 | -1 | 0 |
$S_5$
$\chi$ | 1 | 10 | 15 | 20 | 20 | 24 | 30 |
---|---|---|---|---|---|---|---|
$A_0$ | 1 | -1 | 1 | 1 | -1 | 1 | -1 |
$A_1$ | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
$A_2$ | 4 | -2 | 0 | 1 | 1 | -1 | 0 |
$A_3$ | 4 | 2 | 0 | 1 | -1 | -1 | 0 |
$A_4$ | 5 | -1 | 1 | -1 | -1 | 0 | 1 |
$A_5$ | 5 | 1 | 1 | -1 | 1 | 0 | -1 |
$A_6$ | 6 | 0 | -2 | 0 | 0 | 1 | 0 |
$S_6$
$\chi$ | 1 | 15 | 15 | 40 | 40 | 45 | 90 | 90 | 120 | 120 | 144 |
---|---|---|---|---|---|---|---|---|---|---|---|
$A_0$ | 1 | -1 | -1 | 1 | 1 | 1 | -1 | 1 | -1 | -1 | 1 |
$A_1$ | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
$A_2$ | 5 | 3 | -1 | 2 | -1 | 1 | 1 | -1 | 0 | -1 | 0 |
$A_3$ | 5 | -1 | 3 | -1 | 2 | 1 | 1 | -1 | -1 | 0 | 0 |
$A_4$ | 5 | -3 | 1 | 2 | -1 | 1 | -1 | -1 | 0 | 1 | 0 |
$A_5$ | 5 | 1 | -3 | -1 | 2 | 1 | -1 | -1 | 1 | 0 | 0 |
$A_6$ | 9 | -3 | -3 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | -1 |
$A_7$ | 9 | 3 | 3 | 0 | 0 | 1 | -1 | 1 | 0 | 0 | -1 |
$A_8$ | 10 | 2 | -2 | 1 | 1 | -2 | 0 | 0 | -1 | 1 | 0 |
$A_9$ | 10 | -2 | 2 | 1 | 1 | -2 | 0 | 0 | 1 | -1 | 0 |
$A_{10}$ | 16 | 0 | 0 | -2 | -2 | 0 | 0 | 0 | 0 | 0 | 1 |
Alternating group¶
$A_2=\lbrace e\rbrace$
$A_3=C_3$
$A_n$ | order | dim(irrep) |
---|---|---|
$A_2$ | 1 | 1 |
$A_3$ | 3 | 1,1,1 |
$A_4$ | 12 | 1,1,1,3 |
$A_5$ | 60 | 1,3,3,4,5 |
$A_6$ | 360 | 1,5,5,8,8,9,10 |
$A_3$: $a=e^{i2\pi/3}$
$\chi$ | 1 | 1 | 1 |
---|---|---|---|
$A_{0}$ | 1 | $a$ | $a^{-1}$ |
$A_{1}$ | 1 | $a^{-1}$ | $a$ |
$A_{2}$ | 1 | 1 | 1 |
$A_4$: $a=e^{i2\pi/3}$
$\chi$ | 1 | 3 | 4 | 4 |
---|---|---|---|---|
$A_{0}$ | 1 | 1 | $a$ | $a^{-1}$ |
$A_{1}$ | 1 | 1 | $a^{-1}$ | $a$ |
$A_{2}$ | 1 | 1 | 1 | 1 |
$A_{3}$ | 3 | -1 | 0 | 0 |
$A_5$: $a=\frac{\sqrt{5}-1}{2}\simeq 0.618$
$\chi$ | 1 | 12 | 12 | 15 | 20 |
---|---|---|---|---|---|
$A_{0}$ | 1 | 1 | 1 | 1 | 1 |
$A_{1}$ | 3 | $-a$ | $a^{-1}$ | -1 | 0 |
$A_{2}$ | 3 | $a^{-1}$ | $-a$ | -1 | 0 |
$A_{3}$ | 4 | -1 | -1 | 0 | 1 |
$A_{4}$ | 5 | 0 | 0 | 1 | -1 |
$A_6$: $a=\frac{\sqrt{5}-1}{2}\simeq 0.618$
$\chi$ | 1 | 40 | 40 | 45 | 72 | 72 | 90 |
---|---|---|---|---|---|---|---|
$A_{0}$ | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
$A_{1}$ | 5 | -1 | 2 | 1 | 0 | 0 | -1 |
$A_{2}$ | 5 | 2 | -1 | 1 | 0 | 0 | -1 |
$A_{3}$ | 8 | -1 | -1 | 0 | $-a$ | $a^{-1}$ | 0 |
$A_{4}$ | 8 | -1 | -1 | 0 | $a^{-1}$ | $-a$ | 0 |
$A_{5}$ | 9 | 0 | 0 | 1 | -1 | -1 | 1 |
$A_{6}$ | 10 | 1 | 1 | -2 | 0 | 0 | 0 |
Dihedral group¶
$D_n$ | order | dim(irrep) |
---|---|---|
$D_3$ | 6 | 1,1,2 |
$D_4$ | 8 | 1,1,1,1,2 |
$D_5$ | 10 | 1,1,2,2 |
$D_6$ | 12 | 1,1,1,1,2,2 |
$D_7$ | 14 | 1,1,2,2,2 |
$D_8$ | 16 | 1,1,1,1,2,2,2 |
$D_3$ ($S_3$)
$\chi$ | 1 | 2 | 3 |
---|---|---|---|
$A_0$ | 1 | 1 | -1 |
$A_1$ | 1 | 1 | 1 |
$A_2$ | 2 | -1 | 0 |
$D_4$
$\chi$ | 1 | 1 | 2 | 2 | 2 |
---|---|---|---|---|---|
$A_0$ | 1 | 1 | -1 | -1 | 1 |
$A_1$ | 1 | 1 | -1 | 1 | -1 |
$A_2$ | 1 | 1 | 1 | -1 | -1 |
$A_3$ | 1 | 1 | 1 | 1 | 1 |
$A_4$ | 2 | -2 | 0 | 0 | 0 |
$D_5$
$a=\frac{\sqrt{5}-1}{2}\simeq 0.618$
$\chi$ | 1 | 2 | 2 | 5 |
---|---|---|---|---|
$A_0$ | 1 | 1 | 1 | -1 |
$A_1$ | 1 | 1 | 1 | 1 |
$A_2$ | 2 | $-a$ | $a^{-1}$ | 0 |
$A_3$ | 2 | $a^{-1}$ | $-a$ | 0 |
$D_6$
$\chi$ | 1 | 1 | 2 | 2 | 3 | 3 |
---|---|---|---|---|---|---|
$A_0$ | 1 | -1 | -1 | 1 | -1 | 1 |
$A_1$ | 1 | -1 | -1 | 1 | 1 | -1 |
$A_2$ | 1 | 1 | 1 | 1 | -1 | -1 |
$A_3$ | 1 | 1 | 1 | 1 | 1 | 1 |
$A_4$ | 2 | 2 | -1 | -1 | 0 | 0 |
$A_5$ | 2 | -2 | 1 | -1 | 0 | 0 |
$D_7$
$a=2\cos(\frac{2\pi}{7})\simeq 1.247$
$b=\frac{\sin(5\pi/7)}{\sin(\pi/7)}\simeq 1.802$
$c=\frac{1}{a+1}\simeq 0.445$
$\chi$ | 1 | 2 | 2 | 2 | 7 |
---|---|---|---|---|---|
$A_0$ | 1 | 1 | 1 | 1 | -1 |
$A_1$ | 1 | 1 | 1 | 1 | 1 |
$A_2$ | 2 | $-b$ | $a$ | $-c$ | 0 |
$A_3$ | 2 | $-c$ | $-b$ | $a$ | 0 |
$A_4$ | 2 | $a$ | $-c$ | $-b$ | 0 |
$D_8$
$\chi$ | 1 | 1 | 2 | 2 | 2 | 4 | 4 |
---|---|---|---|---|---|---|---|
$A_0$ | 1 | 1 | -1 | 1 | -1 | -1 | 1 |
$A_1$ | 1 | 1 | -1 | 1 | -1 | 1 | -1 |
$A_2$ | 1 | 1 | 1 | 1 | 1 | -1 | -1 |
$A_3$ | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
$A_4$ | 2 | -2 | $-\sqrt{2}$ | 0 | $\sqrt{2}$ | 0 | 0 |
$A_5$ | 2 | 2 | 0 | -2 | 0 | 0 | 0 |
$A_6$ | 2 | -2 | $\sqrt{2}$ | 0 | $-\sqrt{2}$ | 0 | 0 |