quantum_operator_get_cotangent_buffer#

cuquantum.bindings.cupauliprop.quantum_operator_get_cotangent_buffer(
intptr_t handle,
intptr_t oper,
) tuple[source]#

Retrieves the cotangent buffer attached to a quantum operator.

Parameters:
  • handle (intptr_t) – Library handle.

  • oper (intptr_t) – Quantum operator.

Returns:

  • intptr_t: Pointer to the attached cotangent buffer. If no buffer is attached, this pointer is set to NULL.

  • int64_t: Required element count (number of differentiable parameters).

  • int: Data type of elements in the attached buffer. If no buffer is attached, this pointer is set to cudaDataType_t CUPAULIPROP_DATA_TYPE_INVALID.

  • int: Memory location of the attached buffer. If no buffer is attached, this pointer is set to cupaulipropMemspace_t CUPAULIPROP_MEMSPACE_DEVICE.

Return type:

A 4-tuple containing