Suppose I have the quotient of a polynomial ring $$R = \mathbb{Z}_2[X_1, X_2, \ldots X_n]/(X_i^2 = 0).$$
and pick an element $f \in R$. For any vector $v \in \mathbb{Z}_2^n$, define $f_v$ to be $f$ precomposed with the map that replaces $X_i$ with $X_{i} + 1$ if $v_i = 1$. For example if $f = X_1X_2$, then $f_{(1,0)} = (1 + X_1)X_2$.
I'm curious for what $f$ does the set $\{f_v\}$ form a $\mathbb{Z}_2$-basis for $R$ taken as a $2^n$-dimensional $\mathbb{Z}_2$-vector space? Playing with it, I can see that $f = X_1\ldots X_n$ yields a basis, but I don't see a general pattern.
I think I see how to do it, and the answer is any polynomial of degree $k$. Our argument will proceed by induction on $k$. For $k = 1$, one can check that $f_0 = X_1$ and $f_1 = X_1+1$ form a basis.
Now, suppose that $\{f_v\}$ form a basis for a ring on $(k-1)$ variables, and consider $f$ in $Z_2[X_1,…,X_k]/(X_i^2 = 0)$. One can check that $f_{000…0} + f_{000…1}$ corresponds to a polynomial obtained by throwing out all elements not containing $X_k$, and setting $X_k = 1$. For example, if $f = X_1X_2 + X_3X_4 + X_1X_2X_3X_4$, then $f_{0000} + f_{0001} = X_3 + X_1X_2X_3$.
By construction, this resulting polynomial will be a degree $(k-1)$ polynomial in the variables $X_1, …, X_{k-1}$. Let’s call this polynomial $g$. For $w$ in $\{0,1\}^k-1$, one can further check that
$f_{w0} + f_{w1} = g_w$.
By the inductive hypothesis, because $g$ has degree $k-1$, it forms a basis for all polynomials in $X_1, …, X_{k-1}$, and so in the larger ring, $f_{w0} + f_{w1}$ forms a basis for the set of all polynomials not including $X_k$.
However, nothing is special about the $k$th index, and we can apply the same argument to reduce to the subring generated by all but one $X_i$ to form a basis for the set of all polynomials not including $X_i$.
For any element in $f$ not containing the $i$th variable, we can pass to the smaller ring not including $X_i$, apply the inductive hypothesis to generate that element and, then add it to $f$ to cancel it out (where here, addition of polynomials corresponds to composing diagonal gates). Repeating this procedure, we can remove all terms of $f$ that are not $X_1…X_k$ (as this term contains every variable). But one can directly check that this term can be used to form a basis, completing the proof.