pdft.bases.RealRichBasis#

class pdft.bases.RealRichBasis(m, n, tensors=None, code=None, inv_code=None)[source]#

Bases: CircuitBasis

QFT 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.

Parameters:
__init__(m, n, tensors=None, code=None, inv_code=None)#
Parameters:

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) through inv_code, exactly like Julia's basis.inverse_code(conj.(basis.tensors)..., ...).

Attributes

freezes_to_blocked

image_size

inv_tensors

The tensor list itself.

num_parameters

m

n

tensors

program

code

inv_code

static emit(m, n)#

The gate sequence of the real-rich (H + real-orthogonal 2-qubit) circuit.

Parameters:
Return type:

list[Gate]

freezes_to_blocked: ClassVar[bool] = True#