Inv: bug fix and implementation for UniTensor
-fixed a bug in Inv, where the clipping was applied to the value instead of the absolute part of it for real valued Tensors. -implemented Inv for UniTensor
Codecov Report
:x: Patch coverage is 55.31915% with 42 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 32.16%. Comparing base (be1cfcf) to head (e839fa8).
:warning: Report is 66 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #680 +/- ##
==========================================
+ Coverage 32.07% 32.16% +0.08%
==========================================
Files 215 215
Lines 36242 36316 +74
Branches 14543 14583 +40
==========================================
+ Hits 11626 11680 +54
- Misses 22692 22700 +8
- Partials 1924 1936 +12
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
I revised Inv and Pow. Both is available in cytnx::linalg and as methods of UniTensor. I updated the comments and wrote tests.
These two functions can be taken as blueprints to implement the other elementwise linalg functions for UniTensor, as suggested in https://github.com/Cytnx-dev/Cytnx/issues/681
Breaking changes:
The condition $\sqrt{Re^2 + Im^2} \le \mathrm{clip}$ is used for the pseudo-inverse. This way, real and complex numbers are treated similarly. The implementation is fast.
The changes can be reviewed and merged now.
The TDVP check fails. It seems that the Lanczos does not converge. However, the algorithm should not be affected by any of the changes in this branch. Could it be that TDVP is sensitive to the random seed? On my machine the TDVP check works fine (Linux). Any suggestions?
The TDVP check fails. It seems that the Lanczos does not converge. However, the algorithm should not be affected by any of the changes in this branch. Could it be that TDVP is sensitive to the random seed? On my machine the TDVP check works fine (Linux). Any suggestions?
I will check.
#690 is still open, I would like to fix it before merging, since some breaking changes are introduced here.