SyTen

◆ svd() [3/3]

template<Rank rank>
std::tuple<SRDef, Tensor<rank>, Tensor<2>, Tensor<2> > syten::SVD::svd ( Tensor< rank > const &  in,
Index  uncombinedLeg,
Truncation const &  trunc = Truncation(),
DecompRescaleCGC const  rescale = DecompRescaleCGC::Yes,
GaugeFixSVD  gf = GaugeFixSVD::n(),
SourceLocation  location = SourceLocation::current() 
)

A nicer interface to a named left-normalising SVD.

Use as follows:

auto [err, u, s, v] = svd(in, uncombLeg, trunc);
SRDef svd(Tensor< rank > const &in, Index uncombinedLeg, Tensor< rank > &u, Tensor< 2 > &s, Tensor< 2 > &v, Truncation const &trunc=Truncation(), DecompRescaleCGC const rescaleCGC=DecompRescaleCGC::Yes, GaugeFixSVD gf=GaugeFixSVD::n(), Pick_U_SV=Pick_U_SV(), SourceLocation location=SourceLocation::current())
Left-normalising SVD.
Definition: tensor_svd.h:61

err will contain the sum of squared singular values, u, s and v will contain the tensors returned by the SVD, where u has the same rank as in and s and v are rank-2 tensors connecting to the uncombLeg of u.

Remarks
With the syntax above, you do not have to declare err, u, s and v beforehand.

References std::make_tuple(), std::move(), and svd().

+ Here is the call graph for this function: