cuquantum.cutensornet.expectation_configure¶
- cuquantum.cutensornet.expectation_configure(intptr_t handle, intptr_t tensor_network_expectation, int attribute, intptr_t attribute_value, size_t attribute_size)[源代码]¶
配置请求的张量网络状态期望值的计算。
- 参数
handle (intptr_t) – cuTensorNet 库句柄。
tensor_network_expectation (intptr_t) – 张量网络状态期望值表示。
attribute (ExpectationAttribute) – 配置属性。
attribute_value (intptr_t) – 指向配置属性值的指针(类型擦除)。
attribute_size (size_t) – 配置属性值的大小。
注意
要计算属性大小,请使用相应数据类型的 itemsize,可以使用
get_expectation_attribute_dtype()
查询。