support storing expectation values and states