PaddlePaddle / Quantum

Other
567 stars 176 forks source link

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

Open DS-Liu opened 1 year ago

DS-Liu commented 1 year ago

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?

gxli2017 commented 1 year ago

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 liguangxi02@baidu.com.