Inference, interference and invariance: How the Quantum Fourier Transform can help to learn from data