cuquantum.bindings.cudensitymat.expectation_compute

cuquantum.bindings.cudensitymat.expectation_compute(intptr_t handle, intptr_t expectation, double time, int32_t num_params, params, intptr_t state, intptr_t expectation_value, intptr_t workspace, intptr_t stream)[source]

Computes the operator expectation value(s) with respect to the given quantum state(s).

Parameters
  • handle (intptr_t) – Library handle.

  • expectation (intptr_t) – Expectation value object.

  • time (double) – Specified time.

  • num_params (int32_t) – Number of variable parameters defined by the user.

  • params (object) –

    Variable parameters defined by the user. It can be:

    • an int as the pointer address to the array, or

    • a Python sequence of float.

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

  • expectation_value (intptr_t) – Pointer to the expectation value(s) vector storage in GPU-accessible RAM of the same data type as used by the state and operator.

  • workspace (intptr_t) – Allocated workspace descriptor.

  • stream (intptr_t) – CUDA stream.