expectation_prepare#

cuquantum.bindings.cudensitymat.expectation_prepare(
intptr_t handle,
intptr_t expectation,
intptr_t state,
int compute_type,
size_t workspace_size_limit,
intptr_t workspace,
intptr_t stream,
)[source]#

Prepares the expectation value object for computation.

Parameters:
  • handle (intptr_t) – Library handle.

  • expectation (intptr_t) – Expectation value object.

  • state (intptr_t) – Representative quantum state (or a batch of quantum states).

  • compute_type (ComputeType) – Desired compute type.

  • workspace_size_limit (size_t) – Workspace buffer size limit (bytes).

  • workspace (intptr_t) – Empty workspace descriptor on entrance. The workspace size required for the computation will be set on exit.

  • stream (intptr_t) – CUDA stream.