Modeling brain dynamics using mathematics from quantum mechanics