seemps.expectation.expectation1# seemps.expectation.expectation1(state: MPS, O: Operator, i: int) → Weight[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 mps.`i`-th subsystem iintIndex of site, in the range [0, state.size) Returns: float | complexExpectation value.