symtensor.tools package

Submodules

symtensor.tools.logger module

symtensor.tools.logger.flush(rec, msg, *args)
symtensor.tools.logger.log(rec, msg, *args)
symtensor.tools.logger.timer(rec, msg, cpu0=None, wall0=None)
symtensor.tools.logger.timer_debug(rec, msg, cpu0=None, wall0=None)

symtensor.tools.path module

class symtensor.tools.path.Fakearray(shape, sym=None)

Bases: object

symtensor.tools.path.einsum_path(subscript, *operands)

A replica of numpy.core.einsumfunc.einsum_path for symtensor einsum path is generated by greedy algorithm on ‘dense’ tensor representation

symtensor.tools.utills module

symtensor.tools.utills.count_indep_vars(string_lst)

Compute the number of independent variables from a list of strings

symtensor.tools.utills.enumerate_rep(sym_label, delta_strings, force_out=None)

Enumerate all irreducible representation from the given symmetry string and the delta relations

symtensor.tools.utills.estimate_cost(symlist, dic)

estimate the cost for the main contraction based on the dimension dictionary

symtensor.tools.utills.find_path(sym_labels, delta_lst, Nind, bond_dict)

find the transformation and contraction path for all tensors

symtensor.tools.utills.is_direct(sym_lst, Nind, full=True)

determind if the input sym_label_lst can be contracted directed directly

symtensor.tools.utills.lst_to_sub(string_lst)

convert a string list to einsum subscript

symtensor.tools.utills.make_dict(delta_strings, delta_tensors)

generate the dictionary for estimating cost

symtensor.tools.utills.make_subscript(sym_label, orb_label, full=True)

generate an einsum subscript from symmetry label and orbital label

symtensor.tools.utills.pre_processing(string_lst, symA, symB)

compute the output symmetry from the contraction of symA and symB

symtensor.tools.utills.set_to_str(setA)

convert a set of characters to string in sorted order

symtensor.tools.utills.sub_to_lst(subscript)

convert an einsum subscript to string list

symtensor.tools.utills.unfold_path(current_tab, tab, delta_lst, reverse=False)

recover the transformation path from the given position

Module contents