SyTen

◆ expectation() [3/5]

SDef syten::MPS::expectation ( State &&  a,
Operator const &  op,
State &&  b 
)

Returns the expectation value of an operator between two states as \(\langle b | \left(\hat O | a \rangle\right)\).

Parameters
athe first state, not to be complex conjugated.
bthe second state, to be complex conjugated
opthe operator
Returns
the expectation value of \(\hat O\).
Remarks
Destroys the supplied state to avoid useless re-caching.

References syten::MPS::Operator::dIdx, syten::genCombinator(), syten::genFuse(), syten::genSplit(), syten::MPS::Operator::lIdx, syten::MPS::State::lIdx, syten::MPS::Operator::rIdx, syten::MPS::State::rIdx, syten::split(), SYTEN_ASSERT, syten::transpose_exchange(), syten::MPS::Operator::uIdx, and syten::MPS::State::uIdx.

+ Here is the call graph for this function: