seemps.operators.MPOList.expectation#

method

MPOList.expectation(bra, ket=None)[source]#

Expectation value of MPOList on one or two MPS states.

If one state is given, this state is interpreted as \(\psi\) and this function computes \(\langle{\psi|O\psi}\rangle\) If two states are given, the first one is the bra \(\psi\), the second one is the ket \(\phi\), and this computes \(\langle\psi|O|\phi\rangle\).

Parameters:
braMPS

The state \(\psi\) on which the expectation value is computed.

ketOptional[MPS]

The ket component of the expectation value. Defaults to bra.

Returns:
float | complex

\(\langle\psi\vert{O}\vert\phi\rangle\) where O is the matrix-product operator.