TensorTrainAMEN fails when the RHS has an internal TT rank greater than one
@i3s93 is already working on this.
Since Sep 1, 2026.
- Dominant language
- C++
- Stars
- 9
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
BoBa’s scalar `TensorTrainAMEN` solver fails when solving a system whose right-hand side has a nontrivial internal TT rank. A minimal example of this is the system $Ax = b$ where
$$
A = I_{2} \otimes I_{2}, \qquad b = e_{1}\otimes e_{1} + e_{2}\otimes e_{2}.
$$
Using a rank-one initial guess such as $x_{0} = e_{1}\otimes e_{1}$ produces the error:
`Invalid contraction.: 1 == 2`
The likely cause is an index-ordering mismatch in `TensorTrainAMEN::project_phizy`. A left-to-right environment produced by compute_next_Phi is ordered as (r_z, r_y, 1), but scalar AMEn labels it as`{"rz", "one", "ry"}`. The correct indexing pattern should instead read `{"rz", "ry", "one"}`. The existing ordering is masked for rank-one RHS tensors because both exchanged axes have length one. BoBa’s block-AMEn implementation already uses the latter ordering.
AMEn should accept general valid RHS TT ranks and solve the identity example with $x = b$. A small rank-two RHS regression test in `test_tt_solvers.cpp` would likely demonstrate the failure and verify the proposed fix.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.