pytc.solver.test.test_bug_rpaΒΆ

Tests for the low-rank direct-RPA solver.

The core cross-check (core_sym_eig vs an independent Newton-Kleinman iteration) is the guard that makes changes to the core safe.

Classes

TestAmplitudeStop

TestDenseCorePlacement

dense_core places the core solve and the truncation eigh explicitly: "host" gives the device energy, and a device out-of-memory error stops the run instead of moving the step.

TestFractionalOccupation

Smeared references: weighted pairs in the unchanged solver.

TestHostScratch

PYTC_HOST_SCRATCH moves the pair-height host buffers to disk-backed memmaps; the numbers must not change.

TestLowScalingRPA

TestPrecisionGuard

TestResidencies

Resident and host-backed solves of the same problem, against stored reference results (water/cc-pVDZ).

TestTruncationPlacement

Functions

_care_res

_core_nk_ref

Independent Newton-Kleinman reference for E Y + Y E + Y Bt Y + Bt = 0.

_disk_backed

True if a is, or views, an np.memmap.

_h2o_mf

Water/cc-pVDZ DF-RHF shared by the regression inputs.

_h2o_problem

Build the shared water/cc-pVDZ pair-space regression input once.