Quantum icon indicating copy to clipboard operation
Quantum copied to clipboard

Is it possible to use ProcessPoolExecutor to accelerate the for loop in the forward method in QApproximating_EN.ipynb

Open DS-Liu opened this issue 1 year ago • 1 comments

Since the forward method in the example Quantum Neural Network Approximating Functions uses a for loop, it's quite slow when the depth of the circuit is large. I want to use ProcessPoolExecutor to replace the for loop.

While using ProcessPoolExecutor with paddle, this error cannot pickle 'Tensor' object always occurs. I also meet another error cannot pickle 'ParamBase' object. I'm wondering whether it's possible to accelerate the for loop. Can anyone provide a parallelized version of the example Quantum Neural Network Approximating Functions?

DS-Liu avatar May 29 '23 06:05 DS-Liu

Are you asking about parallel computation for batches? This feature will be available in the future. If you would like to use it now, you can message me privately at [email protected].

gxli2017 avatar Jun 01 '23 09:06 gxli2017