pdft.bases.RichBasis#
- class pdft.bases.RichBasis(m, n, tensors=None, code=None, inv_code=None)[source]#
Bases:
objectQFT topology with H + learnable U(4) gates instead of H + CP.
- Parameter count at m=n=3 (within an 8x8 block):
3 H gates per dim × 3 free real params (SU(2)) = 9
3 U(4) gates per dim × 15 free real params (SU(4)) = 45
total per dim: 54 (BELOW the 63-dim of SU(8) — meaningful structure)
Initialised so the circuit is BIT-IDENTICAL to QFTBasis at training step 0 (each U(4) starts at the 4×4 controlled-phase diag(1, 1, 1, exp(iφ)) of its corresponding QFT slot). Adam can then deform the U(4) gates into any 4×4 unitary, but the family is a strict 54-dim submanifold of SU(8) and does NOT contain 8×8 DCT exactly (empirically: fit_to_dct plateaus at Frobenius² ≈ 63.7).
- Pytree contract:
leaves = tensors (one list) aux data = (m, n, len(tensors), code, inv_code)
Methods
__init__(m, n[, tensors, code, inv_code])forward_transform(pic)inverse_transform(pic)Attributes