Suppose $N = 2^L$ and we are interested in performing the following transformation a
$\mapsto$ a_hat
on arrays of $N$ complex numbers in time $O(N \log(N))$ or similar (as opposite to $O(N^2)$).
Preliminary definitions
The following construction is motivated by physics. Yet, we write it in a self-contained form to make sure no background in physics is needed to understand the question.
Consider an $N$-dimensional vector space $\mathcal{H} = \mathbb{C}^N$ with $N = 2^L$ basis elements $\left|z\right>$ ($z=0,\dots,N-1$). Array a
is then interpreted as a vector in $\mathcal{H}$ equal to $\sum_z a_z \left|z\right>$. For each $j=0,\dots,L-1$ we introduce maps $c^\dagger_j \colon \mathcal{H} \to \mathcal{H}$ given by
$$c^\dagger_j \left|z\right> = \begin{cases}
0&\text{ if }z_j = 1,\\
(-1)^{\text{popcnt}(\lfloor z / 2^j\rfloor)} \left|z\oplus 2^j\right>&\text{ if } z_j = 0.
\end{cases} \tag{1}$$
Here $\oplus$ means bitwise xor (commonly denoted by ^
in programming languages) and $z_j$ is $j$-th bit of $z$ (i.e. (z >> j) & 1
).
Expression $\text{popcnt}(\lfloor z / 2^j\rfloor)$ counts the number of bits set to $1$ in $z$ to the left of position $j$.
The maps $c^\dagger_j$ are called "creation operators" in physics. One can then check that the composition of these maps changes sign when they change the order:
$$c_j^\dagger c_l^\dagger = -c_l^\dagger c_j^\dagger. \tag{2}$$
Also, $c_j^\dagger c_j^\dagger = 0$.
With this notation we can write $$ \left|z\right> = \left(\prod_{j=L-1,\dots,0} (c^{\dagger}_{j})^{z_j}\right)\left|0\right>, \tag{3} $$ Where the product is just the composition of the maps and $(c^{\dagger}_{j})^{z_j}$ is $c^{\dagger}_{j}$ if $z_j=1$ and identity map if $z_j=0$. The ordering is such that the maps with lowest $j$ are applied first.
Definition of fermionic Fourier transform
For the purpose of this question the fermionic Fourier transform is defined as follows. Take array a
as input. It represents a vector
$$\vec{a} = \sum_z a_z \left|z\right> = \sum_z a_z \left(\prod_{j=L-1,\dots,0} (c^{\dagger}_{j})^{z_j}\right)\left|0\right>. \tag{4}$$
In the right hand side of this expression replace every $c^{\dagger}_j$ by $\frac{1}{\sqrt{L}} \sum_{l=0}^{L-1} e^{-2\pi i jl / L} c^{\dagger}_l$ to obtain the vector $\vec{\hat{a}}$. Output elements of $\vec{\hat{a}}$ in the basis $\{\left|z\right>\}_{z=0}^{N}$.
Example
$L=4$, $N=16$, $a = [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]$ representing the vector $$\vec{a} = \left|0011_2\right> = c^\dagger_1 c^\dagger_0 \left|0\right>$$ (we write $z$ in binary notation). Then $$ \vec{\hat{a}} = \frac{1}{4} (c_0^\dagger - ic_1^\dagger - c_2^\dagger + ic_3^\dagger)(c_0^\dagger + c_1^\dagger + c_2^\dagger + c_3^\dagger)\left|0\right> = \frac{1}{4}\Bigl(-(1+i)\left|0011\right>, -2\left|0101\right>, (-1+i)\left|0110\right>, (-1+i)\left|1001\right>, 2i \left|1010\right>, (1+i)\left|1100\right>\Bigr).$$ Here in the second equality we opened the brackets, sorted $c^\dagger_l$ in decreasing order (adding $-$ signs as required by (2)), and used (3) to write the terms as basis elements.
Thus, the correct implementation of the fermionic Fourier transform would return
a_hat = [0, 0, 0, -(1+i)/4, 0, -1/2, (-1+i)/4, 0, 0, (-1+i)/4, i/2, 0, (1+i)/2, 0, 0, 0]
.
Question
Since this is a linear operation on $N$-dimensional vectors, there is a trivial algorithm (for fixed $L$): precompute the matrix describing this linear operation, then do matrix-vector multiplication in $O(N^2)$ time. This can be improved to $O(N^2/\sqrt{\log(N)})$ by handling portions of a
with different popcnt(z)
separately. However, similarly to the standard FFT, one may expect that this can be done faster (possibly in $O(N \log(N))$ or, at least, $O(N \text{Poly}(\log(N)))$ time). Does such faster algorithm (for a classical computer) exist?