Input Encoding for CVQNN

In this example of function fitting using CVQNN we have encoded one dimensional input using displacement gate for a function f(x). If we have a function f(x,y,t) how can we encode the input? And how can we decode the output?

Hi @Al_Muktadir , welcome to the Forum!

I’m not sure if/how you can do that. You can check the CV operators that we have in PennyLane but I don’t think any of them are designed for time-dependent evolutions. Is there a specific reason why you need to work with CV? You’ll have many more tools available if you go with something gate-based (DV).

If you simply had f(x,y,z) I’d suggest maybe adding one mode per feature and a corresponding displacement where you encode the data for that feature. However in your case I don’t know if this would work.

Edit: we do have some functions for time evolution in StrawberryFields as seen in this demo. However this isn’t compatible with PennyLane.