qml.concurrency.executors.base.ExecBackendConfig

class ExecBackendConfig(submit_fn=None, map_fn=None, starmap_fn=None, shutdown_fn=None, submit_unpack=None, map_unpack=None, blocking=None)[source]

Bases: object

Executor backend configuration data-class.

To allow for differences in each executor backend implementation, this class dynamically defines overloads to the main API functions. For explicitly-defined executors, this class is optional, and is provided for convenience with hierarchical inheritance class structures, where subtle differences are best resolved dynamically, rather than with API modifications. All initial values default to None.

Parameters:
  • submit_fn (str, None) – The backend function that best matches the submit API call.

  • map_fn (str) – The backend function that best matches the map API call.

  • starmap_fn (str, None) – The backend function that best matches the starmap API call.

  • shutdown_fn (str, None) – The backend function that best matches the shutdown API call.

  • submit_unpack (bool, None) – Whether the arguments to submit are to be unpacked (*args) or directly passed (args) to submit_fn.

  • map_unpack (bool) – Whether the arguments to map are to be unpacked (*args) or directly passed (args) to map_unpack.

  • blocking (bool, None) – Whether the return values from submit, map and starmap are blocking (synchronous) or non-blocking (asynchronous).

blocking

map_fn

map_unpack

shutdown_fn

starmap_fn

submit_fn

submit_unpack

blocking = None
map_fn = None
map_unpack = None
shutdown_fn = None
starmap_fn = None
submit_fn = None
submit_unpack = None