SyTen

◆ expectation() [5/5]

SDef syten::MPS::expectation ( State const &  a,
Operator const &  op,
State const &  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\).

References syten::Timer::add(), syten::MPS::Operator::dIdx, syten::Timer::end(), syten::genCombinator(), syten::genFuse(), syten::genSplit(), syten::MPS::Operator::lIdx, syten::MPS::State::lIdx, syten::logTV(), syten::MPS::State::maybeCache(), syten::Timer::middle(), syten::MPS::Operator::rIdx, syten::MPS::State::rIdx, syten::MPS::State::size(), syten::split(), syten::Timer::start(), SYTEN_ASSERT, syten::transpose_exchange(), syten::MPS::Operator::uIdx, and syten::MPS::State::uIdx.

+ Here is the call graph for this function: