cuquantum.cutensornet.expectation_compute

cuquantum.cutensornet.expectation_compute(intptr_t handle, intptr_t expectation, intptr_t workspace, intptr_t expectation_value, intptr_t state_norm, intptr_t stream)[source]

Computes the tensor network state expectation value.

Parameters
  • handle (intptr_t) – The library handle.

  • expectation (intptr_t) – The tensor network expectation computation handle.

  • workspace (intptr_t) – The workspace descriptor.

  • expectation_value (intptr_t) – The pointer address (as Python int) for storing the computed expectation_value (stored on host).

  • state_norm (intptr_t) – The pointer address (as Python int) for storing the 2-norm of the underlying state. If set to 0 (NULL pointer), the norm calculation will be ignored.

  • stream (intptr_t) – The CUDA stream handle (cudaStream_t as Python int).