communicator_initialize#

cuquantum.bindings.custatevecEx.communicator_initialize(
int communicator_type,
str library_path=None,
) int[source]#

Initialize inter-process communication.

argc and argv are always passed as NULL to the underlying C API. Default MPI initialization works under modern launchers without them; for custom setups, initialize MPI beforehand (e.g. via mpi4py or a prior MPI_Init) and then call this function.

Parameters:
  • communicator_type (CommunicatorType) – The communicator type.

  • library_path (str) – Path to the inter-process communication library. If None, the C API selects a default based on communicator_type.

Returns:

The communicator status from the underlying init() method.

Return type:

int