Template Function sequant::mbpt::detail::hardcoded_nns_projector

Function Documentation

template<typename T>
std::optional<std::vector<T>> sequant::mbpt::detail::hardcoded_nns_projector(std::size_t n_particles)

Provides one row of the NNS projector matrix, hardcoded from Mathematica to avoid numerical precision loss.

The NNS projector is the idempotent projector onto the range of M, NNS projector = M · M_pinv (= M_pinv · M since M is symmetric). It must be applied to residuals evaluated from the V2 (WK-compacted) equations to reconstruct the terms dropped by the compaction. See DOI 10.48550/ARXIV.1805.00565, for more details.

Parameters:

n_particles – The rank of external index pairs

Returns:

Optional vector of NNS projector weights representing the last row, std::nullopt if n_particles is outside the range [1,5].