fhelium.backend.ckks.codec._periodic
Prepare periodic CKKS messages using their sparse polynomial embedding.
periodic_extent
function View source
def periodic_extent(period: int, ring_dimension: int, generator: int) -> int: ...Return the coefficient count in the embedded negacyclic subring.
periodic_materials
function View source
def periodic_materials(config, context, period: int, depth: int, basis: str, state): ...Build compact embedding and indexed NTT tables with the full-ring roots.
prepare_periodic_tensor
function View source
def prepare_periodic_tensor(message, pre, twister, state, parameters, twice_moduli, even, odd, twiddles, *, ring_dimension, scale, min_modulus, polynomial_domain='ntt'): ...Compute compact NTT rows for p(X)=a(X**(N/U)), with a of degree below U.
The U-point inverse embedding uses the original generator's slot order. Rounding selects word j*N/U of the full coefficient stream and advances by N words per batch item. NTT roots are psi_N**(N/U), so each returned bit-reversed NTT entry represents N/U contiguous entries of the full NTT. FFT roundoff can differ from a full-size FFT near rounding thresholds.
NativePrepareCompressedPlaintextImplementation
class View source
NativePrepareCompressedPlaintextImplementation()Prepare compact NTT plaintext rows from one period and supplied tables.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'native-prepare-compressed-plaintext' | |
supports_in_place | False |
resource_requirements
method
def resource_requirements(invocation): ...execute
method
def execute(invocation, inputs, resources, *, in_place): ...