jet.bindings.TaskBasedContractorC128¶
-
class
TaskBasedContractorC128
¶ Bases:
pybind11_builtins.pybind11_object
TaskBasedContractor represents a tensor network contractor that contracts tensors concurrently using a task-based scheduler.
Attributes
Number of floating-point additions and multiplications required to implement the contraction tasks.
Number of elements in the non-leaf tensors.
Mapping from names to lists of parent node IDs.
Mapping from names to tensors.
Tensor at the end of the reduction task.
List of tensor results.
-
dtype
¶
-
flops
¶ Number of floating-point additions and multiplications required to implement the contraction tasks.
-
memory
¶ Number of elements in the non-leaf tensors.
-
name_to_parents_map
¶ Mapping from names to lists of parent node IDs.
-
name_to_tensor_map
¶ Mapping from names to tensors.
-
reduction_result
¶ Tensor at the end of the reduction task.
-
results
¶ List of tensor results.
Methods
add_contraction_tasks
(self, tn, path_info)Adds contraction tasks for a tensor network.
add_deletion_tasks
(self)Adds deletion tasks for intermediate tensors, deallocating each one when it is no longer needed.
add_reduction_task
(self)Adds a reduction task to sum the result tensors.
contract
(self)Executes the tasks in this task-based contractor.
-
add_contraction_tasks
(self: jet.bindings.TaskBasedContractorC128, tn: Jet::TensorNetwork<Jet::Tensor<std::complex<double> > >, path_info: jet.bindings.PathInfo) → int¶ Adds contraction tasks for a tensor network.
- Parameters
tn (TensorNetwork) – Tensor network to be contracted.
path_info (PathInfo) – Contraction path through the tensor network.
- Returns
Number of contraction tasks shared with previous calls to this method.
- Return type
int
-
add_deletion_tasks
(self: jet.bindings.TaskBasedContractorC128) → int¶ Adds deletion tasks for intermediate tensors, deallocating each one when it is no longer needed.
- Returns
Number of created deletion tasks.
- Return type
int
-
add_reduction_task
(self: jet.bindings.TaskBasedContractorC128) → int¶ Adds a reduction task to sum the result tensors.
- Returns
Number of created reduction tasks.
- Return type
int
-
contract
(self: jet.bindings.TaskBasedContractorC128) → None¶ Executes the tasks in this task-based contractor.
Warning
This is a blocking call.
-