qml.devices.preprocess.validate_multiprocessing_workers

validate_multiprocessing_workers(tape, max_workers, device)[source]

Validates the number of workers for multiprocessing.

Checks that the CPU is not oversubscribed and warns user if it is, making suggestions for the number of workers and/or the number of threads per worker.

Parameters
Returns

The unaltered input circuit. The output type is explained in qml.transform.

Return type

qnode (pennylane.QNode) or quantum function (callable) or tuple[List[QuantumTape], function]

Contents

Using PennyLane

Release news

Development

API

Internals