cuquantum.custatevec.sv_swap_worker_create

cuquantum.custatevec.sv_swap_worker_create(intptr_t handle, intptr_t comm_desc, intptr_t org_sub_sv, int32_t org_sub_sv_idx, intptr_t org_event, int sv_data_type, intptr_t stream) -> (intptr_t, size_t, size_t)[source]

Create a cuStateVec distributed statevector swap worker.

Parameters
  • handle (intptr_t) – The library handle.

  • comm_desc (intptr_t) – The communicator descriptor.

  • org_sub_sv (intptr_t) – The pointer address to a sub statevector.

  • org_sub_sv_idx (int32_t) – The index of the sub statevector as specified by org_sub_sv.

  • org_event (intptr_t) – A CUDA event handle (cudaEvent_t as Python int) for synchronizing with the peer worker.

  • sv_data_type (cuquantum.cudaDataType) – The data type of the statevector.

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

Returns

A 3-tuple. The first element is the opaque worker descriptor (as Python int). The second element is the extra workspace size (in bytes). The third element is the minimal transfer workspace size (in bytes).

Return type

Tuple