cotengra.path_quickbb#

Module Contents#

Classes#

QuickBBOptimizer

Base class for different path optimizers to inherit from.

Functions#

optimize_quickbb(inputs, output, size_dict[, ...])

trial_quickbb(inputs, output, size_dict[, max_time, seed])

class cotengra.path_quickbb.QuickBBOptimizer(max_time=10, executable='quickbb_64', seed=None)#

Bases: opt_einsum.paths.PathOptimizer

Base class for different path optimizers to inherit from.

Subclassed optimizers should define a call method with signature:

def __call__(self, inputs, output, size_dict, memory_limit=None):
    """
    Parameters
    ----------
    inputs : list[set[str]]
        The indices of each input array.
    outputs : set[str]
        The output indices
    size_dict : dict[str, int]
        The size of each index
    memory_limit : int, optional
        If given, the maximum allowed memory.
    """
    # ... compute path here ...
    return path

where path is a list of int-tuples specifiying a contraction order.

run_quickbb(fname, outfile, statfile, max_time=None)#
build_tree(inputs, output, size_dict)#
__call__(inputs, output, size_dict, memory_limit=None)#
cotengra.path_quickbb.optimize_quickbb(inputs, output, size_dict, memory_limit=None, max_time=60, seed=None)#
cotengra.path_quickbb.trial_quickbb(inputs, output, size_dict, max_time=10, seed=None)#