pdft.bases.DCT4Basis#
- class pdft.bases.DCT4Basis(m, n, tensors=None, code=None, inv_code=None, parametrization='o4')[source]#
Bases:
objectDCT-IV tensor-network basis: the real-orthogonal, ancilla-free analogue of
QFTBasis.Mirrors QFTBasis (one tensor list;
inverse_transformappliesconj(tensors)throughinv_code). The gates are emitted bypdft.bases.circuit.dct4.dct4_code(); at initialization the forward operator is the bit-reversed orthonormal DCT-IV per dimension, and — since DCT-IV is self-inverse — the basis reconstructs exactly.tensorsholds every gate — the affineR_yrotation layer, the branch Hadamards, the mirror-QCNOT permutations and theDeltasign — each a learnable leaf on its auto-selected Riemannian manifold (O(2) / O(4) / phase). The gate tensors are real-valued (stored complex128, zero imaginary), so the unitary manifold trains the real-orthogonal subset under a real objective: exact DCT-IV at init, then relaxed, just as QFT relaxes within U.- Pytree contract:
leaves = tensors aux data = (m, n, len(tensors), code, inv_code)
- Parameters:
Methods
__init__(m, n[, tensors, code, inv_code, ...])forward_transform(pic)inverse_transform(pic)Attributes