Is there a way to parallelize the same circuit for multiple input data?

Hi,

I am struggling with same problem. I tried the following with dask,
image
image

Now, if we are parallelising the expectation values of 5 different inputs for same circuit as below,
image

But this is only until computing the expectation values in parallel. But machine learning requires computing the gradients of parameters for optimization. I want to speed up the simulations and got stuck with the gradients computations as follows,
Gradients : qml.grad(expval)(params)
ERROR :

  • Failed to deserialize

  • Cannot pickle ‘generator’ object

Can someone please help in this regard or show some directions on the alternatives.

Thanks a lot!!!