Summary
Add a backend-ntt feature flag that swaps the internal BE alias to Poulpy's NTT120 backend.
Background
Squid currently supports two backends, both FFT-based:
FFT64Ref (default) — portable scalar
FFT64Avx (--features backend-avx) — x86-64 with AVX2 + FMA
Both operate over floating-point and accumulate rounding error that must be budgeted into the noise analysis. Poulpy also ships an NTT120 backend that works over integers mod a prime — exact arithmetic, no rounding error — but squid does not expose it.
Work
- Add a
backend-ntt feature flag that sets crate::backend::BE to the NTT120 backend
- Document the trade-offs: NTT is exact but requires specific prime moduli and may have different performance characteristics than FFT64
- Follow the safe-defaults convention from
conventions.mdc — FFT64Ref remains the default
Summary
Add a
backend-nttfeature flag that swaps the internalBEalias to Poulpy'sNTT120backend.Background
Squid currently supports two backends, both FFT-based:
FFT64Ref(default) — portable scalarFFT64Avx(--features backend-avx) — x86-64 with AVX2 + FMABoth operate over floating-point and accumulate rounding error that must be budgeted into the noise analysis. Poulpy also ships an
NTT120backend that works over integers mod a prime — exact arithmetic, no rounding error — but squid does not expose it.Work
backend-nttfeature flag that setscrate::backend::BEto the NTT120 backendconventions.mdc— FFT64Ref remains the default