Cytnx icon indicating copy to clipboard operation
Cytnx copied to clipboard

Error message when the contracting bonds do not match

Open chiamin opened this issue 2 years ago • 0 comments

I got the following error message in tensor contraction when the two connected bonds have different quantum number structures. It is hard to realize the problem from this error message. I recommend checking the bonds are the same as much as we can and showing more clearly the corresponding error messages (for example, dimensions do not match, quantum numbers do not match, ...) when it fails.

RuntimeError: 
# Cytnx error occur at void cytnx::Tensor_impl::reshape_(const std::vector<long int>&)
# error: [ERROR] new shape does not match the number of elements.
# file : /home/chiamin/cytnx_dev/Cytnx/include/backend/Tensor_impl.hpp (289)

chiamin avatar Dec 06 '23 02:12 chiamin