cana.function_properties.symmetry module
Symmetry
Permutation symmetry measures computed on the Look Up Table (LUT) of a node.
- cana.function_properties.symmetry.distinct_symmetry(outputs, k)[source]
Compute the distinct permutation symmetry of a node LUT.
For each LUT entry, this computes the fraction of distinct input permutations that preserve the same output, excluding the identity permutation from both numerator and denominator.
- Parameters:
outputs (list) – The LUT outputs, one per input state.
k (int) – The number of inputs to the node.
- Returns:
(float)
See also
- cana.function_properties.symmetry.raw_symmetry(outputs, k)[source]
Compute the raw symmetry of a node LUT.
LUT rows are grouped by input Hamming weight. For each row, this computes the fraction of rows in the same weight group that have the same output, then averages across all LUT rows.
- Parameters:
outputs (list) – The LUT outputs, one per input state.
k (int) – The number of inputs to the node.
- Returns:
(float)
See also