Function approximation using multiple qumodes

I attempted to extend the website’s 1-qumode function approximation (CV-QNN) code to multiple qumodes (more than one). I’m facing an issue with the classical input data encoding part. How to encode classical data for more than one qumode into quantum data.
Please let me know in case anyone has already solved the function approximation problem using multiple qumodes.

CV-QNN with just 1 qumode is not sufficient to approximate a fairly complicated function (in my case, a simple exponential function), no matter how many CV-QNN layers are employed. I obtained the best accuracy of 8E-2 (relative error). Has anyone else had similar problems?

Thanks in advance.

Hi @ameya ,

We have the CVNeuralNetLayers function in PennyLane which might be what you need. It allows you to act on several modes.

Please let me know if this helps!

Thank you Catalina. I will try this function.


That’s great @ameya. Please let me know if this is (or not) what you needed!