state_vector_get_resources_from_device_sub_sv_view#

cuquantum.bindings.custatevecEx.state_vector_get_resources_from_device_sub_sv_view(
intptr_t state_vector,
int32_t sub_sv_index,
) → tuple[source]#

Get resources from device sub state vector (read-only view).

Parameters:
  • state_vector (intptr_t) – The state vector descriptor.

  • sub_sv_index (int32_t) – Sub state vector index.

Returns:

  • int32_t: device id of the sub state vector.

  • intptr_t: device memory pointer to the sub state vector (read-only view; do not write through it).

  • intptr_t: CUDA stream on which custatevecEx calls for this sub state vector are serialized.

  • intptr_t: cuStateVec handle that can be passed to cuStateVec APIs to operate on the returned device pointer.

Return type:

A 4-tuple containing

The handle output is optional in the underlying C API (a null pointer may be passed to omit it); this binding always returns it, since reading the eagerly-created handle adds no overhead and keeps the API uniform.