# Where is the input data X in the CV-QNN as presented in Pennylane?

I am referring to the tutorial of CV-QNN in Pennylane(Strawberry Fields). Each layer of CV-QNN can perform the operation below.

Unlike other quantum neural network tutorials, where the input X and y are given explicitly, this is not the case here. However, they have mentioned Encoding data outside of the position eigenbasis, for example using instead the Fock basis. How can I encode my data which is in the format of X and y, where each sample is a 6-dimensional vector and y is a real value in [0,1]? I have X as a pandas data frame of shape [150,6] and y is a pandas series of length 150. How to train the CV Neural Network using my data?

• Encoding Layer: Here, one uses a particular encoding scheme to encode the data in a quantum state. A particular choice in CV QNNs is to apply a displacement gate parameterized by the value you wish to encode on the vacuum state. In other words, $$D(x)| 0 \rangle = | x \rangle$$. If you have a vector of values that you wish to encode, you would have to use a vector of vacuum states. In other words, one would need $$\forall i \in [n]: D(x_i)|0\rangle = |x\rangle_i$$. If your dataset is of the form $$(x, y) \in \mathbb{R}^2$$, it is also possible to cast it into a complex $$z = x+iy$$ and apply $$D(z)$$. As you can see, the schemes to encode the data via displacement would vary depending on the structure of your dataset and the shape of the output passed to the VQC layers would depend on your scheme.
• Decoding Layer: Here, one essentially calculates expectation values of what you wish to observe, typically the $$x-$$quadtratures for the resulting batch of states you get from your VQC layers. These expectations are the outputs you require your Neural Network to optimize over to determine the parameters for the NN. To mimic a physical quantum system, one may also perform the decoding by performing a batch of measurements and averaging over them. The final outputs of this layer, supposing you are attempting to perform a fit, must have the same shape as your inputs. But of course, this can be different depending on the exact nature of your task.