SyTen

◆ error_estimate_2svariance()

std::pair< SRDef, SRDef > syten::MPS::error_estimate_2svariance ( MPS::Operator const &  op,
MPS::Lattice const &  lat,
MPS::State psi 
)

Calculates the 2-site approximation of the variance of the operator op with respect to the state psi on the lattice lat.

The lattice is used to access the full physical basis.

Explicitly uses super-level parallelisation.

Returns a pair of single- and two-site contributions to the variance. Their sum is the (approximate) variance.

References std::accumulate(), std::vector< T >::begin(), syten::MPS::Operator::dIdx, std::vector< T >::end(), syten::genFuse(), syten::genSplit(), left_complement(), syten::MPS::Operator::lIdx, syten::MPS::State::lIdx, syten::logGD(), syten::logGd(), syten::logTV(), std::make_pair(), std::move(), normSqd(), syten::QR::qr(), syten::MPS::Operator::rIdx, syten::MPS::State::rIdx, right_complement(), std::scientific(), std::setprecision(), SYTEN_MPO_EXPECT_ORDER, SYTEN_MPS_EXPECT_ORDER, syten::MPS::Operator::uIdx, and syten::MPS::State::uIdx.

Referenced by syten::Pyten::init_mp_variance().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: