Python objects & constants¶
Objects¶
NumPy dtype object that represents the |
|
NumPy dtype object that represents the |
|
NumPy dtype object that represents the |
|
NumPy dtype object that represents the |
Enums¶
|
See |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Python functions¶
Handle Management API¶
|
Initializes the cuTensorNet library. |
|
Destroys the cuTensorNet library handle. |
Network Descriptor API¶
|
Initializes a |
|
Frees all the memory associated with the network descriptor. |
Creates a |
|
|
Gets attributes of network_descriptor. |
|
Sets attributes of network_descriptor. |
|
Get the Python data type of the corresponding NetworkAttribute attribute. |
Tensor Descriptor API¶
|
Initializes a |
|
Frees all the memory associated with the tensor descriptor. |
|
Get the tensor's metadata. |
Contraction Optimizer API¶
Allocates resources for |
|
Create an optimizerInfo object from the provided buffer. |
|
Update the provided |
|
Frees all the memory associated with |
|
Get the Python data type of the corresponding ContractionOptimizerInfoAttribute attribute. |
|
Gets attributes of |
|
Sets attributes of optimizer_info. |
|
Gets the packed size of the |
|
Packs the |
|
Sets up the required hyper-optimization parameters for the contraction order solver (see |
|
Frees all the memory associated with |
|
Get the Python data type of the corresponding ContractionOptimizerConfigAttribute attribute. |
|
Gets attributes of |
|
Sets attributes of |
|
|
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. |
Contraction Plan API¶
|
Initializes a |
|
Frees all resources owned by |
Sets up the required auto-tune parameters for the contraction plan. |
|
Frees all the memory associated with |
|
Get the Python data type of the corresponding ContractionAutotunePreferenceAttribute attribute. |
|
Gets attributes of |
|
Sets attributes of |
|
|
Auto-tunes the contraction plan to find the best |
Workspace Management API¶
|
Creates a workspace descriptor that holds information about the user provided memory buffer. |
|
Frees the workspace descriptor. |
Computes the workspace size needed to contract the input tensor network using the provided contraction path. |
|
|
Computes the workspace size needed to perform the tensor QR operation. |
|
Computes the workspace size needed to perform the tensor SVD operation. |
Computes the workspace size needed to perform the gating operation. |
|
|
Retrieves the needed workspace size for the given workspace preference, memory space, workspace kind. |
|
Sets the memory address and workspace size of the workspace provided by user. |
|
Retrieves the memory address and workspace size of workspace hosted in the workspace descriptor. |
|
Purges the cached data in the specified memory space. |
Memory Management API¶
|
Set the device memory handler for cuTensorNet. |
|
Get the device memory handler for cuTensorNet. |
Network Contraction API¶
|
Performs the actual contraction of the tensor network. |
Gradient Computation API¶
|
Computes the gradients of the network w.r.t. |
Slice Group API¶
Create a |
|
|
Create a slice group from a sequence of slice IDs. |
|
Releases the resources associated with a |
Approximate Tensor Network Execution API¶
|
Performs QR decomposition of a tensor. |
|
Performs SVD decomposition of a tensor. |
|
Performs gate split operation. |
Tensor SVD Config API¶
|
Sets up the options for singular value decomposition and truncation. |
|
Frees all the memory associated with the tensor svd configuration. |
|
Get the Python data type of the corresponding TensorSVDConfigAttribute attribute. |
Gets attributes of |
|
Sets attributes of |
|
|
Get the Python data type of the corresponding tensor SVD parameters attribute. |
Tensor SVD Info API¶
|
Sets up the information for singular value decomposition. |
|
Frees all the memory associated with the TensorSVDInfo object. |
|
Get the Python data type of the corresponding TensorSVDInfoAttribute attribute. |
Gets attributes of |
|
|
Get the Python data type of the corresponding tensor SVD status attribute. |
Distributed Parallelization API¶
Resets the distributed MPI parallelization configuration. |
|
|
Queries the number of MPI ranks in the current distributed MPI configuration. |
|
Queries the rank of the current MPI process in the current distributed MPI configuration. |
|
Globally synchronizes all MPI processes in the current distributed MPI configuration, ensuring that all preceding cutensornet API calls have completed across all MPI processes. |
|
Simple helper to get the address to and size of a |
High-Level Tensor Network API¶
|
Creates an empty tensor network state of a given shape defined by the number of primary tensor modes and their extents. |
|
Frees all resources owned by the tensor network state. |
|
DEPRECATED: Applies a tensor operator to the tensor network state. |
|
Applies a tensor operator to the tensor network state. |
Applies a controlled tensor operator to the tensor network state. |
|
|
Applies a tensor channel consisting of one or more unitary tensor operators to the tensor network state. |
Applies a tensor network operator to a tensor network state. |
|
|
Registers an external update of the elements of the specified tensor operator that was previously applied to the tensor network state. |
Registers an external update of the elements of the specified tensor operator that was previously applied to the tensor network state. |
|
|
Get the Python data type of the corresponding StateAttribute attribute. |
|
Configures computation of the full tensor network state, either in the exact or a factorized form. |
|
Prepares computation of the full tensor network state, either in the exact or a factorized form. |
|
Retrieves an attribute related to computation of the full tensor network state, either in the exact or a factorized form. |
|
Computes the tensor network state representation. |
|
Imposes a user-defined MPS (Matrix Product State) factorization on the initial tensor network state with the given shape and data. |
|
Imposes a user-defined MPS (Matrix Product State) factorization on the final tensor network state with the given shape. |
|
Resets the tensor network state to the MPS state previously computed via |
|
Get the output state tensors' metadata. |
|
Creates a representation of the specified marginal tensor for a given tensor network state. |
|
Destroys the tensor network state marginal. |
|
Get the Python data type of the corresponding MarginalAttribute attribute. |
|
Configures computation of the requested tensor network state marginal tensor. |
|
Prepares computation of the requested tensor network state marginal tensor. |
|
Retrieves an attribute related to computation of the requested tensor network state marginal tensor. |
|
Computes the requested tensor network state marginal tensor. |
|
Creates a tensor network state sampler. |
|
Destroys the tensor network state sampler. |
|
Get the Python data type of the corresponding SamplerAttribute attribute. |
|
Configures the tensor network state sampler. |
|
Prepares the tensor network state sampler. |
|
Retrieves an attribute related to tensor network state sampling. |
|
Performs sampling of the tensor network state, that is, generates the requested number of samples. |
|
Creates a tensor network state amplitudes accessor. |
|
Destroyes the tensor network state amplitudes accessor. |
|
Get the Python data type of the corresponding AccessorAttribute attribute. |
|
Configures computation of the requested tensor network state amplitudes tensor. |
|
Prepares computation of the requested tensor network state amplitudes tensor. |
|
Retrieves an attribute related to computation of the requested tensor network state amplitudes tensor. |
|
Computes the amplitudes of the tensor network state. |
|
Creates a representation of the tensor network state expectation value. |
|
Destroyes the tensor network state expectation value representation. |
|
Get the Python data type of the corresponding ExpectationAttribute attribute. |
|
Configures computation of the requested tensor network state expectation value. |
|
Prepares computation of the requested tensor network state expectation value. |
|
Retrieves an attribute related to computation of the requested tensor network state expectation value. |
|
Computes an (unnormalized) expectation value of a given tensor network operator over a given tensor network state. |
Tensor Network Operator API¶
|
Creates an uninitialized tensor network operator of a given shape defined by the number of state modes and their extents. |
Appends a tensor product operator component to the tensor network operator. |
|
|
Appends a Matrix Product Operator (MPO) component to the tensor network operator. |
Frees all resources owned by the tensor network operator. |
Error Management API¶
|
Returns the description string for an error code. |
Logger API¶
|
Set the logger callback along with arguments. |
|
This function opens a logging output file in the given path. |
|
This function sets the value of the logging level. |
|
This function sets the value of the log mask. |
This function disables logging for the entire run. |
|
|
This function sets the logging output file. |
Versioning API¶
Returns Version number of the cuTensorNet library. |
|
Returns version number of the CUDA runtime that cuTensorNet was compiled against. |