SyTen

◆ truncate()

SRDef syten::MPS::State::truncate ( Truncation const &  trunc = Truncation(),
State::DropNorm const  dropN = DropNorm::Yes,
bool const  sweep_left = true 
)

Truncates the state.

First drops all unmatched blocks, then left-normalises the state without truncation and finally right-normalises with the given truncation.

Parameters
truncTruncation specification
dropNIf true, drop the norm on both normalisation sweeps.
sweep_leftWhether the truncation sweep is left. Resulting state is rightnormed(true) or leftnormed(false).
Returns
the total incurred error during truncations

References dropUnmatched(), leftnorm(), and rightnorm().

Referenced by syten::MPS::RandomState::generateCompleteState(), syten::MPS::RandomState::generateSampledState(), syten::Pyten::init_mps(), and truncateKeepNorm().

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