cuquantum.OptimizerInfo

class cuquantum.OptimizerInfo(largest_intermediate: float, opt_cost: float, path: Iterable[Tuple[int, int]], slices: Iterable[Tuple[Hashable, int]], num_slices: int, intermediate_modes: Iterable[Iterable[Hashable]])[source]

A data class for capturing optimizer information.

largest_intermediate

The number of elements in the largest intermediate tensor. See CUTENSORNET_CONTRACTION_OPTIMIZER_INFO_LARGEST_TENSOR.

Type

float

opt_cost

The FLOP count of the optimized contraction path. See CUTENSORNET_CONTRACTION_OPTIMIZER_INFO_FLOP_COUNT.

Type

float

path

The contraction path as a sequence of pairs in the numpy.einsum_path() format.

Type

Iterable[Tuple[int, int]]

slices

A sequence of (sliced mode, sliced extent) pairs.

Type

Iterable[Tuple[Hashable, int]]

num_slices

The number of slices.

Type

int

intermediate_modes

A sequence of mode labels for all intermediate tensors

Type

Iterable[Iterable[Hashable]]