auto_contractor.cache_compiled_cexpr

auto_contractor.cache_compiled_cexpr(calc_cexpr, path, *, is_cython=True, is_distillation=False, base_positions_dict=None)[source]

Return an CCExpr created from cexpr = calc_cexpr() and cache the results.

Save cexpr object in pickle format for future reuse. Generate python code and save for future reuse. Create CCExpr with loaded python/cython module. Return fully loaded ccexpr. !!!Note that the module will not be reloaded if it has been loaded before!!!