Skip to main content

Module transforms

Module transforms 

Source
Expand description

Pairwise transforms for Clay codes

This module implements the core coupling/decoupling transforms from the FAST’18 paper:

  • PRT (Pairwise Reverse Transform): C-plane → U-plane
  • PFT (Pairwise Forward Transform): U-plane → C-plane

The transforms use a 2x2 matrix with parameter γ (gamma):

PRT: [U, U*] = [1, γ; γ, 1] × [C, C*]
PFT: [C, C*] = [1, γ; γ, 1]⁻¹ × [U, U*]

γ must satisfy: γ ≠ 0 and γ² ≠ 1

Constants§

GAMMA
Gamma value for pairwise transforms. Must satisfy: γ ≠ 0, γ² ≠ 1 In GF(2^8), 2 works well since 2² = 4 ≠ 1

Functions§

compute_c_from_u_and_cstar
Compute C from U and C* (partial PFT)
compute_cstar_from_c_and_u
Compute C* from C and U (partial transform)
compute_u_from_c_and_ustar
Compute U from C and U* (partial transform)
gf_inv
GF(2^8) multiplicative inverse: a^(-1) = 1/a
pft_compute_both
PFT: Pairwise Forward Transform (U-plane → C-plane)
prt_compute_both
PRT: Pairwise Reverse Transform (C-plane → U-plane)
prt_compute_both_oriented
PRT with orientation handling