void syten::STensorImpl::diagonal_signs_to_largest | ( | STensor & | in | ) |
Finds the diagonal element with the largest amplitude and sets every element whose real part does not have the same sign as this element to zero.
References syten::abs(), syten::STensorImpl::STensor::autodiff_enabled(), syten::STensorImpl::STensor::b(), change_fermionic_order(), syten::STensorImpl::SBasis::dir(), if_constexpr, syten::Inc, std::move(), syten::STensorImpl::STensor::rank(), real(), SYTEN_ASSERT, SYTEN_TENSOR_RANK, and syten::STensorImpl::STensor::visnz().
Referenced by syten::IPEPSv2::full_update_gauge_fix().