cuquantum.cutensornet.create_network_descriptor¶
- cuquantum.cutensornet.create_network_descriptor(intptr_t handle, int32_t n_inputs, n_modes_in, extents_in, strides_in, modes_in, qualifiers_in, int32_t n_modes_out, extents_out, strides_out, modes_out, int data_type, int compute_type) intptr_t ¶
Create a tensor network descriptor.
- Parameters
handle (intptr_t) – The library handle.
n_inputs (int) – The number of input tensors.
n_modes_in –
A host array of the number of modes for each input tensor. It can be
extents_in –
A host array of extents for each input tensor. It can be
strides_in –
A host array of strides for each input tensor. It can be
modes_in –
A host array of modes for each input tensor. It can be
qualifiers_in –
A host array of qualifiers for each input tensor. It can be
an
int
as the pointer address to the numpy array with dtypetensor_qualifiers_dtype
a numpy array with dtype
tensor_qualifiers_dtype
n_modes_out (int32_t) – The number of modes of the output tensor. If this is set to -1 and
modes_out
is set to 0 (not provided), the output modes will be inferred. If this is set to 0, the network is force reduced.extents_out –
The extents of the output tensor (on host). It can be
strides_out –
The strides of the output tensor (on host). It can be
modes_out –
The modes of the output tensor (on host). It can be
data_type (cuquantum.cudaDataType) – The data type of the input and output tensors.
compute_type (cuquantum.ComputeType) – The compute type of the tensor contraction.
- Returns
An opaque descriptor handle (as Python
int
).- Return type
intptr_t
Note
If
strides_in
(strides_out
) is set to 0 (NULL
), it means the input tensors (output tensor) are in the Fortran layout (F-contiguous).See also