cuquantum.cutensornet.expectation_configure¶
- cuquantum.cutensornet.expectation_configure(intptr_t handle, intptr_t expectation, int attr, intptr_t buf, size_t size)[source]¶
Configures computation of the tensor network state expectation value.
- Parameters
handle (intptr_t) – The library handle.
expectation (intptr_t) – The tensor network expectation computation handle.
attr (ExpectationAttribute) – The attribute to configure.
buf (intptr_t) – The pointer address (as Python
int
) of the attribute value.size (size_t) – The size of
buf
(in bytes).
Note
To compute
size
, use the itemsize of the corresponding data type, which can be queried usingexpectation_get_attribute_dtype()
.See also