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