SyTen

◆ qr() [1/2]

template<Rank rank>
std::tuple<Tensor<rank>, Tensor<2> > syten::QR::qr ( Tensor< rank > const &  in,
Index  uncombinedLeg,
DecompRescaleCGC const  rescaleCGC = DecompRescaleCGC::Yes,
FullQR const  full = FullQR{false},
SourceLocation const &  loc = SourceLocation::current() 
)

A nicer interface to QR decompositions.

Use as (e.g.)

auto [q, r] = QR::qr(in, 4);
void qr(Tensor< rank > const &in, Index uncombinedLeg, Tensor< rank > &q, Tensor< 2 > &r, DecompRescaleCGC const rescaleCGC=DecompRescaleCGC::Yes, FullQR const full=FullQR{false}, SourceLocation location=SourceLocation::current())
QR decomposition orthogonalisation, does not truncate!
Definition: tensor_qr.h:50

q and r will hold the standard output tensors afterwards. Contracting (in the above example) the first leg of r with the fourth leg of q will result in in.