capcup¶
Invert a bond direction between two tensors with phase corrections.
capcup
¶
Invert both directions of a contraction pair (bond) between two tensors.
A contraction pair is a bond where one tensor has an outgoing index and the
other has an incoming index carrying the same itag. capcup inverts both
directions (equivalent to inserting a cap-cup metric on the bond) and, for
SU(2) tensors, multiplies each block of B by the Frobenius-Schur (FS) phase
(-1)^{2j} determined by the spin at that block's bond position. After
this operation the bond direction is reversed but all tensor contractions
that involve this bond yield the same numerical result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
A
|
Tensor
|
First tensor. |
required |
axis_a
|
int
|
Integer position of the bond axis in A. |
required |
B
|
Tensor
|
Second tensor. |
required |
axis_b
|
int
|
Integer position of the bond axis in B. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the two indices do not share the same itag, or do not have opposite directions (required for a contraction pair). |
Notes
The FS phase is absorbed into B's intertwiner weights, which are much
smaller than the data blocks (shape (num_components, om_dimension)
vs. (d1, ..., dn, num_components)). For Abelian groups no phase
is applied.
In yuzuha's left-associative CG fusion tree the first (n−1) axes are leading axes and the last axis is the terminal axis (the total coupled representation). The FS phase (-1)^{2j} is applied if and only if both bonds are at the same axis type — both leading or both terminal — because only then does the combined X-symbol transformation require a non-trivial correction.
Description¶
capcup inverts the directions of a contraction pair (bond) between two tensors — equivalent to inserting a cap-cup metric on the bond. For SU(2) tensors, it also applies the Frobenius–Schur (FS) phase \((-1)^{2j}\) to each block of B at the relevant bond position, keeping all subsequent contractions numerically correct after the direction reversal. For Abelian groups, only the directions are flipped and no phase is applied.
The FS phase is absorbed into the intertwiner weights of B (shape (num_components, om_dimension)), which is much smaller than the full data blocks.
Use capcup for bond inversion, not Tensor.invert()
Whenever you need to invert a bond — a pair of compatible indices eligible for contraction — always use capcup. Tensor.invert() acts on a single tensor in isolation and is unaware of the paired index on the other tensor; it cannot apply the necessary corrections consistently across both sides. Tensor.invert() should only be used alone, on a free index, and with extreme caution.
See Also¶
- conj: Conjugate all indices of a tensor
- Yuzuha Protocol: SU(2) intertwiner and FS phase background
- Examples: Manipulation
Notes¶
- Both
axis_aandaxis_bmust refer to the shared bond: same itag and opposite directions. - The FS phase \((-1)^{2j}\) is applied only when both bond axes are of the same type (both leading or both terminal) in their respective CG fusion trees.
capcupmodifies bothAandBin place and returnsNone.