Hi @Amandeep ,
Your issue here probably has one of three causes (or a combination of them):
- Most likely cause: Your version of glibc is too old. As mentioned in your other post, we require a minimum glibc library of 2.28 (ie RHEL 8 compatible and newer). Yours is glibc 2.17 (RHEL 7) so I would strongly suggest using Google Colab, qBraid, or the system of your choice with glibc >= 2.28.
- Somewhat likely: Whatever you’re using as
weights
andx1[0]
is incompatible with some functions. I recommend that you test the code exactly as I shared it so that you can rule out this possible cause. - Unlikely but worth exploring: Your version of NumPy might be causing issues. While PennyLane does support NumPy 2.0, you can rule out a possible NumPy issue by using NumPy 1.x. I ran the code with NumPy 1.26.4 and it worked well for me.
I hope the suggestions above help you solve the issue.