SyTen

◆ flip_on_tensor()

std::tuple< STensor, SBasisId > syten::STensorImpl::flip_on_tensor ( STensor const &  in,
SBasisId const &  which 
)

Flips the direction of basis which using insertIOFullHalf.

Returns the updated tensor and basis.

This function fulfills

STensor x; SBasis b;
auto [xf, b2] = flip_on_tensor(x, b);
auto [xff, b3] = flip_on_tensor(xf, b2);
return x == xff;
std::tuple< STensor, SBasisId > flip_on_tensor(STensor const &in, SBasisId const &which)
Flips the direction of basis which using insertIOFullHalf.
Definition: stensor_flip.cpp:53
STensorImpl::STensor STensor
‘Smart’ tensor class.
Definition: stensor_base.h:556
Remarks
You must use this function to flip the same leg of a tensor twice and get the original tensor back. You cannot use this function to flip two legs of two different tensors which are subsequently contracted. To do so, use flip_in_product.
This function is autodifferentiable.

References syten::STensorImpl::STensor::autodiff_enabled(), syten::STensorImpl::STensor::b(), syten::STensorImpl::STensor::bi(), syten::STensorImpl::SBasis::f(), gen_io(), syten::STensorImpl::STensor::get_autodiff(), syten::STensorImpl::STensor::get_bases(), syten::STensorImpl::Autodiff::ComputeNode::get_cached_tensors(), syten::STensorImpl::STensor::get_fermionic_order(), syten::STensorImpl::Autodiff::ComputeNode::get_output_adjoint(), insertIOFullHalf(), make_zero(), syten::STensorImpl::STensor::move(), std::move(), syten::mve(), syten::STensorImpl::STensor::new_autodiff_id(), syten::STensorImpl::Autodiff::new_id(), prod(), project(), syten::STensorImpl::STensor::set_autodiff_node(), and syten::STensorImpl::STensor::visnz().

Referenced by syten::T3N::Contraction::decontractToPhysicalBranching(), syten::T3N::Contraction::decontractToPhysicalPhysical(), syten::IPEPSv2::directional_qr(), syten::IPEPSv2::directional_svd(), syten::IPEPSv2::expectation_value(), syten::IPEPSv2::full_update_cond_num(), syten::IPEPSv2::full_update_gauge_fix(), syten::IPEPSv2::full_update_pseudo_invert_r4(), syten::T3N::ProjectedPurification::genTransformation(), and svd().

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