-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for non-vector-space (aux) modes in tensorials #243
base: master
Are you sure you want to change the base?
Conversation
This type trait allows to e.g. static_assert that all requirements of the Tensor interface are fulfilled for a given class.
This reverts commit 4c5e8ea.
Instead of hardcoding two expected LaTeX representations of a given expression, we now do an exhaustive search over all permutation of summands to see if one of them yields the desired permutation. This is acceptable as the order of summands has no practical relevance other than for matching a hard-coded order in a test case. The benefit of doing it this way is reduced maintenance cost in exchange for a runtime performance overhead when running the tests. However, the overhead is expected to be small and for test cases it shouldn't matter anyway.
…alogy with array indexing in programming languages
#include "abstract_tensor.hpp" | ||
#include "expr.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include "abstract_tensor.hpp" | |
#include "expr.hpp" | |
#include <SeQuant/core/abstract_tensor.hpp> | |
#include <SeQuant/core/expr.hpp> |
.def_property_readonly("braket", [](const Tensor &t) { | ||
auto braket = t.braket(); | ||
return std::vector<Index>(braket.begin(), braket.end()); | ||
.def_property_readonly("auxikiary", &Tensor::auxiliary) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.def_property_readonly("auxikiary", &Tensor::auxiliary) | |
.def_property_readonly("auxiliary", &Tensor::auxiliary) |
Sure, that shouldn't cause issues. I'll just keep replacing |
@bimalgaudel imo we shouldn't be hard-coding tensor names. Instead, I would make the CSV/DF functions take the respective tensor names as arguments (that might default to what you have currently hard-coded). This should allow for more flexibility in the future. |
d99163a
to
8bc2046
Compare
…s for better cache utilization.
revamp of #177
largely cosmetic touchup (
auxiliary
->aux
) + merge with master + support for both oldTensorNetwork
and newTensorNetworkV2
implementations (old TN was made aux-aware and is the temporary default until TNV2 is tested as its replacement).N.B. since in
master
bra
andket
are reserved for strong typing, the tensor concept dropsbra(t)
,ket(t)
and ``aux(t)` requirements.