Lie group
numqi.group._lie
numqi.group.angle_to_su2(alpha, beta, gamma)
Convert Euler angles to SU(2) matrix
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alpha
|
(ndarray, float)
|
alpha angle |
required |
beta
|
(ndarray, float)
|
beta angle |
required |
gamma
|
(ndarray, float)
|
gamma angle |
required |
Returns:
Name | Type | Description |
---|---|---|
ret |
ndarray
|
SU(2) matrix |
numqi.group.angle_to_so3(alpha, beta, gamma)
Convert Euler angles to SO(3) matrix
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alpha
|
(ndarray, float)
|
alpha angle |
required |
beta
|
(ndarray, float)
|
beta angle |
required |
gamma
|
(ndarray, float)
|
gamma angle |
required |
Returns:
Name | Type | Description |
---|---|---|
ret |
ndarray
|
SO(3) matrix |
numqi.group.so3_to_angle(np0, zero_eps=1e-07)
Convert SO(3) matrix to Euler angles
Parameters:
Name | Type | Description | Default |
---|---|---|---|
np0
|
ndarray
|
SO(3) matrix, shape (...,3,3) |
required |
zero_eps
|
float
|
zero threshold |
1e-07
|
Returns:
Name | Type | Description |
---|---|---|
alpha |
ndarray
|
angle alpha, shape (...), (0,2*pi) |
beta |
ndarray
|
angle beta, shape (...), (0,pi) |
gamma |
ndarray
|
angle gamma, shape (...), (0,2*pi) |
numqi.group.su2_to_angle(np0, zero_eps=1e-07)
Convert SU(2) matrix to Euler angles
Parameters:
Name | Type | Description | Default |
---|---|---|---|
np0
|
ndarray
|
SU(2) matrix, shape (...,2,2) |
required |
zero_eps
|
float
|
zero threshold |
1e-07
|
Returns:
Name | Type | Description |
---|---|---|
alpha |
ndarray
|
angle alpha, shape (...), (0,2*pi) |
beta |
ndarray
|
angle beta, shape (...), (0,pi) |
gamma |
ndarray
|
angle gamma, shape (...), (0,4*pi) |
numqi.group.so3_to_su2(np0, zero_eps=1e-07)
Convert SO(3) matrix to SU(2) matrix
Parameters:
Name | Type | Description | Default |
---|---|---|---|
np0
|
ndarray
|
SO(3) matrix, shape (...,3,3) |
required |
zero_eps
|
float
|
zero threshold |
1e-07
|
Returns:
Name | Type | Description |
---|---|---|
ret |
ndarray
|
SU(2) matrix, shape (...,2,2) |
numqi.group.su2_to_so3(np0, zero_eps=1e-07)
Convert SU(2) matrix to SO(3) matrix
Parameters:
Name | Type | Description | Default |
---|---|---|---|
np0
|
ndarray
|
SU(2) matrix, shape (...,2,2) |
required |
zero_eps
|
float
|
zero threshold |
1e-07
|
Returns:
Name | Type | Description |
---|---|---|
ret |
ndarray
|
SO(3) matrix, shape (...,3,3) |
numqi.group.get_su2_irrep(j2, *mat_or_angle, return_matd=False)
Get irrep of SU(2)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
j2
|
int
|
|
required |
mat_or_angle
|
tuple
|
SU(2) matrix (tuple of length 1) or Euler angles (tuple of length 3) |
()
|
return_matd
|
bool
|
return matd |
False
|
Returns:
Name | Type | Description |
---|---|---|
ret |
ndarray
|
irrep of SU(2), shape (...,j2+1,j2+1) |
matd |
ndarray
|
matd, shape (...,j2+1,j2+1) |
numqi.group.get_rational_orthogonal2_matrix(m, n)
Get rational orthogonal 2x2 matrix wiki-link
Parameters:
Name | Type | Description | Default |
---|---|---|---|
m
|
int
|
m |
required |
n
|
int
|
n |
required |
Returns:
Name | Type | Description |
---|---|---|
ret |
ndarray
|
rational orthogonal 2x2 matrix |