# For a stabilizer code, does existence of transversal Hadamard depend on the choice of logical Paulis?

Consider the Steane code $$C(S)$$, which has the set of consistent transversal logical operators, $$\bar{X} = X^{\otimes 7}, \\ \bar{Z} = Z^{\otimes 7}, \\ \bar{H} = H^{\otimes 7}.$$ However, we can choose any other pair of anti-commuting operators in the normalizer of $$S$$ to act as our logical $$X$$ and $$Z$$. Gottesman presented in his thesis a way of constructing such operators for any stabilizer code, by manipulating the stabilizer generator matrix of the code (see here for a review).

For the Steane code, this method yields for example $$\bar{X} = IIIIXXX, \\ \bar{Z} = ZZIIIIZ.$$ However, my attempts at creating a logical Hadamard for these operators has failed. The reason is quite simple. We need $$\bar{H}\bar{X}\bar{H}^\dagger = \bar{Z}$$. If $$\bar{H}_0$$ is some operator $$A$$, then the condition for the first qubit is $$AA^\dagger = Z$$. If we do the algebra, it's quite clear that no such $$A$$ exists.

This answer gives conditions for when a given set of logical Paulis do have a corresponding transversal logical Hadamard. But, does someone know of a set of conditions for when a transversal logical Hadamard does not exist?

More importantly, given that a transversal logical Hadamard exists for the code, does there exist an algorithm to construct a consistent set of transversal logical Paulis and Hadamard for a given stabilizer code?

TL;DR: The existence of transversal Hadamard is independent of which transversal Pauli operators are chosen as the logical Pauli operators, as long as they satisfy the appropriate commutation relations. In the particular case above, $$H^{\otimes 7}$$ is a logical Hadamard for both choices of logical Paulis. The reason the attempt to define it for the second set of logical Paulis failed is that it tried to achieve too much. Namely, we only need $$\overline{H}\overline{X}\overline{H}^\dagger=\overline{Z}$$ to hold on the code subspace.

## Stabilizers

For reference, let's recall the usual generators of Steane code's stabilizer group $$\mathcal{S}$$ $$\begin{array}{c|c} M_1&XXXXIII\\ M_2&XXIIXXI\\ M_3&XIXIXIX\\ M_4&ZZZZIII\\ M_5&ZZIIZZI\\ M_6&ZIZIZIZ\\ \end{array}\tag1$$ see e.g. Table $$3.4$$ on page $$23$$ in Daniel Gottesman's PhD thesis. Note that qubit order here is opposite$$^1$$ to that in Figure $$10.6$$ on page $$456$$ in Nielsen & Chuang.

## Logical Pauli operators

There are two choices of logical operators in play here \begin{align} \overline{X}&=XXXXXXX\\ \overline{Z}&=ZZZZZZZ \end{align}\tag2 and \begin{align} \tilde{X}&=IIIIXXX=M_1\overline{X}\\ \tilde{Z}&=ZZIIIIZ=M_5M_4\overline{Z}. \end{align}\tag3 We know that $$\overline{H}=HHHHHHH$$ is a logical Hadamard for $$(2)$$. The task is to find a logical Hadamard $$\tilde{H}$$ for $$(3)$$. A sufficient condition for this is that $$\tilde{H}$$ satisfies $$\tilde{H}\tilde{X}\tilde{H}^\dagger=\tilde{Z}.\tag4$$

As alluded to in the question, it might seem that $$\tilde{H}$$ cannot be transversal. For if $$\tilde{H}=A_1A_2A_3A_4A_5A_6A_7$$ then $$A_1IA_1^\dagger=I=cZ$$ for some scalar $$c$$ which is a contradiction. However, the equality $$(4)$$ is a sufficient condition, not a necessary one. There is a weaker sufficient condition. Namely, $$\tilde{H}$$ must preserve the code subspace and $$(4)$$ must hold on the code subspace. We can thus rewrite $$(4)$$ as $$\tilde{H}\tilde{X}\tilde{H}^\dagger\equiv\tilde{Z}\tag{4'}$$ where $$\equiv$$ denotes equality of operators on the code subspace. For any stabilizer $$M$$ we have $$M\equiv I$$. Finally, we notice that one can simply set $$\tilde{H}:=\overline{H}=H^{\otimes 7}$$, because then \begin{align} \tilde{H}\tilde{X}\tilde{H}^\dagger&=\overline{H}M_1\overline{X}\overline{H}\\ &=M_4\overline{H}\overline{X}\overline{H}\\ &=M_4\overline{Z}\\ &\equiv M_5M_4\overline{Z}\\ &=\tilde{Z} \end{align}\tag5 and we already know that $$H^{\otimes 7}$$ preserves the code subspace. Therefore, $$H^{\otimes 7}$$ is a logical Hadamard for both choices of logical Pauli operators $$(2)$$ and $$(3)$$.

## Generalization

The proof above is independent of which particular stabilizers appear in $$(3)$$, so $$H^{\otimes 7}$$ is a logical Hadamard for all pairs of logical operators defined as $$\tilde{X}=M\overline{X}$$ and $$\tilde{Z}=N\overline{Z}$$ with $$M,N\in\mathcal{S}$$.

A slightly modified proof also works if the logical operators are defined as $$\tilde{X}=M\overline{P}$$ and $$\tilde{Z}=N\overline{Q}$$ with $$P,Q\in\{X,Y,Z\}$$ and $$P$$ and $$Q$$ satisfy the appropriate commutation relations. However, in this more general case the form of the logical Hadamard may change since it may need to incorporate additional single-qubit Cliffords to map between physical Pauli operators, e.g. $$S^{\otimes 7}$$ to map between $$X^{\otimes 7}$$ and $$Y^{\otimes 7}$$. However, this does not affect transversality of the resulting operator.

$$^1$$ The question doesn't specify the convention used, but some generators in Nielsen & Chuang anti-commute with the candidate (weight three) logical operators while all generators in Gottesman commute with them.

• Thank you for the clear answer. This clarifies a lot. Followup question. Here we were lucky that we knew of $\bar{X}, \bar{Z}$, so constructing $\bar{H}$ was easy. If we only knew $\tilde{X}$ and $\tilde{Z}$, do you have any intuition on how one might discover the logical $H$? Secondly, are there any known conditions for when a transversal logical $H$ exists for a stabilizer code? Thanks Jan 5 at 9:51
• I'd do this in three steps. First, check the commutation relations. Second, use stabilizers to ensure the two operators have the same support (the set of qubits on which they act as non-identity). Third, use single-qubit Cliffords to map the respective Paulis to each other. Jan 5 at 17:44
• Thanks. I will try this out. Jan 5 at 22:09
• +1 This is a fabulous answer it deserves way more upvotes! Mar 21 at 20:29