The S = 1 solve of N2 CAS(8,8) skips the Σ and Δ states at dav_rtol 1e-7, depending on GPU and threads

Open
#119 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp, pytorch
Domain
backend, testing

Research direction

Start with test_excited_states.py::test_su2_roots_are_the_u1_roots_of_their_spin[2.0-2] and reproduce the N2/6-31G CAS(8,8) case at dav_rtol=1e-7 across thread counts. Then inspect src/compop/solver/davidson.cpp lines 64–107 and check whether its cold-start admixture reaches the even symmetry sector; also investigate whether warmup_bond=16 preserves even weight. Done means the lowest S = 1 states are found consistently across GPU and thread settings.

Written by the indexing model from the issue text.

Description

🤖 AI text below 🤖

What happens

test_excited_states.py::test_su2_roots_are_the_u1_roots_of_their_spin[2.0-2] fails on main (06d316f9) on a Leonardo A100. It passes on the T4 runner.

The cell is N2/6-31G CAS(8,8): SU(2), S = 1, 3 roots, bond 1024 (lossless), 4 sweeps, warmup_bond=16, dav_rtol=1e-7. The solve skips the lowest S = 1 state:

root DMRG FCI error
0 −108.67025108 −108.68253008 +12.28 mHa
1 −108.67025108 −108.67025108 0
2 −108.53839500 −108.67025108 +131.86 mHa

Root 0 lands on one member of the degenerate pair, root 1 on the other, and root 2 on a state far above. The 12.28 mHa miss is the one 8db30945 (#82) describes at the 1e-6 default, in both this test and test_su2_workflow.py, which solves the same cell.

It depends on rounding, not on chance

Job 65363329, same build, same node type:

  • at 1 thread (ctest's setting), 5 runs out of 5 fail with identical numbers;
  • at 8 threads, 2 runs out of 2 pass;
  • dav_rtol 1e-6 and 1e-7 fail; 1e-8, 1e-10 and 1e-12 pass.

Each combination of GPU and thread count always gives the same result, but the combinations differ from each other.

The skipped states are all of one symmetry

PySCF FCI with D2h-adapted orbitals, 2Sz = 2 sector (job 65364275):

FCI energy D2h under C2(z) in the trapped run
−108.68253008 B1u even skipped
−108.67025108 (pair) B3g, B2g odd roots 0 and 1
−108.63575586 (pair) Au, B1u even skipped
−108.60575090 Au even skipped
−108.53839500 (pair) B2u, B3u odd root 2

Every state the run returns is odd under C2(z), the Π states. Every state below root 2 that it skips is even, the Σ and Δ states. The Hamiltonian does not couple the two. So the run starts with almost no even weight, and the even states can only grow from that small part. At 1e-7, Davidson converges the odd states before that happens. A tighter residual gives it more iterations, which is why 1e-8 passes.

The determinant with the lowest diagonal in the full 2Sz = 2 space is 222aa000, which is B1u, so the even sector is not missing from the problem itself. The weight is lost somewhere between the start and the first bond solves.

Where to look

  • warmup_bond=16: whether the warmup state for 3 S = 1 roots keeps any even weight.
  • The cold start in src/compop/solver/davidson.cpp (lines 64–107): the lowest-diagonal basis state of the bond space plus a 1e-3 xorshift admixture. Does the admixture reach the even sector given the environments it gets?
  • An even-and-odd start, or noise in the first sweeps, would make the result independent of the hardware.

Meanwhile

The two S = 1 solves in test_excited_states.py and test_su2_workflow.py move to dav_rtol=1e-8 in the linked PR. That only gives the even weight more room to grow. It works around this issue and does not fix it.

Dominant language
C++
Stars
3
Forks
0
Avg merge
2d 8h
Merged PRs (30d)
31

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Algorithmiq/exa-dmrg

All issues in Algorithmiq/exa-dmrg

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.