Problems with gradient computing on pennylane lightning

Hi @Moustafa ,

I cannot guarantee that it will work but I strongly suggest that you follow the indication in my post from August 5th here. This should fix your first error. I would recommend starting with the code I shared and changing one element at a time instead of several at once. This can make it easier to identify and solve issues as they arise. Once you follow this approach of creating your own hybrid model let me know if you still get stuck on other issues.

Finally, I strongly suggest upgrading your PennyLane version to v0.38 (the latest one at the moment). I hope this helps!