energy expectation value seems to be calculated correctly