-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
Can I ask for clarification on the grouping in external_indices? The nested vector is constructed as
SeQuant/SeQuant/core/utility/indices.hpp
Lines 470 to 478 in e5543da
| for (std::size_t i = 0; i < groups.ket.size(); ++i) { | |
| cont.at(i).push_back(groups.ket[i]); | |
| } | |
| for (std::size_t i = 0; i < groups.bra.size(); ++i) { | |
| cont.at(i).push_back(groups.bra[i]); | |
| } | |
| for (std::size_t i = 0; i < groups.aux.size(); ++i) { | |
| cont.at(i).push_back(groups.aux[i]); | |
| } |
Is there a reason this is not
for (std::size_t i = 0; i < groups.ket.size(); ++i) {
cont.at(0).push_back(groups.ket[i]);
}
for (std::size_t i = 0; i < groups.bra.size(); ++i) {
cont.at(1).push_back(groups.bra[i]);
}
for (std::size_t i = 0; i < groups.aux.size(); ++i) {
cont.at(2).push_back(groups.aux[i]);
}
This would return [[bra0, bra1, ...], [ket0, ket1, ...], [aux0, aux1, ...]] rather than [[bra0, ket0, aux0], [bra1, ket1, aux1], ...]. The former implicitly carries the bra/ket/aux ranks, whereas the latter does not, which makes it difficult to construct an appropriate output tensor when the ranks are not equal.
EDIT: Just noticed it's also ket, bra, aux rather than bra, ket, aux too?
Metadata
Metadata
Assignees
Labels
No labels