SyTen

◆ svd() [2/3]

template<Rank rank>
SRDef syten::SVD::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.

Parameters
[in]ininput tensor to decompose into in → u s v
[in]uncombinedLegleg of in/u which is not combined and at which s attaches
[out]uoutput tensor with same rank as in
[out]soutput singular value tensor with rank 2
[out]voutput unitary tensor with rank 2
[in]truncTruncation specification
[in]rescaleCGCwhether to rescale the CGC tensors to result in identities matrices when contracted
gf[in]if set to GaugeFixSVD::y(), the gauge freedom of the complex SVD is fixed.
[in]locationCallsite identifier.
Returns
the sum of the squares of the discarded singular values
Remarks
Contracting the uncombined leg of u with the first leg of s and the second leg of s with the first leg of v will give the input tensor again (modulo discarded singular values).
Contracting u with its complex-conjugated self over all indices but the uncombined leg gives an identity matrix.
Note that v is already hermitian conjugated so you don’t have to do that.
In the DMRG context, use this to turn an unnormalised rank-3 tensor \( M \) into a left-normalised \( A \)-tensor and a left-over product \( S V^\dagger \) to multiply into the tensor to the right.
If the input tensor is not fully in standard dense format, a copy of it will be created on-the-fly and brought into this format. Output tensors are always fully in standard dense format.

Symmetry-incured multiplicity on the uncombined leg

Symmetry-incured multiplicity on the uncombined leg

References syten::abs(), std::vector< T >::begin(), syten::Tensor< rank >::clear(), std::clock(), syten::Cuda::copy(), std::chrono::duration::count(), syten::Tensor< rank >::dense_is_standard(), syten::Tensor< rank >::dirs, syten::Tensor< rank >::empty(), std::vector< T >::end(), std::fill(), syten::hasCGC(), syten::isZero(), syten::logGW(), syten::makeIdentity(), std::max(), std::move(), syten::No, std::chrono::high_resolution_clock::now(), syten::DenseIter< rank >::offset(), syten::prodS(), syten::Tensor< rank >::push_back(), std::vector< T >::push_back(), syten::rank(), syten::real(), syten::Tensor< rank >::reduce(), syten::Tensor< rank >::reserve(), std::vector< T >::resize(), syten::Tensor< rank >::return_as_dense_standard(), std::vector< T >::size(), std::sort(), syten::sqrt(), SYTEN_ASSERT_MSG, SYTEN_SINGLE_ARG, SYTEN_ZERO_THRESHOLD, syten::EnvVars::tensor_time, syten::tensorSortBuckets(), and syten::validateCGCContraction().

Referenced by syten::IPEPS::FullUpdate::apply_op(), syten::MPS::apply_op_itrunc(), syten::MPS::block_entropies(), syten::MPS::TEBD::build_local_T(), syten::IPEPS::cond_number(), syten::MPS::fine_grain(), syten::IPEPS::gauge_fix(), syten::MPS::Lat::SU3::genSpinLattice(), syten::IPEPS::horizontal_simple_update(), syten::Pyten::init_tensor_decomp(), syten::IPEPS::inv_qr_to_back_r(), syten::MPS::State::leftnorm(), syten::MPS::TEBD::TpsWrapper::leftnorm_w_lambda(), syten::MPS::LBOState::leftnormM(), syten::MPS::TDVP::Worker::normL(), syten::MPS::TDVP::Worker::normR(), syten::MPS::LBOState::physnormM(), syten::MPS::LBOState::physnormV(), syten::pseudo_invert(), syten::MPS::State::rightnorm(), syten::MPS::LBOState::rightnormM(), syten::MPS::schmidt_values(), syten::MPS::SwappableTEBD::split_rank6_into_mpos(), syten::MPS::split_rank_4_into_mps_cnorm(), syten::MPS::split_rank_4_into_mps_lnorm(), syten::MPS::split_rank_4_into_mps_rnorm(), syten::STensorImpl::svd(), svd(), syten::MPS::TDVP::Worker::sweepLeftTwoSite(), syten::MPS::TDVP::Worker::sweepRightTwoSite(), syten::MPS::TDVP::Worker::sync(), syten::IPEPS::vertical_simple_update(), syten::IPEPS::vertical_simple_update_remover(), syten::MPS::DMRG::Worker::Worker(), and syten::MPS::TDVP::Worker::Worker().

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