OptimizerOptions#

class cuquantum.tensornet.OptimizerOptions(
samples: int | None = None,
threads: int | None = None,
path: PathFinderOptions | Iterable[Tuple[int, int]] | None = None,
slicing: SlicerOptions | Iterable[Hashable] | Iterable[Tuple[Hashable, int]] | None = None,
reconfiguration: ReconfigOptions | None = None,
seed: int | None = None,
cost_function: int | None = None,
smart: bool | None = None,
)[source]#

A data class for providing options to the cuTensorNet optimizer.

samples#

Number of samples for hyperoptimization. See CUTENSORNET_CONTRACTION_OPTIMIZER_CONFIG_HYPER_NUM_SAMPLES.

Type:

int | None

threads#

Number of threads for the hyperoptimizer. See CUTENSORNET_CONTRACTION_OPTIMIZER_CONFIG_HYPER_NUM_THREADS.

Type:

int | None

path#

Options for the path finder (cuquantum.tensornet.PathFinderOptions object or dict containing the (parameter, value) items for PathFinderOptions). Alternatively, the path can be provided as a sequence of pairs in the numpy.einsum_path() format.

Type:

types.PathFinderOptions | Iterable[Tuple[int, int]] | None

slicing#

Options for the slicer (cuquantum.tensornet.SlicerOptions object or dict containing the (parameter, value) items for SlicerOptions). Alternatively, a sequence of sliced modes or sequence of (sliced mode, sliced extent) pairs can be directly provided.

Type:

types.SlicerOptions | Iterable[Hashable] | Iterable[Tuple[Hashable, int]] | None

reconfiguration#

Options for the reconfiguration algorithm as a cuquantum.tensornet.ReconfigOptions object or dict containing the (parameter, value) items for ReconfigOptions.

Type:

types.ReconfigOptions | None

seed#

Optional seed for the random number generator. See CUTENSORNET_CONTRACTION_OPTIMIZER_CONFIG_SEED.

Type:

int | None

cost_function#

The objective function to use for finding the optimal contraction path. See CUTENSORNET_CONTRACTION_OPTIMIZER_CONFIG_COST_FUNCTION_OBJECTIVE.

Type:

int | None

smart#

Whether the optimizer can execute the pre-defined, intelligent heuristics to accelerate path optimization. See CUTENSORNET_CONTRACTION_OPTIMIZER_CONFIG_SMART_OPTION.

Type:

bool | None