As pointed out by DaftWullie, to answer the effect of a logical operation on the logical subspace, it's important to make explicit the basis of the logical subspace.
I will do this in the following way. For any CSS code, I can pick logical representatives that are purely $X$ or purely $Z$, and I can choose them to be pairwise "conjugate", identifying one with an "$X$"-type logical and the other with a "$Z$"-type logical.
Explicitly, I will require that $X$ logical representatives are made of $X$'s, the $Z$ logical representatives are made of $Z$'s, $[X^{(i)}_L,Z^{(i)}_L]_+=0 \,\, \forall \, i$, $[X^{(i)}_L,Z^{(j)}_L]_-=0 \,\, \forall \, i \neq j$, where $i,j$ run from $1$ to $k$. Once these logical representatives have been constructed, I have a logical computational basis written in terms of the simultaneous eigenvalues of the $Z$ logicals.
I will call a set of pairs of conjugate logical representatives that satisfy the above (and the corresponding computational logical basis) "reasonable."
In my question, I noted $\otimes_{i=1}^n H_i$ was a logical operator in these "self-orthogonal" CSS codes. The spirit of my question was whether we could find a reasonable basis for which this logical operator always had the effect of product of logical Hadamards up to a permutation of the logical qubits.
In the following, I show that the answer is yes, and I give an iterative procedure for constructing this basis. In fact, I will show that the permutation of the logical qubits can be made into a depth-1 circuit of swaps (so that the permutation is a rather gentle one).
Our self-orthogonal CSS code is determined by a code $C$ for which $C \subset C^\perp$. Let's write a linearly independent basis for $C$ as $A=\{a_1,...,a_m\}$. We can then write a basis for $C^\perp$ as $\{a_1,...,a_m, b_1, ..., b_k\}$. I will use the $b$'s to construct a reasonable set of logical representatives that also ensures that $\otimes_{i=1}^n H_i$ behaves as a product of all logical Hadamards up to swapping some pairs of logical qubits.
The following is a sketch of my algorithm for constructing the desired basis. Note that I'll interchange the words "bitstring" and "vector" freely.
The initial input is the linearly independent set $B=\{b_1, ..., b_k\}$ and $B' = \{\}$. The algorithm works by moving vectors from $B$ to $B'$, and then making the remaining vectors in $B$ orthogonal to the ones in $B'$ by adding the just-moved vectors to some appropriate remaining ones in $B$. The purpose of the moving and adding steps is to passively and actively maintain the linear independence of each of the sets $A,B,B'$, maintain $C^\perp = \text{span}\{A\cup B\cup B'\}$, and maintain the orthogonality of the bitstrings in each of $A,B,B'$ to those in the other two sets.
The above rules have an important consequence that allows the algorithm to continue running until $B$ is empty. So long as $B$ is not-empty, there will be at least one vector $c \in B$ such that $c \cdot c =1$ or at least one pair of vectors $f,g$ for which $f \cdot g =1$. This follows from the fact that the bitstrings in $B$ are not in $C=\left( C^\perp \right)^\perp$, so each bitstring in $B$ must have a product of $1$ with some bitstring in $C^\perp$. Since $B \in C^\perp$, but the vectors in $B$ are made orthogonal to the ones in $B'$ and $A$, this means that each vector in $B$ must have a nonvanishing product with at least one vector in $B$.
- Check if the set $B$ is empty. If it is, return $B'$. Otherwise, go to step 2.
- Check whether there is a bitstring $c$ in $B$ for which $c \cdot c = 1$. If there is not, go to step 3. If there is such a bitstring $c$, append $c$ to $B'$ and remove $c$ from $B$. For every bitstring $b$ in $B$ for which $c \cdot b = 1$, update $B$ by adding $c$ to that bitstring $b$. Return to step 1.
- Find a pair of bitstrings $f,g$ in $B$ such that $f \cdot g = 1$. Append $f$ and $g$ to $B'$, and remove them from $B$. Now consider the remaining vectors in $B$. Add $f$ to the bitstrings $b$ for which $g \cdot b = 1$, and add $g$ to the bitstrings $b$ for which $f \cdot b =1$. Return to step 1.
At the end, we have that $B'$ is a linearly independent set of $k$ vectors such that $C^\perp = \text{span}\{A\cup B'\}$. $B'$ can be partitioned into sets containing either one or two vectors: the sets with one vector $c$ have $c\cdot c =1$ and $c$ orthogonal to the rest of the vectors in $B'$; the sets with two vectors $f,g$ have $f \cdot g = 1$ and $f,g$ orthogonal to themselves and to the rest of the vectors in $B'$.
From this set of bitstrings, we can construct our logical representatives. Note that I'll use $X^b$ to mean the product of $X$ on the sites where the bitstring $b$ is $1$ and the identity otherwise.
For the singleton $c$'s, we construct the conjugate $X$ and $Z$ logicals $X^c$ and $Z^c$. For the pair $f,g$'s, we construct conjugate $X^f$ and $Z^g$, and conjugate $X^g$ and $Z^f$. By virtue of our construction, the $X$ and $Z$ logicals within a given conjugate pair anticommute, and the $X$ and $Z$ logicals in different conjugate pairs commute, so this is indeed a reasonable basis.
Let's consider the effect of a product of physical Hadamards $\otimes_{i=1}^n H_i$. For each singleton $c$, the conjugate $X$ and $Z$ logicals exchange, giving a logical Hadamard on that logical qubit. For each pair $f,g$, an $X$ logical of one conjugate pair exchanges with the $Z$ logical of the other conjugate pair (and vice-versa), so this gives logical Hadamards on these logical qubits followed by a logical swap gate.
The above shows that for these self-orthogonal CSS codes, we can always construct a reasonable basis where a product of physical Hadamards behaves as a product of logical Hadamards up to some logical swaps. This answers my question in the affirmative.
As an aside, note that for some self-orthogonal CSS codes, we cannot always construct a reasonable basis where a product of physical Hadamards behaves as a product of logical Hadamards without any swaps.
For example, this question noted that the CSS code generated from the classical codes
$$C = \langle (111001), (000110) \rangle$$
$$C^\perp = \langle (111001), (000110), (010001), (001001) \rangle $$
suffers from a logical swap after performing $\otimes_{i=1}^n H_i$.
I also noted in a comment that the CSS code generated from
$$C = \langle(11110)\rangle$$
$$C^\perp = \langle(11110), (11000),(01100), (00001)\rangle$$
with any reasonable basis also suffers from a swap on two of the three logical qubits after performing $\otimes_{i=1}^n H_i$.
All choices of logical representatives satisfying $[X^{(i)}_L,Z^{(i)}_L]+=0 ,, \forall , i$, $[X^{(i)}_L,Z^{(j)}_L]-=0 ,, \forall , i \neq j$ suffer at least one pair of $X_L^{(i)}$ and $Z_L^{(i)}$ that do not have support on the same locations.
– user196574 Dec 15 '23 at 20:55