Is there a calculation error in "Circuits as Fourier series" PennyLane Demo?

My question is about this article:

Is there a calculation error here:

I used Euler’s formula for T_{s} - T_{-s} elements and got this:

D = \frac{\gamma}{sin{(2\gamma s)}} (T_{s} - T_{-s})

And the same is for the derivative:

f'(\theta) = \frac{\gamma}{sin{(2\gamma s)}}[f(\theta + s) - f(\theta - s)]

Am I wrong or not?

Hey @doktrster! Welcome to the forum :slight_smile:

I’ve contacted the author of the demo to make sure I get this right. We’ll get back to you as soon as we can!

1 Like

Hi doktrster! Yep, that looks like a typo :sweat_smile: Thanks for spotting it!

2 Likes