cotengra.pathfinders.path_compressed#

Compressed contraction tree finding routines.

Module Contents#

Classes#

MiniTree

A very minimal tree data structure for tracking possible contractions

EmptyMiniTree

Node

A possible intermediate contraction state.

WindowedOptimizer

Functions#

class cotengra.pathfinders.path_compressed.MiniTree#

A very minimal tree data structure for tracking possible contractions within a window only.

__slots__ = ('children', 'parents', 'leaves', 'candidates')#
copy()#
add(p, l, r)#
contract(p)#
__repr__()#

Return repr(self).

class cotengra.pathfinders.path_compressed.EmptyMiniTree(hgi, hgf)#
__slots__ = ('candidates',)#
copy()#
contract(p)#
class cotengra.pathfinders.path_compressed.Node(hg, plr, chi, tracker, compress_late=False)#

A possible intermediate contraction state.

__slots__ = ('hg', 'plr', 'chi', 'tracker', 'compress_late')#
classmethod first(inputs, output, size_dict, minimize)#
next(p, l, r)#
graph_key()#
__repr__()#

Return repr(self).

cotengra.pathfinders.path_compressed.ssa_path_to_bit_path(path)#
cotengra.pathfinders.path_compressed.bit_path_to_ssa_path(bitpath)#
class cotengra.pathfinders.path_compressed.WindowedOptimizer(inputs, output, size_dict, minimize, ssa_path, seed=None)#
property tracker#
plot_size_footprint(figsize=(8, 3))#
optimize_window(ci, cf, order_only=False, max_window_tries=1000, score_temperature=0.0, queue_temperature=1.0, scorer=None, queue_scorer=None)#
refine(window_size=20, max_iterations=100, order_only=False, max_window_tries=1000, score_temperature=0.01, queue_temperature=1.0, scorer=None, queue_scorer=None, progbar=False, **kwargs)#
get_ssa_path()#