Cert Challenge Encoding Block

In the Pennylane Certificate Challenge, in the encoding block, the coefficient on which it is checked is pi/7, but my answer is matching to it, when I am putting the value of coefficient as pi/5.9836175.
I had used qml.exp(), am I doing something wrong here?

I was also stuck on this one (and have just passed the challenge), but at least to my understand qml.exp(g,x) actually computes G^x, where G^0 = I, G^1 = G, G^2 = GG,… although the coefficient has also been generalized to accept real or complex coefficient, while the e^{ixG} required by the problem is different.

Exercise I.6.5 in the codebook points out that needs to be computed using the matrix exponential definition and relation RX(\theta)=e^{-i\theta X/2} etc, which might be useful to understand the notation.

As the other topic in the forum has suggested, qml.evolve qml.evolve — PennyLane 0.36.0 documentation can be used to implement the encoding block

One of the correct way is qml.evolve(g(i),coeff=-x), where i is the wire number.

Hi @Saiprateek_Dasgandhi , welcome to the Forum! Did @LdBeth 's answer help you? Or do you still need help?
Thanks for your answer here @LdBeth ! :raised_hands: