Schroedinger equation, singularity theory and spectral invariants