Dynamic Circuit in pennylane: GPU supports?

For pennylane’s feature of mid circuit measurement,

Does this qml.measure() have supports for lightning_gpu device?

Hi @harry ,

lightning.gpu supports the dynamic one-shot method for mid-circuit measurements.
So you can use qml.measure() as long as you set mcm_method="one-shot" in the QNode. You can learn more about it here in the docs.

Let us know if you have any trouble using it.

I hope this helps!

Hi @CatalinaAlbornoz , will the lightning.qubit and lightning.gpu support post-selection in analytic mode in the future, or will there be something like default.gpu? I find the dynamic one-shot or the tree-traversal make the simulation significantly slow, even I set the shot number as only 2.

Hi @Tz_19 ,

I have some good news! default.qubit currently has GPU support. You just use GPU data as inputs. E.g. if you use Torch or JAX with a CUDA backend then the input data will be on GPU and the quantum simulation will also happen on GPU.

Tree-traversal should be the fastest method. The speed depends on the number of MCMs and the depth of the circuit (not the number of shots).

If you’re still struggling then the best would be for you to send us a minimal working example that shows the slowdown you’re experiencing. This can help us investigate or suggest alternatives.

I hope this helps!