Hello, I have been running some hybrid quantum-classical neural networks using PennyLane and PyTorch. I am wondering if the default data type for PyTorch should be set to float64 as PennyLane works with doubles? I have came across different example codes online with some setting the default type to float64 and others not. Thank you!
Hi @Aaron_McCollum , welcome to the Fortum!
At the moment everything is promoted to 64-bit outputs, even with 32-bit inputs (except when using JAX with the native float32 support).
However, this is something we want to change so that we respect the precision of the parameters being passed in. I don’t have a specific timeline of when this will be done, but it will probably take some time. Is this something you can work with? Or do you specifically need float32 support?
Note: Catalyst must default to 64-bit values, so that won’t be changing.
I hope this helps!