pdft.circuit.bit_reverse

Contents

pdft.circuit.bit_reverse#

pdft.circuit.bit_reverse(x)[source]#

Pi x Pi: x with the bits of its row index and of its column index reversed.

Yao numbers qubits from the least significant bit and the QFT circuit has no final swap layer, so QFTBasis at its initial tensors is the DFT of the bit-reversed image: forward_transform(bit_reverse(x)) equals ifft2(x, norm="ortho"). A fixed permutation of the pixels changes nothing about how sparse the coefficients are, which is why the bases do not undo it. What is defined on the pixels themselves (a sampling mask drawn from a seed, a figure) lives in the image’s own frame: reverse the image going in and the reconstruction coming out to work there.

An involution. x has shape (..., 2**m, 2**n); leading axes are batch axes and the register widths are read off the last two.

Parameters:

x (Array)

Return type:

Array