In your function:
pub fn generate_programmable_bootstrap_glwe_lut<F, Scalar: UnsignedTorus + CastFrom>(
polynomial_size: PolynomialSize,
glwe_size: GlweSize,
message_modulus: usize,
ciphertext_modulus: CiphertextModulus,
delta: Scalar,
f: F,
) → GlweCiphertextOwned
you have a comment which outlines the box size for the LUT generation is N / ( p/2) however in the code it is implemented as box_size = N / p so I am wondering is the comment an error?
here:
// N/(p/2) = size of each block, to correct noise from the input we introduce the
// notion of box, which manages redundancy to yield a denoised value
// for several noisy values around a true input value.
let box_size = polynomial_size.0 / message_modulus;