Codercise P.2.3

Hi, I am getting this result in codercise P.2.3


Can someone help me understand what am I doing wrong…
This is my code

Hi @Mukul , welcome to the Forum!

You should first prepare the eigenvector (use the function you have just above), then apply the controlled powers of U, and finally apply the inverse QFT.

I hope this helps you!