qten.pointgroups.finite
Module reference for qten.pointgroups.finite.
finite
Finite point groups generated by exact symbolic matrices.
This module defines FinitePointGroup,
the multi-generator counterpart to
PointGroupElement. A finite
point group stores exact generator matrices, closes under composition to obtain
all group elements, and optionally uses packaged Bilbao character tables to
build irrep projectors and polynomial sector bases.
Repository usage
Named crystallographic groups are usually constructed through
pointgroup(). Use this
module directly when assembling a custom finite group from exact matrices.
FinitePointGroup
dataclass
FinitePointGroup(
generators: tuple[PointGroupElement, ...],
axes: tuple[Symbol, ...],
symbol: str | None = None,
irreps: dict[str, Any] | None = None,
spinor_irreps: dict[str, Any] | None = None,
spin: str = "electron",
class_indices: tuple[int, ...] | None = None,
)
Finite point group represented by exact generator matrices.
FinitePointGroup stores one or
more exact generators as
PointGroupElement objects on
a shared ordered axis tuple. Closing under composition yields the full group
of linear actions. Ordinary and spinor class tables come from the packaged
catalog when present; otherwise they are computed from the generated group.
With those tables the group can project homogeneous polynomials onto
irreducible sectors.
Mathematical meaning
Let \(G\) be the finite matrix group generated by the stored generators.
On a representation \(D\),
[
P^{\mathrm{triv}} = \frac{1}{|G|}\sum_{g\in G} D(g),\qquad
P^\mu = \frac{d_\mu}{|G|}\sum_{g\in G}\chi^\mu(g)^* D(g).
]
irrep_projector
takes \(D(g)\) to be the Euclidean polynomial representation of degree
order. Hilbert-space projectors use the same formula with
\(D(g)=D_{\mathrm{orb}}(g)\) or
\(D(g)=D_{\mathrm{orb}}(g)\otimes u(g)\).
Spinor characters are projective for the section \(u\):
\(u(g)u(h)=\omega(g,h)\,u(gh)\). Packaged class rows average \(\chi\)
over each ordinary conjugacy class and write \(0\) on non-\(\omega\)-regular
classes. Projectors instead use the element-wise hat-table section
(spinor_irrep_characters_by_element).
Attributes:
| Name | Type | Description |
|---|---|---|
generators |
tuple[PointGroupElement, ...]
|
Exact linear generators that share the same ordered |
axes |
tuple[Symbol, ...]
|
Ordered coordinate symbols for every generator and group element. |
symbol |
str | None
|
Optional Hermann-Mauguin symbol, such as |
irreps |
dict[str, Any] | None
|
Optional packaged character-table payload with |
spinor_irreps |
dict[str, Any] | None
|
Optional class-wise projective spinor character data, same shape as
|
spin |
str
|
Construction-time spin policy. |
class_indices |
tuple[int, ...] | None
|
Optional map from generated element index to
|
Notes
Character-table labels on a standard xyz group are aligned to generated
conjugacy classes by matrix invariants (order, determinant, trace, and
common mirror geometry). After a conjugation, the stored class_indices
are used instead of re-matching geometry in the new frame. Ordinary and
spinor tables are computed from the generated group when they are not
packaged. Alignment raises ValueError when a packaged table cannot be
matched to the generated conjugacy classes.
generators
instance-attribute
generators: tuple[PointGroupElement, ...]
axes
instance-attribute
axes: tuple[Symbol, ...]
symbol
class-attribute
instance-attribute
symbol: str | None = None
irreps
class-attribute
instance-attribute
irreps: dict[str, Any] | None = field(
default=None, compare=False, hash=False
)
spinor_irreps
class-attribute
instance-attribute
spinor_irreps: dict[str, Any] | None = field(
default=None, compare=False, hash=False
)
spin
class-attribute
instance-attribute
spin: str = 'electron'
class_indices
class-attribute
instance-attribute
class_indices: tuple[int, ...] | None = field(
default=None, compare=False, hash=False
)
order
order() -> int
__post_init__
__post_init__() -> None
Source code in src/qten/pointgroups/finite.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | |
__hash__
__hash__() -> int
Source code in src/qten/pointgroups/finite.py
205 206 207 208 209 210 211 212 213 214 215 216 | |
from_matrices
classmethod
from_matrices(
matrices: Iterable[ImmutableDenseMatrix],
axes: tuple[Symbol, ...],
*,
symbol: str | None = None,
irreps: dict[str, Any] | None = None,
spinor_irreps: dict[str, Any] | None = None,
rotation3s: Iterable[ImmutableDenseMatrix | None]
| None = None,
spin: str = "electron",
class_indices: tuple[int, ...] | None = None,
) -> FinitePointGroup
Build a finite point group from exact generator matrices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
matrices
|
Iterable[ImmutableDenseMatrix]
|
Generator matrices expressed on the ordered |
required |
axes
|
tuple[Symbol, ...]
|
Ordered coordinate symbols shared by every generator. |
required |
symbol
|
str | None
|
Optional Hermann-Mauguin symbol for display and sector labels. |
None
|
irreps
|
dict[str, Any] | None
|
Optional packaged character-table payload. |
None
|
spinor_irreps
|
dict[str, Any] | None
|
Optional class-wise projective spinor character data. |
None
|
rotation3s
|
Iterable[ImmutableDenseMatrix | None] | None
|
Optional Cartesian \(O(3)\) matrix for each generator, used when the spatial matrices are not already 3D. |
None
|
spin
|
str
|
Construction-time spin policy. |
'electron'
|
class_indices
|
tuple[int, ...] | None
|
Optional generated-element to character-table class map. |
None
|
Returns:
| Type | Description |
|---|---|
FinitePointGroup
|
Finite group whose generators are the corresponding
|
Source code in src/qten/pointgroups/finite.py
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | |
elements
cached
elements(
max_order: int = 512,
) -> tuple[PointGroupElement, ...]
Generate all group elements by closure under the generators.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
max_order
|
int
|
Safety bound on the number of distinct elements discovered while closing the group. |
512
|
Returns:
| Type | Description |
|---|---|
tuple[PointGroupElement, ...]
|
All distinct group elements, starting with the identity. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If closure exceeds |
Source code in src/qten/pointgroups/finite.py
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | |
is_abelian
is_abelian() -> bool
Return whether all generated elements commute.
Source code in src/qten/pointgroups/finite.py
348 349 350 351 352 353 354 355 356 357 358 359 | |
conjugacy_classes
cached
conjugacy_classes() -> tuple[tuple[int, ...], ...]
Return conjugacy classes as tuples of element indices.
Returns:
| Type | Description |
|---|---|
tuple[tuple[int, ...], ...]
|
Each inner tuple lists indices into |
Source code in src/qten/pointgroups/finite.py
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 | |
ordinary_table
cached
ordinary_table() -> dict[str, Any]
Return ordinary irreps, computing them when no table is packaged.
Source code in src/qten/pointgroups/finite.py
504 505 506 507 508 509 510 511 | |
element_class_indices
element_class_indices() -> tuple[int, ...]
Return the aligned character-table class index for each element.
Returns:
| Type | Description |
|---|---|
tuple[int, ...]
|
For each index into |
Raises:
| Type | Description |
|---|---|
ValueError
|
If character-table data is missing or cannot be aligned. |
Source code in src/qten/pointgroups/finite.py
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 | |
irrep_characters_by_element
irrep_characters_by_element(
irrep: str,
) -> tuple[sy.Expr, ...]
Return irrep characters ordered by generated group elements.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
irrep
|
str
|
Irrep label from the packaged character table, such as |
required |
Returns:
| Type | Description |
|---|---|
tuple[Expr, ...]
|
Character values aligned to |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the irrep is unknown or character-table data is incomplete. |
Source code in src/qten/pointgroups/finite.py
642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 | |
spinor_table
cached
spinor_table() -> dict[str, Any]
Return class-wise spinor data, computing it from the \(SU(2)\) lift if needed.
Each row is a projective irrep of \(G\) for the principal section \(u\). Class entries are averages of the hat-table characters; they are \(0\) on non-\(\omega\)-regular classes.
Source code in src/qten/pointgroups/finite.py
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 | |
spinor_irrep_characters_by_element
spinor_irrep_characters_by_element(
irrep: str,
) -> tuple[complex, ...]
Return projective spinor characters in generated-element order.
Class-wise packaged rows set \(\chi=0\) on non-\(\omega\)-regular classes, where \(\omega(g,h)\) is the 2-cocycle of the \(SU(2)\) section. Projectors need the value on each generated element, taken from the hat-group character table of the double cover of order \(2|G|\).
Source code in src/qten/pointgroups/finite.py
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 | |
reoriented_by
reoriented_by(rotation: Matrix) -> FinitePointGroup
Return the same abstract group with every matrix conjugated by rotation.
Writes \(g'=QgQ^{-1}\). Ordinary characters are class functions, so each conjugated element keeps the Bilbao class index of its preimage. Spinor characters are not transported: the principal lift of \(R(g')\) need not be \(u(Q)u(g)u(Q)^{-1}\), so the table is recomputed from the new section.
Source code in src/qten/pointgroups/finite.py
778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 | |
trivial_projector
cached
trivial_projector(order: int) -> sy.ImmutableDenseMatrix
Project the polynomial representation onto the invariant sector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order
|
int
|
Homogeneous polynomial degree used for the Euclidean representation. |
required |
Returns:
| Type | Description |
|---|---|
ImmutableDenseMatrix
|
Exact projector \(P^{\mathrm{triv}}\) onto group-invariant
polynomials of degree |
Source code in src/qten/pointgroups/finite.py
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 | |
irrep_projector
cached
irrep_projector(
order: int, irrep: str
) -> sy.ImmutableDenseMatrix
Project the polynomial representation onto a character-table sector.
Uses ordinary (linear) \(\chi\) and the Euclidean \(D(g)\) of degree
order. This is not the spinor Hilbert-space projector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order
|
int
|
Homogeneous polynomial degree used for the Euclidean representation. |
required |
irrep
|
str
|
Irrep label from the packaged or computed character table. |
required |
Returns:
| Type | Description |
|---|---|
ImmutableDenseMatrix
|
Exact projector \(P^\mu = \frac{d_\mu}{|G|}\sum_g \chi^\mu(g)^* D(g)\). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the irrep is unknown or character-table data is incomplete. |
Source code in src/qten/pointgroups/finite.py
898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 | |
irrep_basis
cached
irrep_basis(
order: int, irrep: str
) -> tuple[PointGroupBasis, ...]
Return polynomial basis labels spanning a finite point-group irrep sector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order
|
int
|
Homogeneous polynomial degree for the Euclidean representation. |
required |
irrep
|
str
|
Irrep label from the packaged or computed character table. |
required |
Returns:
| Type | Description |
|---|---|
tuple[PointGroupBasis, ...]
|
Normalized
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If the irrep is unknown or character-table data is incomplete. |
Source code in src/qten/pointgroups/finite.py
951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 | |
invariant_basis
cached
invariant_basis(order: int) -> tuple[PointGroupBasis, ...]
Return invariant polynomial basis functions of the requested degree.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order
|
int
|
Homogeneous polynomial degree for the Euclidean representation. |
required |
Returns:
| Type | Description |
|---|---|
tuple[PointGroupBasis, ...]
|
Normalized invariant
|
Source code in src/qten/pointgroups/finite.py
1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 | |