cuquantum.cutensornet.contraction_optimize

cuquantum.cutensornet.contraction_optimize(intptr_t handle, intptr_t desc_net, intptr_t optimizer_config, uint64_t workspace_size_constraint, intptr_t optimizer_info)[source]

Computes an “optimized” contraction order as well as slicing info (for more information see Overview section) for a given tensor network such that the total time to solution is minimized while adhering to the user-provided memory constraint.

Parameters
  • handle (intptr_t) – Opaque handle holding cuTensorNet’s library context.

  • desc_net (intptr_t) – Describes the topology of the tensor network (i.e., all tensors, their connectivity and modes).

  • optimizer_config (intptr_t) – Holds all hyper-optimization parameters that govern the search for an “optimal” contraction order.

  • workspace_size_constraint (uint64_t) – Maximal device memory that will be provided by the user (i.e., cuTensorNet has to find a viable path/slicing solution within this user-defined constraint).

  • optimizer_info (intptr_t) – On return, this object will hold all necessary information about the optimized path and the related slicing information. optimizer_info will hold information including (see cutensornetContractionOptimizerInfoAttributes_t):.