SyTen

◆ svd() [1/2]

std::tuple< SRDef, STensor, STensor, STensor, SBasis, SBasis > syten::STensorImpl::svd ( STensor const &  in,
SBasisId const &  uncombined,
Truncation const &  trunc = Truncation(),
DecompRescaleCGC const  rescaleCGC = DecompRescaleCGC::Yes,
GaugeFixSVD  gf = GaugeFixSVD::n(),
SourceLocation const &  loc = SourceLocation::current() 
)

SVD decomposition for STensor.

Parameters
ininput tensor
uncombinedbasis over which the SVD will be performed
trunctruncation specification
rescaleCGCif this is DecompRescaleCGC::Yes, the CGCs are rescaled such that they give identities when contracted over all legs but uncombined
gfif set to GaugeFixSVD::y(), the gauge freedom of the complex SVD is fixed.
locCallsite identifier.
Returns
a tuple of the error (sum of discarded squared singular values), the U, S and V tensors and the new shared bases of U and S (towards V) respectively. The shared basis of U and S is nicknamed svd-us, the shared basis of S and V is nicknamed svd-sv.
Remarks
This function is autodifferentiable for all inputs, but the obtained gradient is only correct if the input tensor is equal to the product of the output tensors (and not just approximately equal) and the singular value spectrum is non-degenerate. In particular, any numerical noise of nearly-equal and undetermined singular values must be cut off.

References syten::STensorImpl::STensor::autodiff_enabled(), syten::STensorImpl::STensor::b(), syten::STensorImpl::STensor::bi(), syten::STensorImpl::STensor::copy(), syten::STensorImpl::Autodiff::create(), syten::STensorImpl::SBasis::dir(), syten::STensorImpl::STensor::enable_autodiff(), syten::STensorImpl::SBasis::f(), syten::STensorImpl::STensor::get_autodiff(), syten::STensorImpl::STensor::get_bases(), syten::STensorImpl::STensor::get_fermionic_order(), if_constexpr, syten::Inc, make_zero(), syten::STensorImpl::STensor::move(), std::move(), syten::mve(), syten::STensorImpl::STensor::set_autodiff_node(), syten::SVD::svd(), syten::STensorImpl::Autodiff::svd_adjoint_evaluator(), SYTEN_TENSOR_RANK, and syten::STensorImpl::STensor::visit().

Referenced by syten::T3N::apply_operator_itrunc(), syten::T3N::block_entropies_rec(), syten::IPEPSv2::State::crude_truncate(), syten::T3N::Contraction::decontractToPhysicalBranching(), syten::T3N::Contraction::decontractToPhysicalPhysical(), syten::T3N::State::descendantNormaliseNode(), syten::IPEPSv2::directional_svd(), syten::IPEPSv2::expectation_value(), syten::IPEPSv2::full_update_apply_gate(), syten::IPEPSv2::full_update_cond_num(), syten::IPEPSv2::full_update_gauge_fix(), syten::IPEPSv2::full_update_split_evenly(), syten::T3N::RandomState::generateCompleteState_rec(), syten::IPEPSv2::CornerTransferMatrix::grow_helper(), syten::T3N::TDVP::Worker::norm_bond(), syten::pseudo_inverse_svd_cm(), syten::T3N::State::rootNormaliseNode(), syten::IPEPSv2::simple_update(), syten::MPS::DMRG::LBOWorker::singleUpdate(), syten::T3N::DMRG::Run::solveBranching(), syten::T3N::DMRG::Run::solvePhysical(), svd(), syten::MPS::DMRG::Worker::sweepLeftTwoSite(), syten::MPS::DMRG::Worker::sweepRightTwoSite(), syten::MPS::DMRG::Worker::sync(), and syten::T3N::TDVP::Worker::update_phys_phys().

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