Add a truncate function that truncates a tensor in a Chain. This function should look into the state, check for singular values, and truncate accordingly.
Just a note: This truncate function implements local truncation of a virtual index. Whether that local truncation is globally optimal depends on the canonization.
Summary
Add a
truncate
function that truncates a tensor in aChain
. This function should look into the state, check for singular values, and truncate accordingly.