Spectral information processing with quantum neural networks