Is parameter broadcasting considered parallel or concurrent processing when using PennyLane?

I am currently using parameter broadcasting in PennyLane to evaluate the same quantum circuit on multiple input patches. I have not explicitly set max_workers or configured any parallel backend, since my workflow requires backpropagation and the default.qubit device does not support max_workers.

I would like to clarify:
Does this approach count as concurrent or parallel execution (e.g., across multiple CPU cores)?
My goal is to compute several identical quantum circuits simultaneously on different CPU cores, but from what I observe, it seems that parameter broadcasting does not leverage multi-core CPU parallelism by default.

Is there a recommended way to achieve actual parallel execution across CPUs for this type of use case in PennyLane?

Thanks!

Hi @charliechiou , welcome to the Forum!

My colleague Josh pointed out that default.qubit utilizes NumPy broadcasting under the hood:

Broadcasting provides a means of vectorizing array operations so that looping occurs in C instead of Python.

I’ve shared your question with my colleagues so they may be able to provide a more detailed answer in a few days.

1 Like

Hi, thanks for your reply. I also read the discussion in Questions about parallel execution, where one of the responses mentioned that default.qubit utilizes NumPy broadcasting. It seems that NumPy performs concurrent processing rather than parallel processing.

To further investigate this, I monitored the CPU usage (by using htop on linux) while executing the program, and it showed that only a single CPU core was active. Therefore, I believe that the execution mechanism is concurrent rather than truly parallel.Thanks ! :slightly_smiling_face:

Hi, I have recently switched my device to default.qubit.torch, and I would like to better understand the underlying mechanism of GPU-based computation in this context. Thanks !