Processes (qiskit_addon_sqd.processes)¶
Support for collective multi-process execution.
This module exists to support coordinated parallel execution across multiple isolated processes, with explicit global synchronization and communication (e.g., MPI-style SPMD collectives).
The current implementation relies on MPI, but the public interface is designed to support other collective-execution backends in the future.
- is_mpi_execution()[source]¶
Check if running in MPI mode.
- Returns:
Trueif MPI is detected.- Return type:
- process_index()[source]¶
Get the index of the current process.
- Returns:
Process index (0 for the control process).
- Return type:
- process_count()[source]¶
Get the total number of collective processes.
- Returns:
Number of collective processes (1 if not in distributed mode).
- Return type:
- is_control_process()[source]¶
Return
Trueif the current process is the control process.- Returns:
Trueif this is rank 0 or if not in distributed mode.- Return type: