Closed jofrevalles closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 75.00%. Comparing base (
eb61105
) to head (3c89308
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Question for @bsc-quantic/tensor-networks: should we do that the isleftcanonical
, isrightcanonical
functions already process the singular values?
I think that makes sense that we do not (so like it is currently in the code), and just take the tensor at that site
and do the checking. This makes the tests for this function a little bit cumbersome, but do the work. In my opinion, we should add a function that does the contraction of the singular values, since I think this will be necessary for many algorithms.
@mofeing The code now will error due to the Tenet.HyperindConverter
thingy. I have tested locally and everything works otherwise.
Okay @mofeing, every test now has passed correctly. I would like to merge this.
Summary
This PR resolves #22 by implementing the
canonize
function, which takes an inputChain
and transforms it into the canonical form (also known as Vidal form), where we have a set ofΓ
andΛ
tensors. For now, this function is implemented forChain
withOpen
boundaries.Additionally, we added some tests to cover for the new function. Thanks to @starsfordummies for the useful comments!
Example
Let's show how this function works: