Randomises dense blocks.
The argument tensor is taken by-value, acted upon and returned from the function. Blocks are randomised using makeRandom
, rank-0 tensors are assigned a random real value between ±2.
References syten::Random::genEngine(), if_constexpr, make_zero(), syten::makeRandom(), syten::mve(), syten::STensorImpl::Autodiff::new_id(), syten::STensorImpl::Autodiff::return_first_output_adjoint(), SYTEN_TENSOR_RANK, and syten::to_string_def().
Referenced by syten::T3N::DMRG::Run::checkNormAndStabilise(), syten::IPEPSv2::make_random_tensor(), and syten::T3N::DMRG::Run::randomise_state().