Closed jofrevalles closed 4 months ago
Mmmm... This did not fail on my machine...
I think it fails because some of this features require Tenet
on master
. Maybe we can release a new "patch" version of Tenet
with this changes?
I think it fails because some of this features require
Tenet
onmaster
. Maybe we can release a new "patch" version ofTenet
with this changes?
Ahh, it has to be that. Yes, that would be great, @mofeing !
Summary
This PR fixes the
canonize
function, enabling it to correctly canonize a desiredTensor
within aSite
of aChain
. We have enhanced this function to allow users to choose themode
(:qr
or:svd
) in which the canonization is applied. By default, the:qr
option is selected, preserving the total number of tensors in theTensorNetwork
. The:svd
mode, on the other hand, introduces a new tensor which is connected by a hyperindex to the bond between sites, and it contains the Schmidt values. Additionally, we have created a comprehensive test set to ensure the function's reliability and performance.Furthermore, we have refactored the logic inside
leftindex
andrightindex
. Now, these indices are determined by the intersection of the indices with those of the adjacent tensor in theChain
, rather than relying on the order ofinds
in the tensors. This enhancement is expected to make our library more robust and error-resistant, as changes in the tensor order will no longer have unintended side effects.Example
Here we show how we create a
Chain
and we canonize the middle tensor: