tensornetwork.U1Charge¶
-
class
tensornetwork.U1Charge(charges: Union[List[T], numpy.ndarray], charge_labels: Optional[numpy.ndarray] = None, charge_types: Optional[List[Type[BaseCharge]]] = None, charge_dtype: Optional[Type[numpy.number]] = <class 'numpy.int16'>)¶ Charge Class for the U1 symmetry group.
-
__init__(charges: Union[List[T], numpy.ndarray], charge_labels: Optional[numpy.ndarray] = None, charge_types: Optional[List[Type[BaseCharge]]] = None, charge_dtype: Optional[Type[numpy.number]] = <class 'numpy.int16'>) → None¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(charges, numpy.ndarray], …)Initialize self. copy()Return a copy of BaseCharge.dual(take_dual)Return the charges of BaseCharge, possibly conjugated.dual_charges(charges)fuse(charge1, charge2)identity_charge()intersect(other[, assume_unique, return_indices])Compute the intersection of selfwithother.U1Charge.isinrandom(dimension, minval, maxval)reduce(target_charges, numpy.ndarray], …)Reduce the dimension of a charge to keep only the charge values that intersect target_charges :param target_charges: array of unique charges to keep. U1Charge.sort_unique_chargesunique(return_index, return_inverse, …)Compute the unique charges in BaseCharge.Attributes
chargesU1Charge.degeneraciesdimdtypeidentity_charges(dim)Returns the identity charge. U1Charge.label_dtypeU1Charge.num_symmetriesnum_uniqueReturn the number of different charges in ChargeCollection.-