pytc.vmc.test.test_enhancementΒΆ

Tests for VMC optimization enhancements.

Validates that the optimized implementations produce numerically identical results to the original code, then tests correctness at increasing system sizes.

Classes

TestBatchedNewtonIntegration

Integration coverage for batched GN accumulation in optimize_ref_var.

TestJacobianSubsampling

Test that Jacobian sub-sampling produces valid optimization steps.

TestNewtonMergedGradient

Test that merged gradient+Jacobian gives identical results to the original.

TestOptimizeRefVar

Test full optimize_ref_var with different system sizes.

TestPsiCaching

Test that cached log_psi/psi_sign values in Walker are correct.

TestShermanMorrison

Test Sherman-Morrison rank-1 updates for single-electron moves.

Functions

make_h_chain

Create a hydrogen chain with Bohr spacing.

make_test_system

Helper to create a test system (molecule + ansatz + walkers + params).