tensornetwork.Index

class tensornetwork.Index(charges: Union[List[tensornetwork.block_sparse.charge.BaseCharge], tensornetwork.block_sparse.charge.BaseCharge], flow: Union[List[bool], bool])

An index class to store indices of a symmetric tensor.

__init__(charges: Union[List[tensornetwork.block_sparse.charge.BaseCharge], tensornetwork.block_sparse.charge.BaseCharge], flow: Union[List[bool], bool]) → None

Initialize an Index object.

Methods

__init__(charges, …) Initialize an Index object.
copy()
returns:
flip_flow() Flip the flow if Index.

Attributes

charges Return the fused charges of the index.
dim
flat_charges A list containing the elementary indices
flat_flows A list containing the elementary indices
charges

Return the fused charges of the index. Note that flows are merged into the charges.

copy() → tensornetwork.block_sparse.index.Index
Returns:
A deep copy of Index. Note that all children of
Index are copied as well.
Return type:Index
flat_charges
A list containing the elementary indices
of Index.
Type:Returns
Type:List
flat_flows
A list containing the elementary indices
of Index.
Type:Returns
Type:List
flip_flow() → tensornetwork.block_sparse.index.Index

Flip the flow if Index. :returns: Index