fhelium.engine.rns.decomposition
Hybrid-RNS key-switch decomposition metadata.
RnsDecompositionDigit
class View source
RnsDecompositionDigit(key_digit_index: int, prime_ids: tuple[int, ...])One active hybrid-RNS digit and its stable key-storage digit index.
Attributes
| Name | Type | Default/value |
|---|---|---|
key_digit_index | int | |
prime_ids | tuple[int, ...] |
HybridRnsDecomposition
class View source
HybridRnsDecomposition(chain: RnsChain)Partition
Scale-prime rows are split into fixed digits whose maximum width is key_digit_index so it selects the correct axis of the level-zero key-switching key. The enumeration index returned at one level is only local digit_index and is intentionally distinct from that stable key index.
digit_count
property
digit_count: intdigits_at_level
method
def digits_at_level(level: int) -> tuple[RnsDecompositionDigit, ...]: ...digit_rows
method
def digit_rows(level: int, *, include_p: bool=False) -> tuple[tuple[int, ...], ...]: ...Return canonical parameter rows for active Q digits.
component_digit_rows
method
def component_digit_rows(level: int) -> tuple[tuple[int, ...], ...]: ...Return digit rows relative to a compact level-specific component.