cuquantum.cutensornet.marginal_configure

cuquantum.cutensornet.marginal_configure(intptr_t handle, intptr_t tensor_network_marginal, int attribute, intptr_t attribute_value, size_t attribute_size)[源代码]

配置请求的张量网络状态边缘张量的计算。

参数
  • handle (intptr_t) – cuTensorNet 库句柄。

  • tensor_network_marginal (intptr_t) – 张量网络状态边缘表示。

  • attribute (MarginalAttribute) – 配置属性。

  • attribute_value (intptr_t) – 指向配置属性值的指针(类型擦除)。

  • attribute_size (size_t) – 配置属性值的大小。

注意

要计算属性大小,请使用相应数据类型的 itemsize,可以使用 get_marginal_attribute_dtype() 查询。