qiskit_serverless.core.distribute_task

distribute_task(target=None)[source]

Wraps local function as remote executable function. New function will return reference object when called.

Example

>>> import qiskit_serverless as qs
>>>
>>> @distribute_task()
>>> def awesome_function(seed: int):
>>>     return 42
>>>
>>> reference = awesome_function()
>>> function_result = qs.get(reference)
Parameters:

target (Union[Dict[str, Any], Target, None]) – target object or dictionary for requirements for node resources

Returns:

object reference