Is it possible to access the elements of tensor whose rank is not known at compile time (but given via the input system):
If the rank of Itensor T is known (and in this case 3), I would use:
auto rt = T.real(i(1),j(1),k(1));
with i, j, k indices of T.
However, if T is dynamically built during the execution of the program and is a rank N tensor (with N an input parameter), how can I access its elements (without a lot if else clauses and hard coding the above expression for every possible value of N) ?
Is there something like
auto rt = T.real( list_of_index_values )
with listofindex_values a dynamically built (unpacked) list or tuple of Index values?
Thank you in advance!
Best,
Andreas