cuquantum.OptimizerOptions

class cuquantum.OptimizerOptions(samples: Optional[int] = None, threads: Optional[int] = None, path: Optional[Union[types.PathFinderOptions, Iterable[Tuple[int, int]]]] = None, slicing: Optional[Union[types.SlicerOptions, Iterable[Hashable], Iterable[Tuple[Hashable, int]]]] = None, reconfiguration: Optional[types.ReconfigOptions] = None, seed: Optional[int] = None, cost_function: Optional[int] = None, smart: Optional[bool] = 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

Optional[int]

threads

Number of threads for the hyperoptimizer. See CUTENSORNET_CONTRACTION_OPTIMIZER_CONFIG_HYPER_NUM_THREADS.

Type

Optional[int]

path

Options for the path finder (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

Optional[Union[types.PathFinderOptions, Iterable[Tuple[int, int]]]]

slicing

Options for the slicer (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

Optional[Union[types.SlicerOptions, Iterable[Hashable], Iterable[Tuple[Hashable, int]]]]

reconfiguration

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

Type

Optional[types.ReconfigOptions]

seed

Optional seed for the random number generator. See CUTENSORNET_CONTRACTION_OPTIMIZER_CONFIG_SEED.

Type

Optional[int]

cost_function

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

Type

Optional[int]

smart

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

Type

Optional[bool]