Skip to content

Commit 5f97003

Browse files
committed
Add test case demonstrating failure
1 parent 2f798e8 commit 5f97003

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/unit/test_spin.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,20 @@ SECTION("partial spintracing + S_maps = full spintracing") {
632632
//(canonicalized: -2 t{a_1,a_2;i_2,i_1}:N-C-S + 4 t{a_1,a_2;i_1,i_2}:N-C-S)
633633
}
634634

635+
SECTION("external indices have to remain consistent") {
636+
// Internally, closed_shell_spintrace performs canonicalization which can end
637+
// up renaming external indices (due to the presence of the symmetrizer). This
638+
// will cause an inconsistency with the explicitly provided external index
639+
// names.
640+
ExprPtr input = parse_expr(
641+
L"A{p_8,p_9;a_8,a_9}:A-C-S * y{p_3,p_4;p_8,p_9}:A-C-S * "
642+
L"g{i_3,a_8;p_3,p_4}:A-C-S * t{a_9;i_3}:A-C-S");
643+
ExprPtr result =
644+
closed_shell_spintrace(input, {{L"a_8", L"p_8"}, {L"a_9", L"p_9"}});
645+
646+
// REQUIRE_THAT(result, EquivalentTo(L"TODO"));
647+
}
648+
635649
SECTION("Symmetrize expression") {
636650
{
637651
// g * t1 + g * t1

0 commit comments

Comments
 (0)