seemps.state.MPS.expectation1# method MPS.expectation1(O, site)[source]# Compute the expectation value \(\langle\psi|O_i|\psi\rangle\) of an operator O acting on the i-th site Parameters: stateMPSQuantum state \(\psi\) used to compute the expectation value. OOperatorLocal observable acting onto the i-th subsystem iintIndex of site, in the range [0, state.size) Returns: float | complexExpectation value.