Skip to content

identity

Create a 2-index identity tensor.

identity

identity(
    index: Index,
    *,
    dtype: dtype = torch.float64,
    device: Optional[device] = None,
    itags: Optional[Tuple[str, str]] = None,
) -> Tensor

Return a 2nd order identity tensor between index and its conjugate index.

For Abelian groups, creates diagonal blocks with identity matrices. For generic groups (e.g., SU(2)), creates blocks with trailing reduced multiplicity dimension and intertwiner (Bridge) with proper normalization.

Parameters:

Name Type Description Default
index Index

The index to be paired with its flipped counterpart.

required
dtype dtype

Data type for the identity matrices stored in each block.

float64
device Optional[device]

Device for the tensor blocks. If None, defaults to torch.get_default_device().

None
itags Optional[Tuple[str, str]]

Optional tuple of tags for the two tensor indices. Defaults to ("_init_", "_init_").

None

Returns:

Type Description
Tensor

Tensor with two indices (original and flipped) whose blocks encode the identity matrices for each sector. For generic groups, includes intertwiner (intw) field with weights set to √(irrep_dim(q)).

Description

Returns a tensor with two indices (original and flipped) containing identity matrices for each charge sector. Represents the Kronecker delta δᵢⱼ with symmetry structure.

Block Structure

For each sector with charge q and dimension d:

  • Block (q, q) contains the d × d identity matrix
  • All other blocks are empty (not stored)

See Also