Validation
The package is covered by a deterministic Julia test suite and a cross-language check against the C++ port.
Julia test suite
test/runtests.jl runs with a fixed RNG seed and covers:
- random configuration generation and density accumulation;
Ψprojfull-vs-incremental update consistency (a sequence of single-particle moves must reproduce a full rebuild);- the Λ-level builders (
cf_ground_state_lmand friends); - the elementary symmetric polynomials, checked to all orders against an independent ground-truth expansion of $\prod_i(1 + r_i x)$;
- the Metropolis proposal convention and isotropy;
Ψunprojorbitals vscalculate_lland incremental updates;- Sherman–Morrison inverse tracking (
slater_det_invmatches a fresh inverse; the determinant ratio matches brute force); - the non-square extended Slater determinant for quasihole/quasiparticle amplitudes.
Run it with:
using Pkg; Pkg.test()C++ cross-check
The C++ port (cpp/) is validated against Julia reference data generated by cpp/reference/dump_reference.jl and cpp/reference/dump_logpsi.jl:
test_cfsonsphere— native structural tests mirroring the Julia suite;test_reference— element-wise cross-check of the Slater matrix, projection coefficients, and Jastrow factor against Julia CSVs to $\le 10^{-12}$;test_logpsi— a large cross-check of $\log\Psi$ across many systems (sizes 4→32, $\Lambda$-levels 1→5, projected and unprojected) and 1000 shared configurations each.
cd cpp
cmake -B build -DCMAKE_PREFIX_PATH=/opt/homebrew
cmake --build build
ctest --test-dir build --output-on-failureBecause std::mt19937_64 differs from Julia's RNG, Monte Carlo chains agree only statistically, but the deterministic wavefunction values match to machine precision.