pdft.bases.RealRichBasis#
- class pdft.bases.RealRichBasis(m, n, tensors=None, code=None, inv_code=None)[source]#
Bases:
CircuitBasisQFT topology with H + real-orthogonal 2-qubit gates.
The U(4) slots are initialised to the 4×4 identity (real-orthogonal, not the complex controlled-phase) so the basis is NOT bit-identical to QFTBasis at training step 0 — the forward circuit at init is H ⊗ H ⊗ H per dim followed by identity 2-qubit ops, i.e. just the Walsh-Hadamard transform. This is the appropriate starting point for a real-valued search; the Walsh-Hadamard is the simplest real-orthogonal basis and a natural baseline for natural-image transforms.
- __init__(m, n, tensors=None, code=None, inv_code=None)#
Methods
__init__(m, n[, tensors, code, inv_code])emit(m, n)The gate sequence of the real-rich (H + real-orthogonal 2-qubit) circuit.
forward_transform(pic)inverse_transform(pic)conj(tensors)throughinv_code, exactly like Julia'sbasis.inverse_code(conj.(basis.tensors)..., ...).Attributes
image_sizeinv_tensorsThe tensor list itself.
num_parametersmntensorsprogramcodeinv_code- static emit(m, n)#
The gate sequence of the real-rich (H + real-orthogonal 2-qubit) circuit.