added function to compute energy expectation value over time