qten.pointgroups.ops
Module reference for qten.pointgroups.ops.
ops
Point-group operations on symbolic bases and tensors.
This module combines point-group transforms with QTen Hilbert spaces and tensors. The helpers assemble \(D(g)\) (including the \(SU(2)\) factor on a spinful space), twirl operators by conjugation, and project columns into abelian phase sectors, ordinary finite-group irreps, or projective spinor irreps.
Repository usage
Use hilbert_repr() and the related
projection helpers when an existing
PointGroupElement,
PointGroupOpr, or
FinitePointGroup should act on
symbolic Hilbert-space data. Group definitions live in
qten.pointgroups.elements and
qten.pointgroups.finite.
point_group_operator_symmetrize
point_group_operator_symmetrize(
group: FinitePointGroup,
operator: Tensor,
*,
fixpoint: Offset | None = None,
rebase_fixpoint: bool = False,
) -> Tensor
Average an operator over a finite point group by unitary conjugation.
This computes [ A_G = |G|^{-1}\sum_{g\in G} D(g)\,A\,D(g)^\dagger. ] The average commutes with every \(D(h)\). Unlike character projection of state vectors, conjugation averaging does not need ordinary or spinor characters: if a lift is replaced by \(\eta(g)u(g)\) with \(\eta(g)\in\{\pm 1\}\), the same factor appears in \(D(g)\) and \(D(g)^\dagger\) and cancels.
The two matrix dimensions of operator must describe the same
HilbertSpace. That space
must be closed under every point-group operation; otherwise representation
assembly raises ValueError.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group
|
FinitePointGroup
|
Finite point group whose elements generate the average. |
required |
operator
|
Tensor
|
Rank-2 tensor whose two dimensions are the same ordered
|
required |
fixpoint
|
Offset | None
|
Desired invariant point. When set, each group element is wrapped as
a |
None
|
rebase_fixpoint
|
bool
|
Forwarded to
|
False
|
Returns:
| Type | Description |
|---|---|
Tensor
|
The conjugation-averaged operator on the same Hilbert space. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/qten/pointgroups/ops.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 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 | |
spinful_transform_basis
spinful_transform_basis(
opr: PointGroupOpr, psi: U1Basis
) -> U1Span
Apply \(D_{\mathrm{orb}}(g)\otimes u(g)\) to a single basis state.
On a product label \(|\mathrm{orb},s\rangle\),
[
D(g)|\mathrm{orb},s\rangle
=\sum_{s'}u(g)_{s's}\,|g\cdot\mathrm{orb},\,s'\rangle.
]
Spatial irreps that opr allows are transformed as usual. The
Spin irrep is expanded with the \(SU(2)\) factor.
Returns a U1Span because spin
mixing generally produces a superposition.
Source code in src/qten/pointgroups/ops.py
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 | |
spinful_hilbert_opr_repr
spinful_hilbert_opr_repr(
opr: PointGroupOpr,
space: HilbertSpace,
*,
device: Optional[Device] = None,
) -> Tensor
Matrix of \(D(g)=D_{\mathrm{orb}}(g)\otimes u(g)\) on a spinful Hilbert space.
Columns of \(u(g)\) are ordered \((\uparrow,\downarrow)\). Fast path: compute the \(SU(2)\) factor once, cache the orbital image of each distinct non-spin irrep tuple, and scatter numerical amplitudes into a dense matrix. This avoids per-basis SymPy Gram assembly used by the earlier prototype and is suitable for full finite-group symmetrization.
When every Offset label in space is
lattice-backed and already intra-cell fractional, orbital images are
folded with Offset.fractional() before lookup so primitive-lattice
translations match the stored unit-cell basis. This is a local/Γ-point
representation; nonzero-momentum Bloch phases require an explicit
momentum-dependent representation and are not inserted here.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
opr
|
PointGroupOpr
|
Point operation, including any affine center already set on it. |
required |
space
|
HilbertSpace
|
Spinful Hilbert space. Every basis state must carry exactly one
|
required |
device
|
Optional[Device]
|
Device for the returned tensor. |
None
|
Returns:
| Type | Description |
|---|---|
Tensor
|
Square tensor of \(D_{\mathrm{orb}}(g)\otimes u(g)\) on |
Source code in src/qten/pointgroups/ops.py
633 634 635 636 637 638 639 640 641 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 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 730 731 | |
get_direct_transform
get_direct_transform(
opr: PointGroupOpr,
space: HilbertSpace,
*,
device: Optional[Device] = None,
) -> Tensor
Build the external basis-mapping tensor from a Hilbert space to its transformed image.
Unlike hilbert_opr_repr(), this helper does not require opr to preserve the ray structure of
space. Instead it explicitly constructs the transformed output
HilbertSpace and returns a one-hot mapping matrix with dims (space, out_space).
Spinful Hilbert spaces are rejected: a generic \(SU(2)\) factor maps one
basis state to a superposition, which this one-to-one mapping cannot
express. Use hilbert_repr instead.
When a basis state contains a PointGroupBasis irrep, that irrep is transformed directly in the Euclidean polynomial basis.
In particular, no eigen-phase is factored out. For example, a basis
function x rotated by C4 is mapped to y in the output space rather
than left as x with a phase in the tensor data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
opr
|
PointGroupOpr
|
Point-group operator used to transform basis labels. |
required |
space
|
HilbertSpace
|
Input Hilbert space whose ordered basis defines the source axis. |
required |
device
|
Optional[Device]
|
Device on which to allocate the returned mapping tensor. |
None
|
Returns:
| Type | Description |
|---|---|
Tensor
|
Rank-2 tensor with dimensions |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If any basis state in |
Source code in src/qten/pointgroups/ops.py
760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 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 | |
hilbert_repr
hilbert_repr(
opr: PointGroupOpr,
space: HilbertSpace,
*,
device: Optional[Device] = None,
) -> Tensor
Assemble the Hilbert-space representation \(D(g)\) of a point operation.
Spinless spaces use \(D(g)=D_{\mathrm{orb}}(g)\). Spinful spaces use
[
D(g)\,|\mathrm{orb},s\rangle
=\sum_{s'}u(g)_{s's}\,|g\cdot\mathrm{orb},\,s'\rangle,
]
i.e. \(D(g)=D_{\mathrm{orb}}(g)\otimes u(g)\). Each basis irrep is
transformed on its own: lattice
Offset labels may be folded back into
the unit cell, PointGroupBasis
polynomials are canonicalized onto labels already present in space, and
Spin is expanded by the \(SU(2)\) lift. This
function has no fixpoint=; recenter opr with
fixpoint_at
first.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
opr
|
PointGroupOpr
|
Point operation, including any affine center already set on it. |
required |
space
|
HilbertSpace
|
Ordered basis. Must be closed under |
required |
device
|
Optional[Device]
|
Device for the returned tensor. |
None
|
Returns:
| Type | Description |
|---|---|
Tensor
|
Square tensor of \(D(g)\) on |
Source code in src/qten/pointgroups/ops.py
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 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 | |
joint_point_group_basis
joint_point_group_basis(
oprs: Sequence[PointGroupElement | PointGroupOpr],
order: int,
) -> FrozenDict[
tuple[sy.Expr, ...], tuple[PointGroupBasis, ...]
]
Compute common Euclidean eigenfunctions for a commuting family of abelian operators.
The returned table is keyed by one phase per input operator. Each value is
the tuple of normalized PointGroupBasis
functions spanning the simultaneous eigenspace for that joint phase sector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
oprs
|
Sequence[PointGroupElement | PointGroupOpr]
|
Non-empty sequence of operators. Affine
|
required |
order
|
int
|
Homogeneous polynomial degree used for all Euclidean representations. |
required |
Returns:
| Type | Description |
|---|---|
FrozenDict[tuple[Expr, ...], tuple[PointGroupBasis, ...]]
|
Mapping from joint phase tuple to the simultaneous eigen-basis functions for that sector. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/qten/pointgroups/ops.py
1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 | |
point_group_column_symmetrize
point_group_column_symmetrize(
opr: PointGroupOpr | FinitePointGroup,
w: Tensor,
full_sector: bool = False,
*,
fixpoint: Offset | None = None,
rebase_fixpoint: bool = False,
) -> Tensor
Symmetrize the columns of w by projecting each one onto symmetry sectors.
For a finite-order abelian operator opr of spatial order \(n\), each
exact spinless sector is labeled by a root of unity \(\zeta^n=1\). For
spin-1/2 the safe common period is \(N=2n\), because a \(2\pi\) proper
spin rotation is \(-I\), and the sector is a
SpinfulPhaseSector.
The projector on \(G=D(g)\) is
[
P_\zeta=\frac{1}{N}\sum_{k=0}^{N-1}\zeta^{-k}G^k,\qquad\zeta^N=1,
]
with \(N=n\) spinless and \(N=2n\) spinful. The period \(2n\) need not
be minimal when the proper spin factor is already the identity.
If opr is a FinitePointGroup,
this routine uses
[
P^\mu=\frac{d_\mu}{|G|}\sum_{g\in G}\chi^\mu(g)^*D(g).
]
Spinless spaces use ordinary (linear) \(\chi\). Spaces that already
contain Spin use the group's \(SU(2)\) section and
element-wise projective \(\chi\), unless the group was defined with
spin="trivial". A cyclic
PointGroupOpr is the
abelian special case: one-dimensional characters \(\zeta^k\).
The projector is applied to each input column separately. When
full_sector is True, every
nonzero projected sector component is returned. When full_sector is
False, only the dominant nonzero sector component of each input column is
kept, so the output column count does not exceed the input count.
Returned columns carry a sector label:
FiniteIrrepSector for ordinary
finite-group irreps,
SpinorIrrepSector for
projective spinor irreps, or
SpinfulPhaseSector /
PointGroupBasis for abelian
phase sectors.
The output column count can differ from the input one only when
full_sector=True, because symmetry projection may split one approximate
column into multiple exact sectors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
opr
|
PointGroupOpr | FinitePointGroup
|
Symmetry descriptor. |
required |
w
|
Tensor
|
Rank-2 tensor whose first dimension is a
|
required |
full_sector
|
bool
|
If |
False
|
fixpoint
|
Offset | None
|
Desired invariant point. When set, each group element is wrapped as
a |
None
|
rebase_fixpoint
|
bool
|
Forwarded to
|
False
|
Returns:
| Type | Description |
|---|---|
Tensor
|
Rank-2 tensor with the same row Hilbert space and a column
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/qten/pointgroups/ops.py
1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 | |
joint_point_group_column_symmetrize
joint_point_group_column_symmetrize(
oprs: Sequence[PointGroupOpr],
w: Tensor,
full_sector: bool = False,
*,
group: FinitePointGroup | None = None,
) -> Tensor
Symmetrize columns of w into simultaneous sectors of abelian operators.
The operators in oprs are expected to commute on w.dims[0]. For each
operator this builds the same \(P_\zeta\) as
point_group_column_symmetrize.
A joint sector is the product projector
\(P_{\zeta_1}\cdots P_{\zeta_m}\) over the Cartesian product of those
roots of unity.
When full_sector is True, every nonzero joint-sector component is
returned. When False, only the dominant nonzero joint-sector component of
each input column is kept. Spinless columns carry a representative common
PointGroupBasis for the
corresponding joint phase sector. Spinful columns carry one
JointSpinfulPhaseSector.
This helper has no fixpoint= argument. Center each operator with
fixpoint_at
before calling it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
oprs
|
Sequence[PointGroupOpr]
|
Non-empty sequence of finite-order abelian operators. They are expected
to commute on the row Hilbert space of |
required |
w
|
Tensor
|
Rank-2 tensor whose first dimension is a
|
required |
full_sector
|
bool
|
If |
False
|
group
|
FinitePointGroup | None
|
Parent finite point group. Required when |
None
|
Returns:
| Type | Description |
|---|---|
Tensor
|
Rank-2 tensor with the same row Hilbert space and a column
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/qten/pointgroups/ops.py
1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 | |