[feature request] FFT-based differentiation
Hi, I am using your brilliant work to calculate long-range interaction between atoms and I need to use FFT to transform between real space and reciprocal space. I humbly ask if there is any plan to support FFT differentiation
Hi @Roy-Kid , thanks for your request. Unfortunately, this is not planned ATM although it would be a very exciting new feature.
plan to support FFT differentiation
Just out of curiosity, do you really mean FFT differentiation (using a DFT/FFT to approximate a derivative) or are you referring to implementing forward/backward rules for an FFT operator?
From your described use case (going to and from K-space), it sounds like you want the latter. Luckily, implementing a VJP here is easy: the transpose of the FFT operator is just an inverse FFT (it's unitary). So just "backpropagate" through your data with an iFFT (assuming you are interested in reverse-mode differentiation).