This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

thanks: thanks: thanks:
J.H and Q.L contributed equally to this work.

Designing the Quantum Channels Induced by Diagonal Gates

Jingzhen Hu jingzhen.hu@duke.edu Department of Mathematics, Duke University, Durham, NC 27708, USA Qingzhong Liang qingzhong.liang@duke.edu Department of Mathematics, Duke University, Durham, NC 27708, USA Robert Calderbank robert.calderbank@duke.edu Department of Mathematics, Duke University, Durham, NC 27708, USA Department of Electrical and Computer Engineering, Department of Computer Science, Duke University, NC 27708, USA
Abstract

The challenge of quantum computing is to combine error resilience with universal computation. Diagonal gates such as the transversal TT gate play an important role in implementing a universal set of quantum operations. This paper introduces a framework that describes the process of preparing a code state, applying a diagonal physical gate, measuring a code syndrome, and applying a Pauli correction that may depend on the measured syndrome (the average logical channel induced by an arbitrary diagonal gate). It focuses on CSS codes, and describes the interaction of code states and physical gates in terms of generator coefficients determined by the induced logical operator. The interaction of code states and diagonal gates depends very strongly on the signs of ZZ-stabilizers in the CSS code, and the proposed generator coefficient framework explicitly includes this degree of freedom. The paper derives necessary and sufficient conditions for an arbitrary diagonal gate to preserve the code space of a stabilizer code, and provides an explicit expression of the induced logical operator. When the diagonal gate is a quadratic form diagonal gate (introduced by Rengaswamy et al.), the conditions can be expressed in terms of divisibility of weights in the two classical codes that determine the CSS code. These codes find application in magic state distillation and elsewhere. When all the signs are positive, the paper characterizes all possible CSS codes, invariant under transversal ZZ-rotation through π/2l\pi/2^{l}, that are constructed from classical Reed-Muller codes by deriving the necessary and sufficient constraints on ll. The generator coefficient framework extends to arbitrary stabilizer codes but there is nothing to be gained by considering the more general class of non-degenerate stabilizer codes.

1 Introduction and Review111Section 2 introduces notation and provides technical background for the results described in this section.

{𝟎}\{\bm{0}\}𝒞2\mathcal{C}_{2}𝒞1\mathcal{C}_{1}𝔽2n\mathbb{F}_{2}^{n}k2k_{2}k1k_{1}{𝟎}\{\bm{0}\}𝒞1\mathcal{C}_{1}^{\perp}𝒞2\mathcal{C}_{2}^{\perp}𝔽2n\mathbb{F}_{2}^{n}𝝁\bm{\mu}𝜸\bm{\gamma}

2nk12^{n-k_{1}} ways to assign the signs of ZZ-stabilizers

2k22^{k_{2}} different syndromes 𝝁𝔽2n/𝒞2\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp} of XX-stabilizers\vdots\vdots\vdots\cdots\cdots\cdotsρ1\rho_{1}ρ2\rho_{2}ρ3\rho_{3}ρ4\rho_{4}UZU_{Z}

P(syndrome=𝝁)P(\text{syndrome}=\bm{\mu})

correction

B𝝁B_{\bm{\mu}}

syndrome 𝝁\bm{\mu}ZZ-logicals 𝜸𝒞2/𝒞1\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}
Figure 1: The 2nk12^{n-k_{1}} rows of the array are indexed by the [[n,k1k2,d]][\![n,k_{1}-k_{2},d]\!] CSS codes corresponding to all possible signings of the ZZ-stabilizer group. The 2k22^{k_{2}} columns of the array are indexed by all possible XX-syndromes 𝝁\bm{\mu}. The logical operator B𝝁B_{\bm{\mu}} is induced by (1) preparing any code state ρ1\rho_{1}; (2) applying a diagonal physical gate UZU_{Z} to obtain ρ2\rho_{2}; (3) using XX-stabilizers to measure ρ2\rho_{2}, obtaining the syndrome 𝝁\bm{\mu} with probability p𝝁p_{\bm{\mu}}, and the post-measurement state ρ3\rho_{3}; (4) applying a Pauli correction to ρ3\rho_{3}, obtaining ρ4\rho_{4}. The generator coefficients A𝝁,𝜸A_{\bm{\mu},\bm{\gamma}} are obtained by expanding the logical operator B𝝁B_{\bm{\mu}} in terms of ZZ-logical Pauli operators ϵ(𝟎,𝜸)E(𝟎,𝜸)\epsilon_{(\bm{0},\bm{\gamma})}E(\bm{0},\bm{\gamma}), where ϵ(𝟎,𝜸){±1}\epsilon_{(\bm{0},\bm{\gamma})}\in\{\pm 1\}.

We approach quantum computing through fault tolerant implementation of a universal set of gates. There are many finite sets of gates that are universal, and a standard choice is to augment the set of Clifford gates by a non-Clifford unitary [7] such as the TT gate (π/8\pi/8 rotation). Gottesman and Chuang [20] introduced the Clifford hierarchy of unitary operators. The first level is the Pauli group. The second level is the Clifford group, which consists of unitary operators that normalize the Pauli group. The ll-th level consists of unitary operators that map Pauli operators to the (l1)(l-1)-th level under conjugation. The teleportation model of quantum computation introduced in [20] is closely related to the structure of the Clifford hierarchy (for details, see [42, 4, 5, 1, 15, 36, 33]). The diagonal gates in the Clifford hierarchy form a group [42, 15], and the diagonal entries are 2l2^{l}-th roots of unity raised to some polynomial function of the qubit state. Cui et al. [15] determined the level of a diagonal gate in the Clifford hierarchy in terms of ll and the degree of the polynomial function. Quadratic form diagonal (QFD) gates are a family of diagonal gates associated with quadratic forms. The class of QFD gates includes transversal ZZ-rotations through π/2l\pi/2^{l}, and encompasses all 22-local gates in the hierarchy [36].

Quantum error-correcting codes (QECCs) protect information as it is transformed by logical gates. In general, a logical non-Clifford gate is more difficult to implement than a logical Clifford gate [19]. Any non-Clifford operation on the kk logical qubits of an [[n,k,d]][\![n,k,d]\!] QECC must be induced by a non-Clifford operation on the nn physical qubits [15]. We derive a global necessary and sufficient condition for any diagonal physical gate to preserve the code space of a stabilizer code [18, 11]. A transversal gate [18] is a tensor product of unitaries on individual code blocks. In the case of transversal ZZ-rotation through π/2l\pi/2^{l}, we show that this global condition is equivalent to the local trigonometric conditions derived by Rengaswamy et al. [35]. Our approach has the advantage of providing insight into the induced logical operator.

It is essential that a set of gates be both universal and fault-tolerant. Fault-tolerance of transversal gates follows from the observation that uncorrelated errors remain uncorrelated in code blocks. The Eastin-Knill Theorem [17] reveals that we cannot implement a universal set of logical operations on a QECC using transversal operations alone. Magic state distillation (MSD) combines transversal gates with an ancillary magic state to circumvent this restriction [10, 34, 9, 2, 13, 26, 14, 22, 25, 39]. If the initial fidelity of magic state exceeds a certain threshold, then it can be purified by successive application of the quantum teleportation protocol on stabilizer codes that are able to realize a logical non-Clifford gate. (Generalized) triorthogonal codes [9, 22] are Calderbank-Shor-Steane (CSS) codes [12, 37] designed to implement a non-Clifford logical gate (up to some diagonal Clifford logical gates). Hamming weights in the classical codes that determine the CSS codes are required to satisfy certain divisibility properties [13, 26, 21, 39, 31]. Many examples employ Reed-Muller (RM) codes. In Section 5 we characterize CSS codes constructed from classical RM codes that are fixed by transversal ZZ-rotation through π/2l\pi/2^{l}.

MSD provides a path to universal fault tolerant computation, where success depends on engineering the interaction of code states and physical gates. Here we consider the interaction of a diagonal physical gate UZU_{Z} with the code states of a stabilizer code, as shown in Figure 1. We prepare an initial code state, apply a physical gate, then measure a code syndrome 𝝁\bm{\mu}, and finally apply a correction based on 𝝁\bm{\mu}. For each syndrome, we expand the induced logical operator in the Pauli basis to obtain the generator coefficients that capture state evolution. Intuitively, the diagonal physical gate preserves the code space if and only if the induced logical operator corresponding to the trivial syndrome is unitary.

The effectiveness of magic state distillation (MSD) depends on the probability of observing a given syndrome, and it is possible to combine syndrome measurement with a decoder (see Krishna and Tillich [25] for example). Generator coefficients provide a framework for investigating the effectiveness and the threshold of distillation. We describe the design space that is available through a running example.

Example 1 (The [[7,1,3]][\![7,1,3]\!] Steane code).

Reichardt [34] demonstrated that it is possible to distill the magic state |A=(|0+eıπ/4|1)/2|{A}\rangle=(|{0}\rangle+e^{\imath\pi/4}|{1}\rangle)/\sqrt{2} by post-selecting on the trivial syndrome, even though the Steane code is not perfectly preserved by the transversal T gate. He also demonstrated the distillation threshold is optimal for |A|{A}\rangle. In Section 4, we use generator coefficients to describe the average-logical channel induced by the transversal TT gate on the Steane code. When we observe the trivial syndrome, the induced logical operator is TT^{\dagger}. Otherwise it is a logical Pauli ZZ followed by a logical TT^{\dagger}. The induced logical operator becomes TT^{\dagger} for all syndromes after applying a logical Pauli ZZ correction to all non-trivial syndromes. However, the distillation protocol no longer converges, despite the higher probability of success333See Appendix A. Generator coefficients encode the probabilities of observing different syndromes, which can be used to analyze variants of the Steane protocol (such as applying a decoder to subsets of syndromes), as well as MSD protocols that use different codes (such as the [[15,1,3]][\![15,1,3]\!] code).

The introduction of magic state distillation by Bravyi and Kitaev [10] led to the construction of CSS codes where the code space is preserved by a transversal ZZ-rotation of the underlying physical space [10, 34, 9, 13, 26, 14, 22, 39]. The approach taken in each paper is to examine the action of a transversal ZZ-rotation on the basis states of a CSS code. This approach results in sufficient conditions for a transversal ZZ-rotation to realize a logical operation on the code space. In contrast we derive necessary and sufficient conditions by analyzing the action of a transversal diagonal gate on the stabilizer group that determines the code. In effect, we study the code space by studying symmetries of the codespace.

The interaction of transversal physical operators and code states depends very strongly on the signs of stabilizers [23, 16]. Consider for example, the design of CSS codes that are oblivious to coherent noise. We can model the effective error as a uniform ZZ-rotation on each qubit through some (small) angle θ\theta. We require the noise to preserve the code space and to act trivially (as the logical identity operator). It is possible to demonstrate the existence of weight-22 ZZ-stabilizers, and to show that their signs must be balanced [23]. Our generator coefficient framework includes the freedom to choose signs and this degree of freedom is relatively unexplored. We describe the design space that is available through a running example.

Example 2 (The [[4,2,2]][\![4,2,2]\!] code).

Generator coefficients encode correlation between the initial code state and syndrome measurement, which may result in loss of logical information. The [[4,2,2]][\![4,2,2]\!] code shows that correlation can depend very strongly on the signs of ZZ-stabilizers. The stabilizer group is 𝒮=X4,Z4\mathcal{S}=\langle X^{\otimes 4},Z^{\otimes 4}\rangle. In Section 4 we show that if Z4Z^{\otimes 4} has a positive sign, then there is an embedded decoherence free subspace spanned by the three encoded basis states |01¯|{\overline{01}}\rangle, |10¯|{\overline{10}}\rangle, and |11¯|{\overline{11}}\rangle. We also show that syndrome measurement collapses logical information. If Z4Z^{\otimes 4} has a negative sign, then we show that logical information does not collapse, but the embedded decoherence free subspace disappears. Generator coefficients encode the different ways that code states can evolve.

We now summarize our main technical contributions.

  1. 1)

    We derive an explicit expression for the logical channel induced by a diagonal physical gate (Section 4, (94) describes the induced logical operator for each syndrome 𝝁\bm{\mu} and (112) describes the probability of observing 𝝁\bm{\mu}). We quantify the correlation between initial code state and measured syndrome by separating the probability of observing a given syndrome into two components, one depending on the generator coefficients, the other on the choice of initial state (Section 4.2). We analyze the [[4,2,2]][\![4,2,2]\!] code (Example 2) to show that each component depends strongly on the choice of signs in the stabilizer code, and that we can choose signs to create a embedded decoherence free subspace.

  2. 2)

    We derive necessary and sufficient conditions for an arbitrary diagonal physical gate to preserve the codespace of a CSS code with arbitrary signs (Section 5, Theorem 7), and describe the logical operator that results (Section 5, Remark 8). These conditions generalize earlier conditions found by Rengaswamy et al [35] for transversal ZZ-rotation through π/2l\pi/2^{l}.

  3. 3)

    We further simplify the necessary and sufficient conditions for a QFD gate to preserve the code space of a CSS code (Section 5, Theorem 9). These conditions govern divisibility of Hamming weights in the classical codes that determine the CSS codes. In the case of transversal ZZ-rotation through π/2l\pi/2^{l} applied to CSS codes with positive signs, we show the necessity of divisibility conditions derived in [26, 39].

  4. 4)

    We characterize all CSS codes with positive signs, invariant under transversal ZZ-rotation through π/2l\pi/2^{l}, that are constructed from classical Reed-Muller (RM) codes (and their derivatives obtained by puncturing or removing the first coordinate). We derive necessary and sufficient conditions that relate ll to the parameters of the component RM codes (Section 5, Theorem 14 and Remark 15).

  5. 5)

    We extend the generator coefficient framework to stabilizer codes (Appendix B). This extension shows that given an [[n,k,d]][\![n,k,d]\!] non-degenerate stabilizer code preserved by a diagonal gate UZU_{Z}, we can construct an [[n,k,dZd]][\![n,k,d_{Z}\geq d]\!] CSS code preserved by UZU_{Z} with the same induced logical operator. Note that dZd_{Z} (the minimum weight of any nontrivial ZZ-logical Pauli operator) is the relevant distance for MSD. Recall that an [[n,k,d]][\![n,k,d]\!] stabilizer code is non-degenerate if the weight of every stabilizer element is at least dd.

The rest of the paper is organized as follows. Section 2 introduces notation and provides the necessary background. Our review of stabilizer codes takes account of the freedom to choose signs in the stabilizer group, and provides the general encoding map and logical Pauli operators for CSS codes with arbitrary signs. Section 3 introduces the generator coefficients that describe how a diagonal gate acts on a CSS code. Section 4 describes how generator coefficient govern the average logical channel. Section 5 establishes necessary and sufficient conditions for a CSS code to support a diagonal physical gate, and derives the induced logical operator. We then derive the divisibility conditions and introduce RM constructions. Section 6 concludes the paper and discusses future directions. In Appendix B, we extends the generator coefficient framework to general stabilizer codes and show that CSS codes perform at the least as well as non-degenerate stabilizer codes for diagonal gates.

2 Preliminaries and Notation

2.1 Classical Reed-Muller Codes

Let 𝔽2={0,1}\mathbb{F}_{2}=\{0,1\} denote the binary field. Let m1m\geq 1, and let x1x_{1}, x2x_{2}, \dots, xmx_{m} be binary variables (monomials of degree 11). Monomials of degree rr can be written as xi1xi2xirx_{i_{1}}x_{i_{2}}\cdots x_{i_{r}} where ij{1,2,,m}i_{j}\in\{1,2,\dots,m\} are distinct. A boolean function with degree rr is a binary linear combination of monomials with degrees at most rr. There is a one-to-one correspondence between boolean functions hh and evaluation vectors 𝒉=[h(x1,x2,,xm)](x1,x2,,xm)𝔽2m\bm{h}=[h(x_{1},x_{2},\cdots,x_{m})]_{(x_{1},x_{2},\dots,x_{m})\in\mathbb{F}_{2}^{m}}. The degree 0 boolean function corresponds to the constant evaluation vector 𝟏𝔽22m\bm{1}\in\mathbb{F}_{2}^{2^{m}}.

For 0rm0\leq r\leq m, the Reed-Muller code RM(r,m)(r,m) is the set of all evaluation vectors 𝒉\bm{h} associated with boolean functions h(x1,x2,,xm)h(x_{1},x_{2},\cdots,x_{m}) of degree at most rr, RM(r,m){𝒉𝔽22mh𝔽2[x1,x2,,xm],\mathrm{RM}(r,m)\coloneqq\{\bm{h}\in\mathbb{F}_{2}^{2^{m}}\mid h\in\mathbb{F}_{2}[x_{1},x_{2},\cdots,x_{m}], deg(h)r}.\deg(h)\leq r\}. The length of the RM(r,m)(r,m) code is 2m2^{m}, the dimension is given by k=j=0r(mj)k=\sum_{j=0}^{r}\binom{m}{j}, and the minimal distance is 2mr2^{m-r}. The dual of RM(r,m)(r,m) is RM(mr1,m)(m-r-1,m), and we can construct the RM codes by a recursively observing RM(r,m+1)={(𝒖,𝒖+𝒗)𝒖RM(r,m),𝒗RM(r1,m)}(r,m+1)=\{(\bm{u},\bm{u}+\bm{v})\mid\bm{u}\in\mathrm{RM}(r,m),\bm{v}\in\mathrm{RM}(r-1,m)\} [28]. Note that all weights in RM(r,mr,m) are multiples of 2(m1)/r2^{\left\lfloor(m-1)/r\right\rfloor} [3, 29, 28], and the highest power of 22 that divides all weights of codewords in RM(r,mr,m) is exactly 2(m1)/r2^{\left\lfloor(m-1)/r\right\rfloor} [6].

2.2 The MacWilliams Identities

Let ı1\imath\coloneqq\sqrt{-1} be the imaginary unit. We denote the Hamming weight of a binary vector 𝒗\bm{v} by wH(𝒗)w_{H}(\bm{v}). The weight enumerator of a binary linear code 𝒞𝔽2m\mathcal{C}\subset\mathbb{F}_{2}^{m} is the polynomial

P𝒞(x,y)=𝒗𝒞xmwH(𝒗)ywH(𝒗).P_{\mathcal{C}}(x,y)=\sum_{\bm{v}\in\mathcal{C}}x^{m-w_{H}\left(\bm{v}\right)}y^{w_{H}\left(\bm{v}\right)}. (1)

The MacWilliams Identities [27] relate the weight enumerator of a code 𝒞\mathcal{C} to that of the dual code 𝒞\mathcal{C}^{\perp}, and are given by

P𝒞(x,y)=1|𝒞|P𝒞(x+y,xy).P_{\mathcal{C}}(x,y)=\frac{1}{|\mathcal{C}^{\perp}|}P_{\mathcal{C}^{\perp}}(x+y,x-y). (2)

Given an angle θ(0,2π)\theta\in(0,2\pi), we make the substitution x=cosθ2x=\cos\frac{\theta}{2} and y=ısinθ2y=-\imath\sin\frac{\theta}{2}, and define

Pθ[𝒞]\displaystyle P_{\theta}[\mathcal{C}] P𝒞(cosθ2,ısinθ2)\displaystyle\coloneqq P_{\mathcal{C}}\left(\cos\frac{\theta}{2},-\imath\sin\frac{\theta}{2}\right) (3)
=𝒗𝒞(cosθ2)mwH(𝒗)(ısinθ2)wH(𝒗).\displaystyle=\sum_{\bm{v}\in\mathcal{C}}\left(\cos\frac{\theta}{2}\right)^{m-w_{H}(\bm{v})}\left(-\imath\sin\frac{\theta}{2}\right)^{w_{H}(\bm{v})}. (4)

2.3 The Pauli Group

Any 2×22\times 2 Hermitian matrix can be uniquely expressed as a real linear combination of the four single qubit Pauli matrices/operators

I2[1001],X[0110],Z[1001],\displaystyle I_{2}\coloneqq\begin{bmatrix}1&0\\ 0&1\end{bmatrix},\leavevmode\nobreak\ X\coloneqq\begin{bmatrix}0&1\\ 1&0\end{bmatrix},\leavevmode\nobreak\ Z\coloneqq\begin{bmatrix}1&0\\ 0&-1\end{bmatrix}, (5)

and YıXZY\coloneqq\imath XZ. The operators satisfy X2=Y2=Z2=I2,XY=YX,XZ=ZX, and YZ=ZY.X^{2}=Y^{2}=Z^{2}=I_{2},\leavevmode\nobreak\ XY=-YX,\leavevmode\nobreak\ XZ=-ZX,\leavevmode\nobreak\ \text{ and }YZ=-ZY.

Let ABA\otimes B denote the Kronecker product (tensor product) of two matrices AA and BB. Let n1n\geq 1 and N=2nN=2^{n}. Given binary vectors 𝒂=[a1,a2,,an]\bm{a}=[a_{1},a_{2},\dots,a_{n}] and 𝒃=[b1,b2,,bn]\bm{b}=[b_{1},b_{2},\dots,b_{n}] with ai,bj=0a_{i},b_{j}=0 or 11, we define the operators

D(𝒂,𝒃)\displaystyle D(\bm{a},\bm{b}) Xa1Zb1XanZbn,\displaystyle\coloneqq X^{a_{1}}Z^{b_{1}}\otimes\cdots\otimes X^{a_{n}}Z^{b_{n}}, (6)
E(𝒂,𝒃)\displaystyle E(\bm{a},\bm{b}) ı𝒂𝒃Tmod4D(𝒂,𝒃).\displaystyle\coloneqq\imath^{\bm{a}\bm{b}^{T}\bmod 4}D(\bm{a},\bm{b}). (7)

We often abuse notation and write 𝒂,𝒃𝔽2n\bm{a},\bm{b}\in\mathbb{F}_{2}^{n}, though entries of vectors are sometimes interpreted in 4={0,1,2,3}\mathbb{Z}_{4}=\{0,1,2,3\}. Note that D(𝒂,𝒃)D(\bm{a},\bm{b}) can have order 1,21,2 or 44, but E(𝒂,𝒃)2=ı2𝒂𝒃TD(𝒂,𝒃)2=ı2abT(ı2𝒂𝒃TIN)=INE(\bm{a},\bm{b})^{2}=\imath^{2\bm{a}\bm{b}^{T}}D(\bm{a},\bm{b})^{2}=\imath^{2ab^{T}}(\imath^{2\bm{a}\bm{b}^{T}}I_{N})=I_{N}. The nn-qubit Pauli group is defined as

𝒲N{ıκD(𝒂,𝒃):𝒂,𝒃𝔽2n,κ4},\mathcal{HW}_{N}\coloneqq\{\imath^{\kappa}D(\bm{a},\bm{b}):\bm{a},\bm{b}\in\mathbb{F}_{2}^{n},\kappa\in\mathbb{Z}_{4}\}, (8)

where 2l={0,1,,2l1}\mathbb{Z}_{2^{l}}=\{0,1,\dots,2^{l}-1\}. The nn-qubit Pauli matrices form an orthonormal basis for the vector space of N×NN\times N complex matrices (N×N\mathbb{C}^{N\times N}) under the normalized Hilbert-Schmidt inner product A,BTr(AB)/N\langle A,B\rangle\coloneqq\mathrm{Tr}(A^{\dagger}B)/N [18].

We use the Dirac notation, ||\cdot\rangle to represent the basis states of a single qubit in 2\mathbb{C}^{2}. For any 𝒗=[v1,v2,,vn]𝔽2n\bm{v}=[v_{1},v_{2},\cdots,v_{n}]\in\mathbb{F}_{2}^{n}, we define |𝒗=|v1|v2|vn|\bm{v}\rangle=|v_{1}\rangle\otimes|v_{2}\rangle\otimes\cdots\otimes|v_{n}\rangle, the standard basis vector in N\mathbb{C}^{N} with 11 in the position indexed by 𝒗\bm{v} and 0 elsewhere. We write the Hermitian transpose of |𝒗|\bm{v}\rangle as 𝒗|=|𝒗\langle\bm{v}|=|\bm{v}\rangle^{\dagger}. We may write an arbitrary nn-qubit quantum state as |ψ=𝒗𝔽2nα𝒗|𝒗N|\psi\rangle=\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}\alpha_{\bm{v}}|\bm{v}\rangle\in\mathbb{C}^{N}, where α𝒗\alpha_{\bm{v}}\in\mathbb{C} and 𝒗𝔽2n|α𝒗|2=1\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}|\alpha_{\bm{v}}|^{2}=1. The Pauli matrices act on a single qubit as X|0=|1,X|1=|0,Z|0=|0, and Z|1=|1.X|{0}\rangle=|{1}\rangle,X|{1}\rangle=|{0}\rangle,Z|{0}\rangle=|{0}\rangle,\text{ and }Z|{1}\rangle=-|{1}\rangle.

The symplectic inner product is [𝒂,𝒃],[𝒄,𝒅]S=𝒂𝒅T+𝒃𝒄Tmod2\langle[\bm{a},\bm{b}],[\bm{c},\bm{d}]\rangle_{S}=\bm{a}\bm{d}^{T}+\bm{b}\bm{c}^{T}\bmod 2. Since XZ=ZXXZ=-ZX, we have

E(𝒂,𝒃)E(𝒄,𝒅)=(1)[𝒂,𝒃],[𝒄,𝒅]SE(𝒄,𝒅)E(𝒂,𝒃).E(\bm{a},\bm{b})E(\bm{c},\bm{d})=(-1)^{\langle[\bm{a},\bm{b}],[\bm{c},\bm{d}]\rangle_{S}}E(\bm{c},\bm{d})E(\bm{a},\bm{b}). (9)

2.4 The Clifford Hierarchy

The Clifford hierarchy of unitary operators was introduced in [20]. The first level of the hierarchy is defined to be the Pauli group 𝒞(1)=𝒲N\mathcal{C}^{(1)}=\mathcal{HW}_{N}. For l2l\geq 2, the levels ll are defined recursively as

𝒞(l):={U𝕌N:U𝒲NU𝒞(l1)},\mathcal{C}^{(l)}:=\{U\in\mathbb{U}_{N}:U\mathcal{HW}_{N}U^{\dagger}\subset\mathcal{C}^{(l-1)}\}, (10)

where 𝕌N\mathbb{U}_{N} is the group of N×NN\times N unitary matrices. The second level is the Clifford Group, 𝒞(2)\mathcal{C}^{(2)}, which can be generated (up to overall phases) using the “elementary" unitaries Hadamard, Phase, and either of Controlled-NOT (CXX) or Controlled-ZZ (CZZ) defined respectively as

H12[1111],P[100ı],H\coloneqq\frac{1}{\sqrt{2}}\begin{bmatrix}1&1\\ 1&-1\end{bmatrix},P\coloneqq\begin{bmatrix}1&0\\ 0&\imath\end{bmatrix}, (11)
CZab\displaystyle\text{C}Z_{ab} |00|a(I2)b+|11|aZb,\displaystyle\coloneqq|{0}\rangle\langle{0}|_{a}\otimes(I_{2})_{b}+|{1}\rangle\langle{1}|_{a}\otimes Z_{b}, (12)
CXab\displaystyle\leavevmode\nobreak\ \text{C}X_{a\rightarrow b} |00|a(I2)b+|11|aXb.\displaystyle\coloneqq|{0}\rangle\langle{0}|_{a}\otimes(I_{2})_{b}+|{1}\rangle\langle{1}|_{a}\otimes X_{b}. (13)

Note that Clifford unitaries in combination with any unitary from a higher level can be used to approximate any unitary operator arbitrarily well [7]. Hence, they form a universal set for quantum computation. A widely used choice for the non-Clifford unitary is the TT gate in the third level defined by

T:=[100eıπ4]=Z14[eıπ800eıπ8]=eıπ8Z.T:=\begin{bmatrix}1&0\\ 0&e^{\frac{\imath\pi}{4}}\end{bmatrix}=Z^{\frac{1}{4}}\equiv\begin{bmatrix}e^{-\frac{\imath\pi}{8}}&0\\ 0&e^{\frac{\imath\pi}{8}}\end{bmatrix}=e^{-\frac{\imath\pi}{8}Z}. (14)

2.5 Stabilizer Codes

We define a stabilizer group 𝒮\mathcal{S} to be a commutative subgroup of the Pauli group 𝒲N\mathcal{HW}_{N}, where every group element is Hermitian and no group element is IN-I_{N}. We say 𝒮\mathcal{S} has dimension rr if it can be generated by rr independent elements as 𝒮=νiE(𝒄𝒊,𝒅𝒊):i=1,2,,r\mathcal{S}=\langle\nu_{i}E(\bm{c_{i}},\bm{d_{i}}):i=1,2,\dots,r\rangle, where νi{±1}\nu_{i}\in\{\pm 1\} and 𝒄𝒊,𝒅𝒊𝔽2n\bm{c_{i}},\bm{d_{i}}\in\mathbb{F}_{2}^{n}. Since 𝒮\mathcal{S} is commutative, we must have [𝒄𝒊,𝒅𝒊],[𝒄𝒋,𝒅𝒋]S=𝒄𝒊𝒅𝒋T+𝒅𝒊𝒄𝒋T=0mod2\langle[\bm{c_{i}},\bm{d_{i}}],[\bm{c_{j}},\bm{d_{j}}]\rangle_{S}=\bm{c_{i}}\bm{d_{j}}^{T}+\bm{d_{i}}\bm{c_{j}}^{T}=0\bmod 2.

Given a stabilizer group 𝒮\mathcal{S}, the corresponding stabilizer code is the fixed subspace 𝒱(𝒮):={|ψN:g|ψ=|ψ for all g𝒮}\mathcal{V}(\mathcal{S)}:=\{|\psi\rangle\in\mathbb{C}^{N}:g|\psi\rangle=|\psi\rangle\text{ for all }g\in\mathcal{S}\}. We refer to the subspace 𝒱(𝒮)\mathcal{V}(\mathcal{S}) as an [[n,k,d]]\left[\left[n,k,d\right]\right] stabilizer code because it encodes k:=nrk:=n-r logical qubits into nn physical qubits. The minimum distance dd is defined to be the minimum weight of any operator in 𝒩𝒲N(𝒮)𝒮\mathcal{N}_{\mathcal{HW}_{N}}\left(\mathcal{S}\right)\setminus\mathcal{S}. Here, the weight of a Pauli operator is the number of qubits on which it acts non-trivially (i.e., as X,YX,\leavevmode\nobreak\ Y or ZZ), and 𝒩𝒲N(𝒮)\mathcal{N}_{\mathcal{HW}_{N}}\left(\mathcal{S}\right) denotes the normalizer of 𝒮\mathcal{S} in 𝒲N\mathcal{HW}_{N} defined by

𝒩𝒲N(𝒮)\displaystyle\mathcal{N}_{\mathcal{HW}_{N}}\left(\mathcal{S}\right) {ıκE(𝒂,𝒃)𝒲N:\displaystyle\coloneqq\{\imath^{\kappa}E\left(\bm{a},\bm{b}\right)\in\mathcal{HW}_{N}:
E(𝒂,𝒃)𝒮E(𝒂,𝒃)=𝒮,κ4}\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ E\left(\bm{a},\bm{b}\right)\mathcal{S}E\left(\bm{a},\bm{b}\right)=\mathcal{S},\kappa\in\mathbb{Z}_{4}\}
={ıκE(𝒂,𝒃)𝒲N:\displaystyle=\{\imath^{\kappa}E\left(\bm{a},\bm{b}\right)\in\mathcal{HW}_{N}:
E(𝒂,𝒃)E(𝒄,𝒅)E(𝒂,𝒃)=E(𝒄,𝒅)\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ E\left(\bm{a},\bm{b}\right)E\left(\bm{c},\bm{d}\right)E\left(\bm{a},\bm{b}\right)=E\left(\bm{c},\bm{d}\right)
 for all E(𝒄,𝒅)𝒮,κ4}.\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \text{ for all }E\left(\bm{c},\bm{d}\right)\in\mathcal{S},\kappa\in\mathbb{Z}_{4}\}. (15)

Note that the second equality defines the centralizer of 𝒮\mathcal{S} in 𝒲N\mathcal{HW}_{N}, and it follows from the first since Pauli matrices commute or anti-commute.

For any Hermitian Pauli matrix E(𝒄,𝒅)E\left(\bm{c},\bm{d}\right) and ν{±1}\nu\in\{\pm 1\}, the operator IN+νE(𝒄,𝒅)2\frac{I_{N}+\nu E\left(\bm{c},\bm{d}\right)}{2} projects onto the ν\nu-eigenspace of E(𝒄,𝒅)E\left(\bm{c},\bm{d}\right). Thus, the projector onto the codespace 𝒱(𝒮)\mathcal{V}(\mathcal{S}) of the stabilizer code defined by 𝒮=νiE(𝒄𝒊,𝒅𝒊):i=1,2,,r\mathcal{S}=\langle\nu_{i}E\left(\bm{c_{i}},\bm{d_{i}}\right):i=1,2,\dots,r\rangle is

Π𝒮\displaystyle\Pi_{\mathcal{S}} =i=1r(IN+νiE(𝒄𝒊,𝒅𝒊))2\displaystyle=\prod_{i=1}^{r}\frac{\left(I_{N}+\nu_{i}E\left(\bm{c_{i}},\bm{d_{i}}\right)\right)}{2}
=12rj=12rϵjE(𝒂𝒋,𝒃𝒋),\displaystyle=\frac{1}{2^{r}}\sum_{j=1}^{2^{r}}\epsilon_{j}E\left(\bm{a_{j}},\bm{b_{j}}\right), (16)

where ϵj{±1}\epsilon_{j}\in\{\pm 1\} is a character of the group 𝒮\mathcal{S}, and is determined by the signs of the generators that produce E(𝒂𝒋,𝒃𝒋)E(\bm{a_{j}},\bm{b_{j}}): ϵjE(𝒂𝒋,𝒃𝒋)=tJ{1,2,,r}νtE(𝒄𝒕,𝒅𝒕)\epsilon_{j}E\left(\bm{a_{j}},\bm{b_{j}}\right)=\prod_{t\in J\subset\{1,2,\dots,r\}}\nu_{t}E\left(\bm{c_{t}},\bm{d_{t}}\right) for a unique JJ.

Let |𝜶L|{\bm{\alpha}}\rangle_{L}, 𝜶𝔽2k\bm{\alpha}\in\mathbb{F}_{2}^{k} be the protected logical state. We define the generating set {XjL,ZjL𝒲2k:j=1,k=k1k2}\{X^{L}_{j},Z^{L}_{j}\in\mathcal{HW}_{2^{k}}:j=1,\dots k=k_{1}-k_{2}\} for the logical Pauli operators by the actions

XjL|𝜶L=|𝜶L,\displaystyle X_{j}^{L}|{\bm{\alpha}}\rangle_{L}=|{\bm{\alpha^{\prime}}}\rangle_{L}, (17)

where

αi={αi, if ij,αi1, if i=j,\displaystyle\alpha^{\prime}_{i}=\left\{\begin{array}[]{lc}\alpha_{i},&\text{ if }i\neq j,\\ \alpha_{i}\oplus 1,&\text{ if }i=j,\end{array}\right. (20)

and ZjL|𝜶L=(1)αj|𝜶L.Z_{j}^{L}|{\bm{\alpha}}\rangle_{L}=(-1)^{\alpha_{j}}|{\bm{\alpha}}\rangle_{L}. Let X¯j,Z¯j\bar{X}_{j},\bar{Z}_{j} be the nn-qubit operators which are physical representatives of XjL,ZjLX_{j}^{L},Z^{L}_{j} for j=1,,kj=1,\dots,k. Then X¯j,Z¯j\bar{X}_{j},\bar{Z}_{j} commute with the stabilizer group SS and satisfy

X¯iZ¯j={Z¯jX¯i, if ij,Z¯jX¯i, if i=j.\displaystyle\bar{X}_{i}\bar{Z}_{j}=\left\{\begin{array}[]{lc}\bar{Z}_{j}\bar{X}_{i},&\text{ if }i\neq j,\\ -\bar{Z}_{j}\bar{X}_{i},&\text{ if }i=j.\end{array}\right. (23)
Remark 1.

A stabilizer code determines a resolution of the identity with the different subspaces fixed by different signings of the stabilizer generators. When we correct stochastic and independent Pauli errors, different signings of stabilizer generators lead to quantum codes with identical performance. However, when we consider correlated errors such as the coherent errors (rotations of ZZ axis for any angle θ\theta), the signs of stabilizers play an important role [23, 16].

Example 3 (33-qubit bit flip code with negative signs).

Consider the stabilizer code defined by the group 𝒮=Z1Z2,Z2Z3\mathcal{S}=\langle-Z_{1}Z_{2},Z_{2}Z_{3}\rangle, which differs from the stabilizer group of the 33-qubit bit flip code, 𝒮=Z1Z2,Z2Z3\mathcal{S^{\prime}}=\langle Z_{1}Z_{2},Z_{2}Z_{3}\rangle, just by the sign of Z1Z2Z_{1}Z_{2}. The encoding circuit of 𝒱(𝒮)\mathcal{V}(\mathcal{S^{\prime}}) consist of CX12X_{1\to 2} and CX13X_{1\to 3} gates, which maps |0L|{0}\rangle_{L} to |000|{000}\rangle and |1L|{1}\rangle_{L} to |111|{111}\rangle. Since XZX=ZXZX^{\dagger}=-Z, the encoding circuit of 𝒱(𝒮)\mathcal{V}(\mathcal{S}) has an extra XX gate on the first qubit, which has |0¯=|100|{\bar{0}}\rangle=|{100}\rangle and |1¯=|011|{\bar{1}}\rangle=|{011}\rangle. Moreover, the physical representation of logical Pauli XX and ZZ for 𝒮\mathcal{S} is X1X2X3X_{1}X_{2}X_{3} and Z1Z_{1} respectively, i.e., X¯=X1X2X3,Z¯=Z1\bar{X}=X_{1}X_{2}X_{3},\leavevmode\nobreak\ \bar{Z}={-}Z_{1}.

2.6 CSS Codes

A CSS (Calderbank-Shor-Steane) code is a particular type of stabilizer code with generators that can be separated into strictly XX-type and strictly ZZ-type operators. Consider two classical binary codes 𝒞1,𝒞2\mathcal{C}_{1},\mathcal{C}_{2} such that 𝒞2𝒞1\mathcal{C}_{2}\subset\mathcal{C}_{1}, and let 𝒞1\mathcal{C}_{1}^{\perp}, 𝒞2\mathcal{C}_{2}^{\perp} denote the dual codes. Note that 𝒞1𝒞2\mathcal{C}_{1}^{\perp}\subset\mathcal{C}_{2}^{\perp}. Suppose that 𝒞2=𝒄𝟏,𝒄𝟐,,𝒄𝒌𝟐\mathcal{C}_{2}=\langle\bm{c_{1}},\bm{c_{2}},\dots,\bm{c_{k_{2}}}\rangle is an [n,k2][n,k_{2}] code and 𝒞1=𝒅𝟏,𝒅𝟐,𝒅𝒏𝒌𝟏\mathcal{C}_{1}^{\perp}=\langle\bm{d_{1}},\bm{d_{2}}\dots,\bm{d_{n-k_{1}}}\rangle is an [n,nk1][n,n-k_{1}] code. Then, the corresponding CSS code has the stabilizer group

𝒮\displaystyle\mathcal{S} =ν(𝒄𝒊,𝟎)E(𝒄𝒊,𝟎),ν(𝟎,𝒅𝒋)E(𝟎,𝒅𝒋)i=1;j=1i=k2;j=nk1\displaystyle=\langle\nu_{(\bm{c_{i}},\bm{0})}E\left(\bm{c_{i}},\bm{0}\right),\nu_{(\bm{0},\bm{d_{j}})}E\left(\bm{0},\bm{d_{j}}\right)\rangle_{i=1;\leavevmode\nobreak\ j=1}^{i=k_{2};\leavevmode\nobreak\ j=n-k_{1}}
={ϵ(𝒂,𝟎)ϵ(𝟎,𝒃)E(𝒂,𝟎)E(𝟎,𝒃):𝒂𝒞2,𝒃𝒞1},\displaystyle=\{\epsilon_{(\bm{a},\bm{0})}\epsilon_{(\bm{0},\bm{b})}E\left(\bm{a},\bm{0}\right)E\left(\bm{0},\bm{b}\right):\bm{a}\in\mathcal{C}_{2},\bm{b}\in\mathcal{C}_{1}^{\perp}\},

where ν(𝒄𝒊,𝟎),ν(𝟎,𝒅𝒋),ϵ(𝒂,𝟎),ϵ(𝟎,𝒃){±1}\nu_{(\bm{c_{i}},\bm{0})},\nu_{(\bm{0},\bm{d_{j}})},\epsilon_{(\bm{a},\bm{0})},\epsilon_{(\bm{0},\bm{b})}\in\{\pm 1\}. The CSS code projector can be written as the product:

Π𝒮=Π𝒮XΠ𝒮Z,\displaystyle\Pi_{\mathcal{S}}=\Pi_{\mathcal{S}_{X}}\Pi_{\mathcal{S}_{Z}}, (24)

where

Π𝒮X\displaystyle\Pi_{\mathcal{S}_{X}} i=1k2(IN+ν(𝒄𝒊,𝟎)E(𝒄𝒊,𝟎))2\displaystyle\coloneqq\prod_{i=1}^{k_{2}}\frac{(I_{N}+\nu_{(\bm{c_{i}},\bm{0})}E(\bm{c_{i}},\bm{0}))}{2}
=𝒂𝒞2ϵ(𝒂,𝟎)E(𝒂,𝟎)|𝒞2|,\displaystyle=\frac{\sum_{\bm{a}\in\mathcal{C}_{2}}\epsilon_{(\bm{a},\bm{0})}E(\bm{a},\bm{0})}{|\mathcal{C}_{2}|}, (25)

and

Π𝒮Z\displaystyle\Pi_{\mathcal{S}_{Z}} j=1nk1(IN+ν(𝟎,𝒅𝒋)E(𝟎,𝒅𝒋))2\displaystyle\coloneqq\prod_{j=1}^{n-k_{1}}\frac{(I_{N}+\nu_{(\bm{0},\bm{d_{j}})}E(\bm{0},\bm{d_{j}}))}{2}
=𝒃𝒞1ϵ(𝟎,𝒃)E(𝟎,𝒃)|𝒞1|.\displaystyle=\frac{\sum_{\bm{b}\in\mathcal{C}_{1}^{\perp}}\epsilon_{(\bm{0},\bm{b})}E(\bm{0},\bm{b})}{|\mathcal{C}_{1}^{\perp}|}. (26)

Each projector defines a resolution of the identity, and we focus on Π𝒮X\Pi_{\mathcal{S}_{X}} since we consider diagonal gates. Note that any nn-qubit Pauli ZZ operator can be expressed as E(𝟎,𝒃)E(𝟎,𝜸)E(𝟎,𝝁)E(\bm{0},\bm{b})E(\bm{0},\bm{\gamma})E(\bm{0},\bm{\mu}) for a ZZ-stabilizer representation 𝒃𝒞1\bm{b}\in\mathcal{C}_{1}^{\perp}, a ZZ-logical representation 𝜸𝒞2/𝒞1\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}, and a XX-syndrome representation 𝝁𝔽2n/𝒞2\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}. For 𝝁𝔽2n/𝒞2\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}, we define

𝒮X(𝝁)\displaystyle\mathcal{S}_{X}(\bm{\mu}) {(1)𝒂𝝁Tϵ(𝒂,0)E(𝒂,𝟎):𝒂𝒞2},\displaystyle\coloneqq\left\{(-1)^{\bm{a}\bm{\mu}^{T}}\epsilon_{(\bm{a},0)}E(\bm{a},\bm{0}):\bm{a}\in\mathcal{C}_{2}\right\}, (27)
Π𝒮X(𝝁)\displaystyle\Pi_{\mathcal{S}_{X}(\bm{\mu})} 1|𝒞2|𝒂𝒞2(1)𝒂𝝁Tϵ(𝒂,𝟎)E(𝒂,𝟎).\displaystyle\coloneqq\frac{1}{|\mathcal{C}_{2}|}\sum_{\bm{a}\in\mathcal{C}_{2}}(-1)^{\bm{a}\bm{\mu}^{T}}\epsilon_{(\bm{a},\bm{0})}E(\bm{a},\bm{0}). (28)

Then, we have

Π𝒮X(𝝁)Π𝒮X(𝝁)={Π𝒮X(𝝁),if𝝁=𝝁,0,if𝝁𝝁,\displaystyle\Pi_{\mathcal{S}_{X}(\bm{\mu})}\Pi_{\mathcal{S}_{X}(\bm{\mu}^{\prime})}=\left\{\begin{array}[]{lc}\Pi_{\mathcal{S}_{X}(\bm{\mu})},&\text{if}\ \bm{\mu}=\bm{\mu}^{\prime},\\ 0,&\text{if}\ \bm{\mu}\neq\bm{\mu}^{\prime},\end{array}\right. (31)
and 𝝁𝔽2n/𝒞2ΠSX(𝝁)=I2n.\displaystyle\text{and }\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\Pi_{S_{X}(\bm{\mu})}=I_{2^{n}}. (32)

If 𝒞1\mathcal{C}_{1} and 𝒞2\mathcal{C}_{2}^{\perp} can correct up to tt errors, then SS defines an [[n,k1k2,d]]\left[\left[n,k_{1}-k_{2},d\right]\right] CSS code with d2t+1d\geq 2t+1, which we will represent as CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}). If G2G_{2} and G1G_{1}^{\perp} are the generator matrices for 𝒞2\mathcal{C}_{2} and 𝒞1\mathcal{C}_{1}^{\perp} respectively, then the (nk1+k2)×(2n)(n-k_{1}+k_{2})\times(2n) matrix

G𝒮=[G2G1]G_{\mathcal{S}}=\left[\begin{array}[]{c|c}G_{2}&\\ \hline\cr&G_{1}^{\perp}\end{array}\right] (33)

generates 𝒮\mathcal{S}.

2.7 General Encoding Map for CSS codes

Given an [[n,k,d]][\![n,k,d]\!] CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) code with all positive signs, let G𝒞1/𝒞2G_{\mathcal{C}_{1}/\mathcal{C}_{2}} be the generator matrix for all coset representatives for 𝒞2\mathcal{C}_{2} in 𝒞1\mathcal{C}_{1} (note that the choice of coset representatives is not unique). The canonical encoding map e:𝔽2k𝒱(𝒮)e:\mathbb{F}_{2}^{k}\to\mathcal{V}(\mathcal{S}) is given by e(|𝜶L)1|𝒞2|𝒙𝒞2|𝜶G𝒞1/𝒞2𝒙e(|{\bm{\alpha}}\rangle_{L})\coloneqq\frac{1}{\sqrt{|\mathcal{C}_{2}|}}\sum_{\bm{x}\in\mathcal{C}_{2}}|{\bm{\alpha}G_{\mathcal{C}_{1}/\mathcal{C}_{2}}\oplus\bm{x}}\rangle. Note that the signs of stabilizers change the fixed subspace by changing the eigenspaces that enter into the intersection. Thus, the encoding map needs to include information about nontrivial signs.

{𝒛𝒞1|ϵ𝒛=1}\mathcal{B}\coloneqq\{\bm{z}\in\mathcal{C}_{1}^{\perp}|\epsilon_{\bm{z}}=1\}𝒞1\mathcal{C}_{1}^{\perp}𝒟{𝒙𝒞2|ϵ𝒙=1}\mathcal{D}\coloneqq\{\bm{x}\in\mathcal{C}_{2}|\epsilon_{\bm{x}}=1\}𝒞2\mathcal{C}_{2}

We capture sign information through character vectors 𝒚𝔽2n/𝒞1,𝒓𝔽2n/𝒞2\bm{y}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{1},\bm{r}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp} (note that the choice of coset representatives is not unique) defined for ZZ-stabilizers and XX-stabilizers respectively by

=𝒞1𝒚,equivalently, =𝒞1,𝒚,\mathcal{B}=\mathcal{C}_{1}^{\perp}\cap\bm{y}^{\perp},\text{equivalently, }\mathcal{B}^{\perp}=\langle\mathcal{C}_{1},\bm{y}\rangle, (34)

and

𝒟=𝒞2𝒓,equivalently, D=𝒞2,𝒓.\mathcal{D}=\mathcal{C}_{2}\cap\bm{r}^{\perp},\text{equivalently, }D^{\perp}=\langle\mathcal{C}_{2}^{\perp},\bm{r}\rangle. (35)

Then, for ϵ(𝒂,𝟎)ϵ(𝟎,𝒃)E(𝒂,𝟎)E(𝟎,𝒃)S\epsilon_{(\bm{a},\bm{0})}\epsilon_{(\bm{0},\bm{b})}E\left(\bm{a},\bm{0}\right)E\left(\bm{0},\bm{b}\right)\in S, we have ϵ(𝒂,𝟎)=(1)𝒂𝒓T\epsilon_{(\bm{a},\bm{0})}=(-1)^{\bm{a}\bm{r}^{T}} and ϵ(𝟎,𝒃)=(1)𝒃𝒚T\epsilon_{(\bm{0},\bm{b})}=(-1)^{\bm{b}\bm{y}^{T}}. In Example 3, we may choose the character vectors 𝒓=𝟎\bm{r}=\bm{0} (character vector of XX-stabilizers) and 𝒚=[1,0,0]\bm{y}=[1,0,0] (character vector of ZZ-stabilizers).

The generalized encoding map ge:|𝜶L𝔽2k|𝜶¯𝒱(𝒮)g_{e}:|{\bm{\alpha}}\rangle_{L}\in\mathbb{F}_{2}^{k}\to|{\overline{\bm{\alpha}}}\rangle\in\mathcal{V}(\mathcal{S}) is defined by

|𝜶¯1|𝒞2|𝒙𝒞2(1)𝒙𝒓T|𝜶G𝒞1/𝒞2𝒙𝒚.|{\overline{\bm{\alpha}}}\rangle\coloneqq\frac{1}{\sqrt{|\mathcal{C}_{2}|}}\sum_{\bm{x}\in\mathcal{C}_{2}}(-1)^{\bm{x}\bm{r}^{T}}|{\bm{\alpha}G_{\mathcal{C}_{1}/\mathcal{C}_{2}}\oplus\bm{x}\oplus\bm{y}}\rangle. (36)

To verify that the image of the general encoding map geg_{e} is in 𝒱(𝒮)\mathcal{V}(\mathcal{S}), we show that for ϵ(𝒂,𝟎)ϵ(𝟎,𝒃)E(𝒂,𝟎)E(𝟎,𝒃)𝒮\epsilon_{(\bm{a},\bm{0})}\epsilon_{(\bm{0},\bm{b})}E\left(\bm{a},\bm{0}\right)E\left(\bm{0},\bm{b}\right)\in\mathcal{S} (that is 𝒂𝒞2\bm{a}\in\mathcal{C}_{2}, ϵ(𝒂,𝟎)=(1)𝒂𝒓T\epsilon_{(\bm{a},\bm{0})}=(-1)^{\bm{a}\bm{r}^{T}}, 𝒃𝒞1\bm{b}\in\mathcal{C}_{1}^{\perp}, and ϵ(𝟎,𝒃)=(1)𝒃𝒚T\epsilon_{(\bm{0},\bm{b})}=(-1)^{\bm{b}\bm{y}^{T}}),

ϵ(𝒂,𝟎)ϵ(𝟎,𝒃)E(𝒂,𝟎)E(𝟎,𝒃)|𝜶¯\displaystyle\epsilon_{(\bm{a},\bm{0})}\epsilon_{(\bm{0},\bm{b})}E\left(\bm{a},\bm{0}\right)E\left(\bm{0},\bm{b}\right)|{\overline{\bm{\alpha}}}\rangle
=1|𝒞2|𝒙𝒞2(ϵ(𝒂,𝟎)(1)𝒙𝒓Tϵ(𝟎,𝒃)(1)𝒃(𝜶G𝒞1/𝒞2𝒙𝒚)T|𝜶G𝒞1/𝒞2𝒂𝒙𝒚)\displaystyle=\frac{1}{\sqrt{|\mathcal{C}_{2}|}}\sum_{\bm{x}\in\mathcal{C}_{2}}\Big{(}\epsilon_{(\bm{a},\bm{0})}(-1)^{\bm{x}\bm{r}^{T}}\epsilon_{(\bm{0},\bm{b})}(-1)^{\bm{b}(\bm{\alpha}G_{\mathcal{C}_{1}/\mathcal{C}_{2}}\oplus\bm{x}\oplus\bm{y})^{T}}|{\bm{\alpha}G_{\mathcal{C}_{1}/\mathcal{C}_{2}}\oplus\bm{a}\oplus\bm{x}\oplus\bm{y}}\rangle\Big{)}
=1|𝒞2|𝒙𝒞2(1)(𝒂𝒙)𝒓T|𝜶G𝒞1/𝒞2𝒂𝒙𝒚\displaystyle=\frac{1}{\sqrt{|\mathcal{C}_{2}|}}\sum_{\bm{x}\in\mathcal{C}_{2}}(-1)^{(\bm{a}\oplus\bm{x})\bm{r}^{T}}|{\bm{\alpha}G_{\mathcal{C}_{1}/\mathcal{C}_{2}}\oplus\bm{a}\oplus\bm{x}\oplus\bm{y}}\rangle
=|𝜶¯.\displaystyle=|{\overline{\bm{\alpha}}}\rangle. (37)

2.8 General Logical Pauli Operators for CSS codes

Given the choice of G𝒞1/𝒞2G_{\mathcal{C}_{1}/\mathcal{C}_{2}}, there exists a unique set of vectors {𝜸𝟏,,𝜸𝒌𝒞2:G𝒞1/𝒞2𝜸𝒊=𝒆𝒊 for all i=1,,k}\{\bm{\gamma_{1}},\cdots,\bm{\gamma_{k}}\in\mathcal{C}_{2}^{\perp}:G_{\mathcal{C}_{1}/\mathcal{C}_{2}}\bm{\gamma_{i}}=\bm{e_{i}}\text{ for all }i=1,\dots,k\}, where {𝒆𝒊}i=1,,k\{\bm{e_{i}}\}_{i=1,\dots,k} is the standard basis of 𝔽2k\mathbb{F}_{2}^{k}. If 𝜸𝒊\bm{\gamma_{i}} is the ii-the row of generator matrix G𝒞2/𝒞1G_{\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}, then

G𝒞1/𝒞2G𝒞2/𝒞1T=Ik.G_{\mathcal{C}_{1}/\mathcal{C}_{2}}G_{\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}^{T}=I_{k}. (38)

Assume we have

G𝒞1/𝒞2=[𝒘𝟏𝒘𝟐𝒘𝒌],G𝒞2/𝒞1=[𝜸𝟏𝜸𝟐𝜸𝒌].\displaystyle G_{\mathcal{C}_{1}/\mathcal{C}_{2}}=\left[\begin{array}[]{c}\bm{w_{1}}\\ \bm{w_{2}}\\ \vdots\\ \bm{w_{k}}\end{array}\right],\leavevmode\nobreak\ G_{\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}=\left[\begin{array}[]{c}\bm{\gamma_{1}}\\ \bm{\gamma_{2}}\\ \vdots\\ \bm{\gamma_{k}}\end{array}\right]. (47)

Thus, we have for i=1,,ki=1,\dots,k

E(𝒘𝒊,𝟎)|𝜶¯\displaystyle E(\bm{w_{i}},\bm{0})|{\overline{\bm{\alpha}}}\rangle
=1|𝒞2|𝒙𝒞2(1)𝒙𝒓T|𝜶G𝒞1/𝒞2𝒘𝒊𝒙𝒚\displaystyle=\frac{1}{\sqrt{|\mathcal{C}_{2}|}}\sum_{\bm{x}\in\mathcal{C}_{2}}(-1)^{\bm{x}\bm{r}^{T}}|{\bm{\alpha}G_{\mathcal{C}_{1}/\mathcal{C}_{2}}\oplus\bm{w_{i}}\oplus\bm{x}\oplus\bm{y}}\rangle
=1|𝒞2|𝒙𝒞2(1)𝒙𝒓T|(XiL𝜶)G𝒞1/𝒞2𝒙𝒚\displaystyle=\frac{1}{\sqrt{|\mathcal{C}_{2}|}}\sum_{\bm{x}\in\mathcal{C}_{2}}(-1)^{\bm{x}\bm{r}^{T}}|{(X_{i}^{L}\bm{\alpha})G_{\mathcal{C}_{1}/\mathcal{C}_{2}}\oplus\bm{x}\oplus\bm{y}}\rangle
=X¯i|𝜶¯,\displaystyle=\bar{X}_{i}|{\overline{\bm{\alpha}}}\rangle, (48)

and

(1)𝜸𝒊𝒚TE(𝟎,𝜸𝒊)|𝜶¯\displaystyle(-1)^{\bm{\gamma_{i}}\bm{y}^{T}}E(\bm{0},\bm{\gamma_{i}})|{\overline{\bm{\alpha}}}\rangle
=1|𝒞2|(𝒙𝒞2(1)𝒙𝒓T𝜸𝒊𝒚T𝜸𝒊(𝜶G𝒞1/𝒞2𝒙𝒚)T\displaystyle=\frac{1}{\sqrt{|\mathcal{C}_{2}|}}\Big{(}\sum_{\bm{x}\in\mathcal{C}_{2}}(-1)^{{\bm{x}\bm{r}^{T}}\oplus{\bm{\gamma_{i}}\bm{y}^{T}}\oplus{\bm{\gamma_{i}}(\bm{\alpha}G_{\mathcal{C}_{1}/\mathcal{C}_{2}}\oplus\bm{x}\oplus\bm{y})^{T}}}
|𝜶G𝒞1/𝒞2𝒙𝒚)\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ |{\bm{\alpha}G_{\mathcal{C}_{1}/\mathcal{C}_{2}}\oplus\bm{x}\oplus\bm{y}}\rangle\Big{)}
=1|𝒞2|𝒙𝒞2(1)𝒙𝒓T(1)𝜶𝒆𝒊T|𝒗G𝒞1/𝒞2𝒙𝒚\displaystyle=\frac{1}{\sqrt{|\mathcal{C}_{2}|}}\sum_{\bm{x}\in\mathcal{C}_{2}}(-1)^{\bm{x}\bm{r}^{T}}(-1)^{\bm{\alpha}\bm{e_{i}}^{T}}|{\bm{v}G_{\mathcal{C}_{1}/\mathcal{C}_{2}}\oplus\bm{x}\oplus\bm{y}}\rangle
=Z¯i|𝜶¯,\displaystyle=\bar{Z}_{i}|{\overline{\bm{\alpha}}}\rangle, (49)

where the second to last step follows from (38). Thus we can choose

X¯i=E(𝒘𝒊,𝟎) and Z¯i=ϵ(𝟎,𝜸𝒊)E(𝟎,𝜸𝒊),\bar{X}_{i}=E(\bm{w_{i}},\bm{0})\text{ and }\bar{Z}_{i}=\epsilon_{(\bm{0},\bm{\gamma_{i}})}E(\bm{0},\bm{\gamma_{i}}), (50)

where 𝒘𝒊,𝜸𝒊\bm{w_{i}},\bm{\gamma_{i}} are the ii-th rows of the above coset generator matrices G𝒞1/𝒞2G_{\mathcal{C}_{1}/\mathcal{C}_{2}}, G𝒞2/𝒞1G_{\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}} respectively.

Remark 2.

Applying appropriate Pauli operators takes care of different signs in the stabilizer group and changes the sign of logical Pauli operators. Although the sign for a single logical Pauli operator is not observable, a general logical operator is a linear combination of logical Pauli operators, which may bring the global sign into some local phase.

Example 2 (The basis state and logical Pauli operators of the [[4,2,2]][\![4,2,2]\!] code).

Consider the CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) code with 𝒞2=𝒞1={𝟎,𝟏}\mathcal{C}_{2}=\mathcal{C}_{1}^{\perp}=\{\bm{0},\bm{1}\}. We may choose the generator matrices of 𝒞1/𝒞2\mathcal{C}_{1}/\mathcal{C}_{2} and 𝒞2/𝒞1\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp} as

G𝒞1/𝒞2=[01100011],G𝒞2/𝒞1=[00110110].\displaystyle G_{\mathcal{C}_{1}/\mathcal{C}_{2}}=\begin{bmatrix}0&1&1&0\\ 0&0&1&1\end{bmatrix},\leavevmode\nobreak\ G_{\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}=\begin{bmatrix}0&0&1&1\\ 0&1&1&0\end{bmatrix}. (51)

The encoded basis states and logical Pauli operators for two choices of the signs are given below. If 𝒮=X4,Z4\mathcal{S}=\langle X^{\otimes 4},Z^{\otimes 4}\rangle (𝒓=𝒚=𝟎\bm{r}=\bm{y}=\bm{0}), we have

|00¯\displaystyle|{\overline{00}}\rangle =12(|0000+|1111),\displaystyle=\frac{1}{\sqrt{2}}\left(|{0000}\rangle+|{1111}\rangle\right),
|01¯\displaystyle|{\overline{01}}\rangle =12(|0011+|1100),\displaystyle=\frac{1}{\sqrt{2}}\left(|{0011}\rangle+|{1100}\rangle\right),
|10¯\displaystyle|{\overline{10}}\rangle =12(|0110+|1001),\displaystyle=\frac{1}{\sqrt{2}}\left(|{0110}\rangle+|{1001}\rangle\right),
|11¯\displaystyle|{\overline{11}}\rangle =12(|0101+|1010),\displaystyle=\frac{1}{\sqrt{2}}\left(|{0101}\rangle+|{1010}\rangle\right),
X¯1\displaystyle\bar{X}_{1} =X2X3,X¯2=X3X4,\displaystyle=X_{2}X_{3},\leavevmode\nobreak\ \bar{X}_{2}=X_{3}X_{4},\leavevmode\nobreak\
Z¯1\displaystyle\bar{Z}_{1} =Z3Z4,Z¯2=Z2Z3.\displaystyle=Z_{3}Z_{4},\leavevmode\nobreak\ \leavevmode\nobreak\ \bar{Z}_{2}=Z_{2}Z_{3}.

When 𝒮=X4,Z4\mathcal{S^{\prime}}=\langle X^{\otimes 4},-Z^{\otimes 4}\rangle (𝒓=𝟎\bm{r}^{\prime}=\bm{0}, 𝒚=[0,0,0,1]\bm{y}^{\prime}=[0,0,0,1]), we have

|00¯\displaystyle|{\overline{00}}\rangle =12(|0001+|1110),\displaystyle=\frac{1}{\sqrt{2}}\left(|{0001}\rangle+|{1110}\rangle\right),
|01¯\displaystyle|{\overline{01}}\rangle =12(|0010+|1101),\displaystyle=\frac{1}{\sqrt{2}}\left(|{0010}\rangle+|{1101}\rangle\right),
|10¯\displaystyle|{\overline{10}}\rangle =12(|0111+|1000),\displaystyle=\frac{1}{\sqrt{2}}\left(|{0111}\rangle+|{1000}\rangle\right),
|11¯\displaystyle|{\overline{11}}\rangle =12(|0100+|1011),\displaystyle=\frac{1}{\sqrt{2}}\left(|{0100}\rangle+|{1011}\rangle\right),
X¯1\displaystyle\bar{X}_{1} =X2X3,X¯2=X3X4,\displaystyle=X_{2}X_{3},\leavevmode\nobreak\ \bar{X}_{2}=X_{3}X_{4},
Z¯1\displaystyle\bar{Z}_{1} =Z3Z4,Z¯2=Z2Z3.\displaystyle=-Z_{3}Z_{4},\leavevmode\nobreak\ \leavevmode\nobreak\ \bar{Z}_{2}=Z_{2}Z_{3}.

2.9 Quantum Channels

The quantum states defined in Section 2.3 are called pure states. When a system contains multiple pure states |ψx|{\psi_{x}}\rangle with probabilities pxp_{x}, the ensemble {px,|ψx}\{p_{x},|{\psi_{x}}\rangle\}, is described by a density operator ρ\rho given by

ρxpx|ψxψx|N×N.\rho\coloneqq\sum_{x}p_{x}|{\psi_{x}}\rangle\langle{\psi_{x}}|\in\mathbb{C}^{N\times N}. (52)

Every density operator is Hermitian, positive semi-definite, with unit trace. Conversely, any operator with these three properties can be written in the form (52). Every ensemble determines a unique density operator but a density operator can describe different ensembles.

Suppose we measure the density operator ρ\rho with a finite set of projectors {Πj}j\{\Pi_{j}\}_{j} forming a resolution of the identity. If the initial state in the ensemble is |ψx|{\psi_{x}}\rangle, then we observe the outcome jj with probability p(j|x)=ψx|Πj|ψx=Tr(Πj|ψxψx|)p(j|x)=\langle{\psi_{x}}|\Pi_{j}|{\psi_{x}}\rangle=\mathrm{Tr}(\Pi_{j}|{\psi_{x}}\rangle\langle{\psi_{x}}|) and obtain the reduced state Πj|ψxp(j|x)\frac{\Pi_{j}|{\psi_{x}}\rangle}{\sqrt{p(j|x)}}. From the perspective of density operators, we observe the outcome jj with probability pj=xpxp(j|x)=Tr(Πjρ)p_{j}=\sum_{x}p_{x}p(j|x)=\mathrm{Tr}(\Pi_{j}\rho) and the density operator evolves to be ΠjρΠjpj\frac{\Pi_{j}\rho\Pi_{j}}{p_{j}}. Thus, after measurement, we have a ensemble of ensembles described by a new density operator ρ\rho^{\prime} given by [40]

ρ=jpjΠjρΠjpj=jΠjρΠj.\rho^{\prime}=\sum_{j}p_{j}\frac{\Pi_{j}\rho\Pi_{j}}{p_{j}}=\sum_{j}\Pi_{j}\rho\Pi_{j}. (53)

A quantum channel is linear, completely-positive, and trace-preserving, and can be characterized by a Kraus representation [32, 40]. A map Φ:𝒢\Phi:\mathcal{H}\to\mathcal{G} is linear, completely-positive, and trace-preserving if and only if there exists a finite set of operators {Bk}k\{B_{k}\}_{k} (from \mathcal{H} to 𝒢\mathcal{G}) such that for any ρ\rho\in\mathcal{H}

Φ(ρ)=kBkρBk.\Phi(\rho)=\sum_{k}B_{k}\rho B_{k}^{\dagger}. (54)

The operators {Bk}k\{B_{k}\}_{k} are called Kraus operators and satisfy

kBkBk=I2dim()\sum_{k}B_{k}^{\dagger}B_{k}=I_{2^{\dim(\mathcal{H})}} (55)

and

|{Bk}k|dim()dim(𝒢).|\{B_{k}\}_{k}|\leq\dim(\mathcal{H})\dim(\mathcal{G}). (56)

Note that the Kraus representation of a quantum channel is not unique.

3 Generator Coefficients

Starting from the general encoding map and logical Pauli operators of CSS codes introduced in Section 2.7, we study gates interacting with these codes. We consider quantum gates for which the Pauli expansion consists only of tensor products of Pauli ZZ’s (or Pauli XX’s). We partition 𝔽2n\mathbb{F}_{2}^{n} into cosets of the ZZ-stabilizers (or XX-stabilizers), and define generator coefficients that take advantage of the structure of stabilizer group. The framework of generator coefficients provides insight into the average logical channel, the necessary and sufficient conditions for a CSS code to be invariant under a particular gate, and the induced logical operator. We extend the framework of generator coefficients to general stabilizer codes in Appendix B.

Consider a 2n×2n2^{n}\times 2^{n} unitary matrix (quantum gate) UZ=𝒗𝔽2nf(𝒗)E(𝟎,𝒗)U_{Z}=\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}f(\bm{v})E(\bm{0},\bm{v}), where f(𝒗)f(\bm{v})\in\mathbb{C}. Since

I\displaystyle I =UZUZ\displaystyle=U_{Z}U_{Z}^{\dagger}
=(𝒗𝔽2nf(𝒗)E(𝟎,𝒗))(𝒗𝔽2nf(𝒗)¯E(𝟎,𝒗))\displaystyle=\left(\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}f(\bm{v})E(\bm{0},\bm{v})\right)\left(\sum_{\bm{v^{\prime}}\in\mathbb{F}_{2}^{n}}\overline{f(\bm{v^{\prime}})}E(\bm{0},\bm{v^{\prime}})\right)
=𝒘𝔽2n(𝒗𝔽2nf(𝒗)f(𝒗𝒘)¯)E(0,𝒘),\displaystyle=\sum_{\bm{w}\in\mathbb{F}_{2}^{n}}\left(\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}f(\bm{v})\overline{f(\bm{v}\oplus\bm{w})}\right)E(0,\bm{w}), (57)

we have

𝒗𝔽2nf(𝒗)f(𝒗𝒘)¯={1, if 𝒘=𝟎,0, if 𝒘𝟎.\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}f(\bm{v})\overline{f(\bm{v}\oplus\bm{w})}=\left\{\begin{array}[]{lc}1,&\text{ if }\bm{w}=\bm{0},\\ 0,&\text{ if }\bm{w}\neq\bm{0}.\end{array}\right. (58)

We define the generator coefficients for UZU_{Z} acting on a given CSS code as follows.

Definition 3 (Generator Coefficients for UZU_{Z}).

Let CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) be an [[n,k1k2,d]]\left[\left[n,k_{1}-k_{2},d\right]\right] stabilizer code defined by the stabilizer group 𝒮={ϵ(𝐚,𝟎)ϵ(𝟎,𝐛)E(𝐚,𝟎)E(𝟎,𝐛):𝐚𝒞2,𝐛𝒞1}\mathcal{S}=\{\epsilon_{(\bm{a},\bm{0})}\epsilon_{(\bm{0},\bm{b})}E\left(\bm{a},\bm{0}\right)E\left(\bm{0},\bm{b}\right):\bm{a}\in\mathcal{C}_{2},\bm{b}\in\mathcal{C}_{1}^{\perp}\} and the character vector 𝐲𝔽2n/𝒞1\bm{y}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{1} for ZZ-stabilizers. Let 𝛍𝔽2n/𝒞2\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp} be any XX-syndrome and 𝛄𝒞2/𝒞1\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp} be any ZZ-logical. Then, for any pair 𝛍\bm{\mu}, 𝛄\bm{\gamma}, we define the generator coefficient A𝛍,𝛄A_{\bm{\mu},\bm{\gamma}} corresponding to the diagonal unitary gate UZ=𝐯𝔽2nf(𝐯)E(𝟎,𝐯)U_{Z}=\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}f(\bm{v})E(\bm{0},\bm{v}) by

A𝝁,𝜸𝒛𝒞1+𝝁+𝜸ϵ(𝟎,𝒛)f(𝒛),A_{\bm{\mu},\bm{\gamma}}\coloneqq\sum_{\bm{z}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{z})}f(\bm{z}), (59)

where ϵ(𝟎,𝐳)=(1)𝐳𝐲T\epsilon_{(\bm{0},\bm{z})}=(-1)^{\bm{z}\bm{y}^{T}}.

Note that given a CSS code with not all positive signs, the character vector 𝒚\bm{y} is unique up to an element of 𝒞1\mathcal{C}_{1}. A different choice of the coset representatives of 𝒞1\mathcal{C}_{1} in 𝔽2n\mathbb{F}_{2}^{n} only changes the signs of A𝝁,𝜸A_{\bm{\mu},\bm{\gamma}}, and leads to a global phase in the logical quantum channel induced by UZU_{Z}, which is given in Section 4.

By partitioning 𝔽2n\mathbb{F}_{2}^{n} into cosets of 𝒞1\mathcal{C}_{1}^{\perp}, we gain insight into the interaction of syndromes and logicals. The code projector is Π𝒮=Π𝒮XΠ𝒮Z\Pi_{\mathcal{S}}=\Pi_{\mathcal{S}_{X}}\Pi_{\mathcal{S}_{Z}}, and we have

Π𝒮ZUZ\displaystyle\Pi_{\mathcal{S}_{Z}}U_{Z} =12nk1𝒃𝒞1ϵ(𝟎,𝒃)E(𝟎,𝒃)𝒗𝔽2nf(𝒗)E(𝟎,𝒗)=12nk1𝒗𝔽2nf(𝒗)𝒃𝒞1ϵ(𝟎,𝒃)E(𝟎,𝒃𝒗)\displaystyle=\frac{1}{2^{n-k_{1}}}\sum_{\bm{b}\in\mathcal{C}_{1}^{\perp}}\epsilon_{(\bm{0},\bm{b})}E(\bm{0},\bm{b})\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}f(\bm{v})E(\bm{0},\bm{v})=\frac{1}{2^{n-k_{1}}}\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}f(\bm{v})\sum_{\bm{b}\in\mathcal{C}_{1}^{\perp}}\epsilon_{(\bm{0},\bm{b})}E(\bm{0},\bm{b}\oplus\bm{v})
=12nk1𝒗𝔽2nϵ(𝟎,𝒗)f(𝒗)𝒖𝒞1+𝒗ϵ(𝟎,𝒖)E(𝟎,𝒖)=12nk1𝝁𝜸A𝝁,𝜸𝒖𝒞1+𝝁+𝜸ϵ(𝟎,𝒖)E(𝟎,𝒖).\displaystyle=\frac{1}{2^{n-k_{1}}}\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}\epsilon_{(\bm{0},\bm{v})}f(\bm{v})\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{v}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u})=\frac{1}{2^{n-k_{1}}}\sum_{\bm{\mu}}\sum_{\bm{\gamma}}A_{\bm{\mu},\bm{\gamma}}\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u}). (60)

In the above summations, 𝝁𝔽2n/𝒞2\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp} and 𝜸𝒞2/𝒞1\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}, and A𝝁,𝜸A_{\bm{\mu},\bm{\gamma}} is given by (59). We now study the generator coefficients associated with two different types of quantum gate UZU_{Z}.

3.1 Transversal ZZ-Rotations RZ(θ)R_{Z}(\theta)

There are two reasons to study how RZ(θ)(exp(ıθ2Z))nR_{Z}(\theta)\coloneqq\left(\exp\left(-\imath\frac{\theta}{2}Z\right)\right)^{\otimes n} =(cosθ2Iısinθ2Z)n=\left(\cos\frac{\theta}{2}I-\imath\sin\frac{\theta}{2}Z\right)^{\otimes n} acts on the states within a quantum error-correcting code. The first is that when θ\theta is not a multiple of π2\frac{\pi}{2}, RZ(θ)R_{Z}(\theta) may realize a non-Clifford logical gate, and the second is that coherent noise can be modeled as {RZ(θ)}θ(0,2π)\{R_{Z}(\theta)\}_{\theta\in(0,2\pi)}. The Pauli expansion of RZ(θ)R_{Z}(\theta) is

𝒗𝔽2n(cosθ2)nwH(𝒗)(ısinθ2)wH(𝒗)E(𝟎,𝒗).\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}\left(\cos\frac{\theta}{2}\right)^{n-w_{H}(\bm{v})}\left(-\imath\sin\frac{\theta}{2}\right)^{w_{H}(\bm{v})}E(\bm{0},\bm{v}). (61)

As f(𝒗)=(cosθ2)nwH(𝒗)(ısinθ2)wH(𝒗)f(\bm{v})=\left(\cos\frac{\theta}{2}\right)^{n-w_{H}(\bm{v})}\left(-\imath\sin\frac{\theta}{2}\right)^{w_{H}(\bm{v})}, we substitute it in (59), and obtain the generator coefficients of RZ(θ)R_{Z}(\theta),

A𝝁,𝜸(θ)\displaystyle A_{\bm{\mu},\bm{\gamma}}(\theta)\coloneqq
𝒛𝒞1+𝝁+𝜸ϵ(𝟎,𝒛)(cosθ2)nwH(𝒛)(ısinθ2)wH(𝒛).\displaystyle\sum_{\bm{z}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{z})}\left(\cos\frac{\theta}{2}\right)^{n-w_{H}(\bm{z})}\left(-\imath\sin\frac{\theta}{2}\right)^{w_{H}(\bm{z})}. (62)

We now compute the generator coefficients for the [[7,1,3]][\![7,1,3]\!] Steane code.

Example 1 (Generator Coefficients for RZ(θ)R_{Z}(\theta) applied to the [[7,1,3]][\![7,1,3]\!] Steane code).

The Steane code is a perfect CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) code with all positive signs and generator matrix

G𝒮=[HH],\displaystyle G_{\mathcal{S}}=\left[\begin{array}[]{c|c}H&\\ \hline\cr&H\\ \end{array}\right], (65)

where HH is the parity-check matrix of the Hamming code:

H=[111100011001101010101].\displaystyle H=\left[\begin{array}[]{ccccccc}1&1&1&1&0&0&0\\ 1&1&0&0&1&1&0\\ 1&0&1&0&1&0&1\\ \end{array}\right]. (69)

Then, we have C1/C2=C2/C1={𝟎,𝟏}C_{1}/C_{2}=C_{2}^{\perp}/C_{1}^{\perp}=\{\bm{0},\bm{1}\}, where 𝟎,𝟏\bm{0},\bm{1} are the vectors of all ones and all zeros respectively. If we compute the generator coefficients directly from (3.1), then we need the weight enumerators of all cosets of 𝒞1\mathcal{C}_{1}^{\perp}. We may simplify these calculations using the MacWilliams Identities. Consider for example the case 𝝁=𝟎\bm{\mu}=\bm{0} and 𝜸=𝟏\bm{\gamma}=\bm{1}, where we may write

A𝟎,𝟏(θ)\displaystyle A_{\bm{0},\bm{1}}(\theta)
=𝒛𝒞1+𝟏(cosθ2)7wH(𝒛)(ısinθ2)wH(𝒛)\displaystyle=\sum_{\bm{z}\in\mathcal{C}_{1}^{\perp}+\bm{1}}\left(\cos\frac{\theta}{2}\right)^{7-w_{H}(\bm{z})}\left(-\imath\sin\frac{\theta}{2}\right)^{w_{H}(\bm{z})}
=Pθ[𝒞1,𝟏]Pθ[𝒞1],\displaystyle=P_{\theta}[\langle\mathcal{C}_{1}^{\perp},\bm{1}\rangle]-P_{\theta}[\mathcal{C}_{1}^{\perp}], (70)

where Pθ[𝒞]P_{\theta}[\mathcal{C}] is defined in (4). We apply the MacWilliams Identities to Pθ[𝒞1]P_{\theta}[\mathcal{C}_{1}^{\perp}] to obtain

Pθ[𝒞1]\displaystyle P_{\theta}[\mathcal{C}_{1}^{\perp}] =1|𝒞1|P𝒞1(cosθ2ısinθ2,cosθ2+ısinθ2)\displaystyle=\frac{1}{|\mathcal{C}_{1}|}P_{\mathcal{C}_{1}}\left(\cos\frac{\theta}{2}-\imath\sin\frac{\theta}{2},\cos\frac{\theta}{2}+\imath\sin\frac{\theta}{2}\right)
=1|𝒞1|𝒛𝒞1(eıθ2)n2wH(𝒛).\displaystyle=\frac{1}{|\mathcal{C}_{1}|}\sum_{\bm{z}\in\mathcal{C}_{1}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}. (71)

We simplify the term P[𝒞1,𝟏]P[\langle\mathcal{C}_{1}^{\perp},\bm{1}\rangle] in the same way,

Pθ[𝒞1,𝟏]\displaystyle P_{\theta}[\langle\mathcal{C}_{1}^{\perp},\bm{1}\rangle] =1|𝒞1,𝟏|𝒛𝒞1,𝟏(eıθ2)n2wH(𝒛)\displaystyle=\frac{1}{|\langle\mathcal{C}_{1}^{\perp},\bm{1}\rangle|}\sum_{\bm{z}\in\langle\mathcal{C}_{1}^{\perp},\bm{1}\rangle^{\perp}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}
=2|𝒞1|𝒛𝒞1𝟏(eıθ2)n2wH(𝒛).\displaystyle=\frac{2}{|\mathcal{C}_{1}|}\sum_{\bm{z}\in\mathcal{C}_{1}\cap\bm{1}^{\perp}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}. (72)

It follows from (1), (71), and (72) that

A𝟎,𝟏(θ)\displaystyle A_{\bm{0},\bm{1}}(\theta) =1|𝒞1|𝒛𝒞1(1)𝟏𝒛T(eıθ2)72wH(𝒛)\displaystyle=\frac{1}{|\mathcal{C}_{1}|}\sum_{\bm{z}\in\mathcal{C}_{1}}(-1)^{\bm{1}\cdot\bm{z}^{T}}(e^{-\imath\frac{\theta}{2}})^{7-2w_{H}(\bm{z})} (73)
=18(ısin7θ2+7ısinθ2),\displaystyle=\frac{1}{8}\left(-\imath\sin\frac{7\theta}{2}+7\imath\sin\frac{\theta}{2}\right), (74)

where (74) is obtained from (73) by substituting in the weight enumerator of 𝒞1\mathcal{C}_{1}

PC1(x,y)=x7+7x4y3+7x3y4+y7.\displaystyle P_{C_{1}}(x,y)=x^{7}+7x^{4}y^{3}+7x^{3}y^{4}+y^{7}.

We compute all the generator coefficients for the Steane code in Table 1. We return to this data in Section 4.1 to provide more insight into the logical channel determined by RZ(θ)R_{Z}(\theta), and in Section 4.2 to calculate the probabilities of observing different syndromes.

Table 1: Generator coefficients A𝝁,𝜸(θ)A_{\bm{\mu},\bm{\gamma}}(\theta) for RZ(θ)R_{Z}(\theta) applied to the Steane code. Each column corresponds to a ZZ-logical. The first row corresponds to the trivial XX-syndromes, and second row represents the seven non-trivial syndromes (they have equivalent behaviour due to symmetry).
𝝁\bm{\mu} 𝜸=𝟎\bm{\gamma}=\bm{0} 𝜸=𝟏\bm{\gamma}=\bm{1}
=𝟎=\bm{0} 18(cos7θ2+7cosθ2)\frac{1}{8}\left(\cos\frac{7\theta}{2}+7\cos\frac{\theta}{2}\right) ı8(7sinθ2sin7θ2)\frac{\imath}{8}\left(7\sin\frac{\theta}{2}-\sin\frac{7\theta}{2}\right)
𝟎\neq\bm{0} ı8(sin7θ2+sinθ2)-\frac{\imath}{8}\left(\sin\frac{7\theta}{2}+\sin\frac{\theta}{2}\right) 18(cos7θ2cosθ2)\frac{1}{8}\left(\cos\frac{7\theta}{2}-\cos\frac{\theta}{2}\right)

Before introducing the Kraus decomposition of RZ(θ)R_{Z}(\theta) acting on a CSS code, we provide an alternative definition of generator coefficients which simplifies calculations. We first write A𝝁,𝜸(θ)A_{\bm{\mu,\bm{\gamma}}(\theta)} as a linear combination of weight enumerators, then apply the MacWilliams Identities.

Lemma 4 (Simplified Definition of Generator Coefficients).

Consider a CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) code, where 𝐲\bm{y} is the character vector for the ZZ-stabilizers (ϵ(𝟎,𝐳)=(1)𝐳𝐲T)\left(\epsilon_{(\bm{0},\bm{z})}=(-1)^{\bm{z}\bm{y}^{T}}\right). Then, the generator coefficients A𝛍,𝛄(θ)A_{\bm{\mu},\bm{\gamma}}(\theta) defined in (3.1) can be written as

A𝝁,𝜸(θ)\displaystyle A_{\bm{\mu},\bm{\gamma}}(\theta)
=1|𝒞1|𝒛𝒞1+𝒚(1)(𝝁𝜸)(𝒛𝒚)T(eıθ2)n2wH(𝒛).\displaystyle=\frac{1}{|\mathcal{C}_{1}|}\sum_{\bm{z}\in\mathcal{C}_{1}+\bm{y}}(-1)^{(\bm{\mu}\oplus\bm{\gamma})(\bm{z}\oplus\bm{y})^{T}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}. (75)
Remark 5.

The original definition (3.1) requires a sum over the weights of every coset 𝒞1\mathcal{C}_{1}^{\perp}. The alternative definition (4) requires a sum over a single coset 𝒞1+𝒚\mathcal{C}_{1}+\bm{y}, where the syndrome 𝝁\bm{\mu} and logical 𝜸\bm{\gamma} determine the hyperplane that specifies the signs in the sum.

Proof.

See Appendix C.1. ∎

3.2 Quadratic Form Diagonal Gates

Rengaswamy et al. [36] considered diagonal unitaries of the form

τR(l)=𝒗𝔽2nξl𝒗R𝒗Tmod2l|𝒗𝒗|,\tau_{R}^{(l)}=\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}\xi_{l}^{\bm{v}R\bm{v}^{T}\bmod{2^{l}}}|{\bm{v}}\rangle\langle{\bm{v}}|, (76)

where l1l\geq 1 is an integer, ξl=eıπ2l1\xi_{l}=e^{\imath\frac{\pi}{2^{l-1}}}, and RR is an n×nn\times n symmetric matrix with entries in 2l\mathbb{Z}_{2^{l}}, the ring of integer modulo 2l2^{l}. Note that the exponent vRvT2lvRv^{T}\in\mathbb{Z}_{2^{l}}. When l=2l=2 and RR is binary, we obtain the diagonal Clifford unitaries. QFD gates defined by (76) include all 11-local and 22-local diagonal unitaries in the Clifford hierarchy, and they contain RZ(θ)R_{Z}(\theta) for θ=2π2l\theta=\frac{2\pi}{2^{l}}, where l1l\geq 1 is an integer.

Recall that N×NN\times N Pauli matrices form an orthonormal basis for unitaries of size NN with respect to the normalized Hilbert-Schmidt inner product A,BTr(AB)/N\langle A,B\rangle\coloneqq\mathrm{Tr}(A^{\dagger}B)/N. Hence,

|𝒗𝒗|\displaystyle|{\bm{v}}\rangle\langle{\bm{v}}| =𝒂,𝒃𝔽2nTr(|𝒗𝒗|E(𝒂,𝒃))NE(𝒂,𝒃)\displaystyle=\sum_{\bm{a},\bm{b}\in\mathbb{F}_{2}^{n}}\frac{\mathrm{Tr}(|{\bm{v}}\rangle\langle{\bm{v}}|E(\bm{a},\bm{b}))}{N}E(\bm{a},\bm{b})
=12n𝒃𝔽2n(1)𝒃𝒗TE(𝟎,𝒃),\displaystyle=\frac{1}{2^{n}}\sum_{\bm{b}\in\mathbb{F}_{2}^{n}}(-1)^{\bm{b}\bm{v}^{T}}E(\bm{0},\bm{b}), (77)

and the Pauli expansion of a QFD gate becomes

τR(l)\displaystyle\tau_{R}^{(l)} =12n𝒖𝔽2nf(𝒖)E(𝟎,𝒖),\displaystyle=\frac{1}{2^{n}}\sum_{\bm{u}\in\mathbb{F}_{2}^{n}}f(\bm{u})E(\bm{0},\bm{u}), (78)

where

f(𝒖)=𝒗𝔽2nξl𝒗R𝒗Tmod2l(1)𝒖𝒗T.f(\bm{u})=\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}\xi_{l}^{\bm{v}R\bm{v}^{T}\bmod{2^{l}}}(-1)^{\bm{uv}^{T}}. (79)
Example 4.

If n=1,l=3,ξ3=eıπ4,R=[1]n=1,\leavevmode\nobreak\ l=3,\leavevmode\nobreak\ \xi_{3}=e^{\imath\frac{\pi}{4}},\leavevmode\nobreak\ R=[1], then we have f(0)=1+eıπ4f(0)=1+e^{\imath\frac{\pi}{4}}, f(1)=1eıπ4f(1)=1-e^{\imath\frac{\pi}{4}}, and τR(2)=12(1+eıπ4)E(0,0)+12(1eıπ4)E(0,1)=T.\tau_{R}^{(2)}=\frac{1}{2}\left(1+e^{\imath\frac{\pi}{4}}\right)E(0,0)+\frac{1}{2}\left(1-e^{\imath\frac{\pi}{4}}\right)E(0,1)=T.

Example 5.

Consider n=2n=2, and R=[0110]R=\begin{bmatrix}0&1\\ 1&0\end{bmatrix}. If l=2l=2, then ξ2=eıπ2=ı\leavevmode\nobreak\ \xi_{2}=e^{\imath\frac{\pi}{2}}=\imath and τR(2)=CZ12(E(𝟎,𝟎)+E(𝟎,01)+E(𝟎,10)E(𝟎,𝟏)).\tau_{R}^{(2)}=\mathrm{C}Z\coloneqq\frac{1}{2}\left(E(\bm{0},\bm{0})+E(\bm{0},01)+E(\bm{0},10)-E(\bm{0},\bm{1})\right). If l=3l=3, then ξ3=eıπ4\leavevmode\nobreak\ \xi_{3}=e^{\imath\frac{\pi}{4}} and

τR(3)=CP\displaystyle\tau_{R}^{(3)}=\mathrm{C}P 14((3ı)E(𝟎,𝟎)+(1+ı)E(𝟎,01)\displaystyle\coloneqq\frac{1}{4}((3-\imath)E(\bm{0},\bm{0})+(1+\imath)E(\bm{0},01)
+(1+ı)E(𝟎,10)(1+ı)E(𝟎,𝟏)).\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ +(1+\imath)E(\bm{0},10)-(1+\imath)E(\bm{0},\bm{1})). (80)

We substitute (79) in (59), and obtain the generator coefficients for QFD gates

A𝝁,𝜸(R,l)\displaystyle A_{\bm{\mu},\bm{\gamma}}(R,l)\coloneqq
12n𝒛𝒞1+𝝁+𝜸ϵ(𝟎,𝒛)𝒗𝔽2nξl𝒗R𝒗Tmod2l(1)𝒛𝒗T.\displaystyle\frac{1}{2^{n}}\sum_{\bm{z}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{z})}\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}\xi_{l}^{\bm{v}R\bm{v}^{T}\bmod{2^{l}}}(-1)^{\bm{zv}^{T}}. (81)

Let 𝒚𝔽2n/𝒞1\bm{y}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{1} be the character vector (ϵ(𝟎,𝒛)=(1)𝒛𝒚T)\left(\epsilon_{(\bm{0},\bm{z})}=(-1)^{\bm{zy}^{T}}\right). Changing the order of summation, we have

A𝝁,𝜸(R,l)=12n𝒗𝔽2np𝒚(𝒗,𝝁,𝜸)ξl𝒗R𝒗Tmod2l,A_{\bm{\mu},\bm{\gamma}}(R,l)=\frac{1}{2^{n}}\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}p_{\bm{y}}(\bm{v},\bm{\mu},\bm{\gamma})\xi_{l}^{\bm{v}R\bm{v}^{T}\bmod{2^{l}}}, (82)

where

p𝒚(𝒗,𝝁,𝜸)\displaystyle p_{\bm{y}}(\bm{v},\bm{\mu},\bm{\gamma})
=𝒛𝒞1+𝝁+𝜸(1)𝒛𝒚T(1)𝒛𝒗T\displaystyle=\sum_{\bm{z}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}(-1)^{\bm{zy}^{T}}(-1)^{\bm{zv}^{T}}
=(1)(𝝁𝜸)(𝒚𝒗)T𝒖𝒞1(1)𝒖(𝒚𝒗)T\displaystyle=(-1)^{(\bm{\mu}\oplus\bm{\gamma})(\bm{y}\oplus\bm{v})^{T}}\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}}(-1)^{\bm{u}(\bm{y}\oplus\bm{v})^{T}}
={|𝒞1|(1)(𝝁𝜸)(𝒚𝒗)T, if 𝒚𝒗𝒞1,0, otherwise.\displaystyle=\left\{\begin{array}[]{lc}|\mathcal{C}_{1}^{\perp}|(-1)^{(\bm{\mu}\oplus\bm{\gamma})(\bm{y}\oplus\bm{v})^{T}},\text{ if }\bm{y}\oplus\bm{v}\in\mathcal{C}_{1},\\ 0,\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \text{ otherwise.}\end{array}\right. (83)

Substituting (83) in (82), we obtain

A𝝁,𝜸(R,l)\displaystyle A_{\bm{\mu},\bm{\gamma}}(R,l) =1|𝒞1|𝒗𝒞1+𝒚(1)(𝝁𝜸)(𝒚𝒗)Tξl𝒗R𝒗T.\displaystyle=\frac{1}{|\mathcal{C}_{1}|}\sum_{\bm{v}\in\mathcal{C}_{1}+\bm{y}}(-1)^{(\bm{\mu}\oplus\bm{\gamma})(\bm{y}\oplus\bm{v})^{T}}\xi_{l}^{\bm{v}R\bm{v}^{T}}. (84)

When R=InR=I_{n}, we obtain the transversal ZZ-rotation RZ(π2l1)R_{Z}(\frac{\pi}{2^{l-1}}) up to a global phase. We now use (84) to calculate generator coefficients of the [[4,2,2]][\![4,2,2]\!] code.

Table 2: Generator coefficients A𝝁,𝜸(R,l=2)A_{\bm{\mu},\bm{\gamma}}(R,l=2) for CZZ\otimesCZZ applied to the [[4,2,2]][\![4,2,2]\!] code with all positive signs.
XX-syndromes ZZ-logicals 𝜸=𝟎\bm{\gamma}=\bm{0} 𝜸=[0,0,1,1]\bm{\gamma}=[0,0,1,1] 𝜸=[0,1,1,0]\bm{\gamma}=[0,1,1,0] 𝜸=[0,1,0,1]\bm{\gamma}=[0,1,0,1]
𝝁=𝟎\bm{\mu}=\bm{0} 12\frac{1}{2} 12-\frac{1}{2} 12\frac{1}{2} 12\frac{1}{2}
𝝁=[1,0,0,0]\bm{\mu}=[1,0,0,0] 0
Table 3: Generator coefficients A𝝁,𝜸(R,l=3)A_{\bm{\mu},\bm{\gamma}}(R,l=3) of CPP\otimesCPP for [[4,2,2]][\![4,2,2]\!] code with all positive signs.
XX-syndromes ZZ-logicals 𝜸=𝟎\bm{\gamma}=\bm{0} 𝜸=[0,0,1,1]\bm{\gamma}=[0,0,1,1] 𝜸=[0,1,1,0]\bm{\gamma}=[0,1,1,0] 𝜸=[0,1,0,1]\bm{\gamma}=[0,1,0,1]
𝝁=𝟎\bm{\mu}=\bm{0} 14(2+ı)\frac{1}{4}(2+\imath) 14(2+ı)\frac{1}{4}(-2+\imath) ı4-\frac{\imath}{4} ı4-\frac{\imath}{4}
𝝁=[1,0,0,0]\bm{\mu}=[1,0,0,0] 14\frac{1}{4}
Example 2 (Generator Coefficients of CZZ and CPP for the [[4,2,2]][\![4,2,2]\!] code).

The [[4,2,2]][\![4,2,2]\!] code is a CSS code with 𝒞1=𝒞2={𝟎,𝟏}\mathcal{C}_{1}^{\perp}=\mathcal{C}_{2}=\{\bm{0},\bm{1}\}. The ZZ-logical 𝜸[0,0,1,1],[0,1,1,0]\bm{\gamma}\in\langle[0,0,1,1],[0,1,1,0]\rangle and the XX-syndrome 𝝁[1,0,0,0]\bm{\mu}\in\langle[1,0,0,0]\rangle. Assume all the stabilizers have positive signs (the character vector 𝒚=𝟎\bm{y}=\bm{0}). Set

R=[0100100000010010].R=\begin{bmatrix}0&1&0&0\\ 1&0&0&0\\ 0&0&0&1\\ 0&0&1&0\end{bmatrix}. (85)

Setting l=2l=2, we list the generator coefficients for CZ2Z^{\otimes 2} in Table 2. Note that CZZ and CPP shared the same symmetric matrix RR but the level ll is different. Table 3 lists the generator coefficients for CP2P^{\otimes 2}.

4 Average Logical Channel

We investigate the effect of UZU_{Z} acting on a CSS codespace 𝒱(𝒮)\mathcal{V}(\mathcal{S}) by considering the following steps:

  1. 1.

    Choose any initial density operator ρ1\rho_{1} in the CSS codespace 𝒱(𝒮)\mathcal{V}(\mathcal{S}). Then, we have ρ1=Π𝒮ρ1Π𝒮\rho_{1}=\Pi_{\mathcal{S}}\rho_{1}\Pi_{\mathcal{S}}.

  2. 2.

    Apply UZU_{Z} physically. Then the system evolves to

    ρ2=UZρ1UZ=UZΠ𝒮ρ1Π𝒮UZ.\rho_{2}=U_{Z}\rho_{1}U_{Z}^{\dagger}=U_{Z}\Pi_{\mathcal{S}}\rho_{1}\Pi_{\mathcal{S}}U_{Z}^{\dagger}. (86)
  3. 3.

    Measure with XX-stabilizers to obtain the syndrome 𝝁𝔽2n/𝒞2\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}. It follows from (53) that the system evolves to

    ρ3=𝝁𝔽2/𝒞2Π𝒮X(𝝁)ρ2Π𝒮X(𝝁)\displaystyle\rho_{3}=\sum_{\bm{\mu}\in\mathbb{F}_{2}/\mathcal{C}_{2}^{\perp}}\Pi_{\mathcal{S}_{X(\bm{\mu})}}\rho_{2}\Pi_{\mathcal{S}_{X(\bm{\mu})}}
    =𝝁𝔽2/𝒞2(Π𝒮X(𝝁)UZΠ𝒮)ρ1(Π𝒮UZΠ𝒮X(𝝁))\displaystyle=\sum_{\bm{\mu}\in\mathbb{F}_{2}/\mathcal{C}_{2}^{\perp}}\left(\Pi_{\mathcal{S}_{X(\bm{\mu})}}U_{Z}\Pi_{\mathcal{S}}\right)\rho_{1}\left(\Pi_{\mathcal{S}}U_{Z}^{\dagger}\Pi_{\mathcal{S}_{X(\bm{\mu})}}\right) (87)
  4. 4.

    Based on the syndrome 𝝁\bm{\mu}, we apply a Pauli correction to map the state back to 𝒱(𝒮)\mathcal{V}(\mathcal{S}). This correction may introduce some logical operator ϵ(𝟎,𝜸𝝁)E(𝟎,𝜸𝝁)\epsilon_{(\bm{0},\bm{\gamma_{\mu}})}E(\bm{0},\bm{\gamma_{\mu}}). The final state ρ4\rho_{4} is in the CSS codespace.

Generator coefficients help describe the average logical channel resulting from UZU_{Z} acting on a CSS codespace (steps 1-4). We extend our approach to arbitrary stabilizer codes in Appendix B.

4.1 The Kraus Representation

Kraus operators describe the logical channels obtained by averaging the action of UZU_{Z} over density operators in 𝒱(𝒮)\mathcal{V}(\mathcal{S}). Generator coefficient appear as the coefficients in the Pauli expansion of Kraus operators. We use generator coefficients to simplify the term UZΠ𝒮U_{Z}\Pi_{\mathcal{S}} in (86). It follows from (60) and the derivation in Appendix C.2 that

UZΠ𝒮\displaystyle U_{Z}\Pi_{\mathcal{S}} =𝝁𝔽2n/𝒞2Π𝒮X(𝝁)𝜸𝒞2/𝒞1A𝝁,𝜸q(𝝁,𝜸),\displaystyle=\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\Pi_{\mathcal{S}_{X}(\bm{\mu})}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu},\bm{\gamma}}\leavevmode\nobreak\ q(\bm{\mu},\bm{\gamma}), (88)

where Π𝒮X(𝝁)=1|𝒞2|𝒂𝒞2(1)𝒂𝝁Tϵ(𝒂,𝟎)E(𝒂,𝟎)\Pi_{\mathcal{S}_{X}(\bm{\mu})}=\frac{1}{|\mathcal{C}_{2}|}\sum_{\bm{a}\in\mathcal{C}_{2}}(-1)^{\bm{a}\bm{\mu}^{T}}\epsilon_{(\bm{a},\bm{0})}E(\bm{a},\bm{0}) as described in (27), and

q(𝝁,𝜸)12nk1𝒖𝒞1+𝝁+𝜸ϵ(𝟎,𝒖)E(𝟎,𝒖).q(\bm{\mu},\bm{\gamma})\coloneqq\frac{1}{2^{n-k_{1}}}\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u}). (89)

Since the projectors {Π𝒮X(𝝁)}𝝁𝔽2n/𝒞2\{\Pi_{\mathcal{S}_{X}(\bm{\mu})}\}_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}} are pairwise orthogonal, it follows from that for any fixed 𝝁𝟎𝔽2n/𝒞2\bm{\mu_{0}}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}, we have

Π𝒮X(𝝁𝟎)UZΠ𝒮=Π𝒮X(𝝁𝟎)𝜸𝒞2/𝒞1A𝝁𝟎,𝜸q(𝝁𝟎,𝜸).\displaystyle\Pi_{\mathcal{S}_{X(\bm{\mu_{0}})}}U_{Z}\Pi_{\mathcal{S}}=\Pi_{\mathcal{S}_{X}(\bm{\mu_{0}})}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu_{0}},\bm{\gamma}}\leavevmode\nobreak\ q(\bm{\mu_{0}},\bm{\gamma}). (90)

Since ρ1\rho_{1} describes an ensemble of states in the codespace 𝒱(𝒮)\mathcal{V}(\mathcal{S}), it follows from that for fixed 𝜸𝟎𝒞2/𝒞1\bm{\gamma_{0}}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}, we have

q(𝝁𝟎,𝜸𝟎)ρ1q(𝝁𝟎,𝜸𝟎)=Kρ1K,\displaystyle q(\bm{\mu_{0}},\bm{\gamma_{0}})\rho_{1}q(\bm{\mu_{0}},\bm{\gamma_{0}})=K\rho_{1}K, (91)

where Kϵ(𝟎,𝝁𝟎𝜸𝟎)E(𝟎,𝝁𝟎𝜸𝟎)K\coloneqq\epsilon_{(\bm{0},\bm{\mu_{0}}\oplus\bm{\gamma_{0}})}E(\bm{0},\bm{\mu_{0}}\oplus\bm{\gamma_{0}}). Thus, we may write ρ3\rho_{3} as

ρ3=𝝁𝔽2n/𝒞2Π𝒮X(𝝁)K1ρ1K1\rho_{3}=\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\Pi_{\mathcal{S}_{X(\bm{\mu})}}K_{1}\rho_{1}K_{1} (92)

where K1𝜸𝒞2/𝒞1A𝝁,𝜸ϵ(𝟎,𝝁𝜸)E(𝟎,𝝁𝜸)K_{1}\coloneqq\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu},\bm{\gamma}}\leavevmode\nobreak\ \epsilon_{(\bm{0},\bm{\mu}\oplus\bm{\gamma})}E(\bm{0},\bm{\mu}\oplus\bm{\gamma}). Although the sign ϵ\epsilon does not matter here, we carry it along for consistency with the logical Pauli ZZ operators derived in (50). Based on the syndrome 𝝁\bm{\mu}, the decoder applies a correction and maps the quantum state back to the codespace 𝒱(𝒮)\mathcal{V}(\mathcal{S}). This correction might induce some undetectable ZZ-logical ϵ(𝟎,𝜸𝝁)E(𝟎,𝜸𝝁)\epsilon_{(\bm{0},\bm{\gamma_{\mu}})}E(\bm{0},\bm{\gamma_{\mu}}) with 𝜸𝟎=𝟎\bm{\gamma}_{\bm{0}}=\bm{0}. Hence, the final state after step 4 becomes

ρ4=𝝁𝔽2n/𝒞2B𝝁ρ1B𝝁,\rho_{4}=\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}B_{\bm{\mu}}\rho_{1}B_{\bm{\mu}}^{\dagger}, (93)

where

B𝝁\displaystyle B_{\bm{\mu}} ϵ(𝟎,𝜸𝝁)E(𝟎,𝜸𝝁)𝜸𝒞2/𝒞1A𝝁,𝜸ϵ(𝟎,𝜸)E(𝟎,𝜸)\displaystyle\coloneqq\epsilon_{(\bm{0},\bm{\gamma_{\mu}})}E(\bm{0},\bm{\gamma_{\mu}})\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu},\bm{\gamma}}\leavevmode\nobreak\ \epsilon_{(\bm{0},\bm{\gamma})}E(\bm{0},\bm{\gamma})
=𝜸𝒞2/𝒞1A𝝁,𝜸ϵ(𝟎,𝜸𝜸𝝁)E(𝟎,𝜸𝜸𝝁),\displaystyle=\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu},\bm{\gamma}}\leavevmode\nobreak\ \epsilon_{(\bm{0},\bm{\gamma}\oplus\bm{\gamma_{\mu}})}E(\bm{0},\bm{\gamma}\oplus\bm{\gamma_{\mu}}), (94)

is the effective physical operator corresponding to syndrome 𝝁\bm{\mu}. It follows from (50) that for 𝜸𝒞2/𝒞1\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}, ϵ(𝟎,𝜸𝜸𝝁)E(𝟎,𝜸𝜸𝝁)\epsilon_{(\bm{0},\bm{\gamma}\oplus\bm{\gamma_{\mu}})}E(\bm{0},\bm{\gamma}\oplus\bm{\gamma_{\mu}}) is a logical Pauli ZZ, and (93), (94) can be considered just in the logical space.

Note that the evolution described in (93) works for any initial code state ρ1\rho_{1} in step 1. The interaction between the diagonal gate UZU_{Z} and the structure of CSS code in step 2 is captured in the generator coefficients A𝝁,𝜸A_{\bm{\mu},\bm{\gamma}}. The syndrome of the measurement in step 3 is reflected by the sum in (93), and the decoder chosen in step 4 is expressed by some logical Pauli ZZ determined by 𝜸𝝁\bm{\gamma}_{\bm{\mu}} for each syndrome.

To show {B𝝁}𝝁𝔽2/𝒞2\{B_{\bm{\mu}}\}_{\bm{\mu}\in\mathbb{F}_{2}/\mathcal{C}_{2}^{\perp}} is the set of Kraus operators, we need to verify that

𝝁𝔽2n/𝒞2B𝝁B𝝁=I.\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}B_{\bm{\mu}}^{\dagger}B_{\bm{\mu}}=I. (95)

We may simplify the summation as

𝝁B𝝁B𝝁\displaystyle\sum_{\bm{\mu}}B_{\bm{\mu}}^{\dagger}B_{\bm{\mu}}
=𝝁𝜸|A𝝁,𝜸|2I\displaystyle=\sum_{\bm{\mu}}\sum_{\bm{\gamma}}|A_{\bm{\mu},\bm{\gamma}}|^{2}I
+𝝁𝜸𝜸A𝝁,𝜸¯A𝝁,𝜸ϵ(𝟎,𝜸𝜸)E(𝟎,𝜸𝜸)\displaystyle\leavevmode\nobreak\ +\sum_{\bm{\mu}}\sum_{\bm{\gamma}\neq\bm{\gamma^{\prime}}}\overline{A_{\bm{\mu},\bm{\gamma}}}A_{\bm{\mu},\bm{\gamma^{\prime}}}\leavevmode\nobreak\ \epsilon_{(\bm{0},\bm{\gamma}\oplus\bm{\gamma^{\prime}})}E(\bm{0},\bm{\gamma}\oplus\bm{\gamma^{\prime}})
=𝜼ϵ(𝟎,𝜼)(𝝁𝜸A𝝁,𝜸¯A𝝁,𝜼𝜸)E(𝟎,𝜼),\displaystyle=\sum_{\bm{\eta}}\epsilon_{(\bm{0},\bm{\eta})}\left(\sum_{\bm{\mu}}\sum_{\bm{\gamma}}\overline{A_{\bm{\mu},\bm{\gamma}}}A_{\bm{\mu},\bm{\eta}\oplus\bm{\gamma}}\right)E(\bm{0},\bm{\eta}), (96)

where the new variable 𝜼=𝜸𝜸𝒞2/𝒞1\bm{\eta}=\bm{\gamma}\oplus\bm{\gamma^{\prime}}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}. In Theorem 6, we verify (95) by showing that the coefficient of E(𝟎,𝟎)=IE(\bm{0},\bm{0})=I is 1 and that the coefficients of E(𝟎,𝜼),𝜼𝟎E(\bm{0},\bm{\eta}),\leavevmode\nobreak\ \bm{\eta}\neq\bm{0} are all zero. Theorem 6 describes the general property of generator coefficients, which mainly because quantum gates are unitaries.

Theorem 6.

Suppose that a ZZ-unitary gate UZ=v𝔽2nf(𝐯)E(𝟎,𝐯)U_{Z}=\sum_{v\in\mathbb{F}_{2}^{n}}f(\bm{v})E(\bm{0},\bm{v}) induces generator coefficients A𝛍,𝛄A_{{\bm{\mu}},{\bm{\gamma}}} on a CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) code. If 𝛈𝒞2/𝒞1\bm{\eta}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}, then

𝝁𝔽2n/𝒞2𝜸𝒞2/𝒞1A𝝁,𝜸¯A𝝁,𝜼𝜸={1, if 𝜼=𝟎,0, if 𝜼𝟎.\displaystyle\sum_{{\bm{\mu}}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\overline{A_{\bm{\mu},\bm{\gamma}}}A_{\bm{\mu},\bm{\eta}\oplus{\bm{\gamma}}}=\left\{\begin{array}[]{lc}1,&\text{ if }\bm{\eta}=\bm{0},\\ 0,&\text{ if }\bm{\eta}\neq\bm{0}.\end{array}\right. (99)
Proof.

See Appendix C.4. ∎

We conclude that the Kraus operators describing the action of UZU_{Z} on a CSS code are given by (94).

When UZ=RZ(θ)U_{Z}=R_{Z}(\theta), the generator coefficients A𝝁,𝜸A_{\bm{\mu},\bm{\gamma}} take the form (3.1). Consider now a one-logical-qubit system, where one of the pair (A𝝁=𝟎,𝜸=𝟎(θ),A𝝁=𝟎,𝜸𝟎(θ))(A_{\bm{\mu}=\bm{0},\bm{\gamma}=\bm{0}}(\theta),A_{\bm{\mu}=\bm{0},\bm{\gamma}\neq\bm{0}}(\theta)) is real and the other is pure imaginary. Then the logical qubit is rotated with angle θL\theta_{L} and we can express θL\theta_{L} in terms of the physical rotation angle θ\theta [16] as

θL(θ)=2tan1(ıA𝝁=𝟎,𝜸𝟎(θ)A𝝁=𝟎,𝜸=𝟎(θ)).\theta_{L}(\theta)=2\tan^{-1}\left(\imath\frac{A_{\bm{\mu}=\bm{0},\bm{\gamma}\neq\bm{0}}(\theta)}{A_{\bm{\mu}=\bm{0},\bm{\gamma}=\bm{0}}(\theta)}\right). (100)

See Appendix C.3 for details. We again take the Steane code as an example, substitute the values from Table 1 and obtain the logical rotation angle

θL(θ)\displaystyle\theta_{L}(\theta) =2tan1(sin7θ27sinθ2cos7θ2+7cosθ2)\displaystyle=2\tan^{-1}\left(\frac{\sin\frac{7\theta}{2}-7\sin\frac{\theta}{2}}{\cos\frac{7\theta}{2}+7\cos\frac{\theta}{2}}\right)
=2815θ3+O(θ5).\displaystyle=-\frac{28}{15}\theta^{3}+O(\theta^{5}). (101)

Figure 2 plots θL(θ)\theta_{L}(\theta) displaying third-order convergence about θ=0\theta=0. Note that θL(π4)=π4\theta_{L}(\frac{\pi}{4})=-\frac{\pi}{4}. In Appendix A, we explain how RZ(π4)R_{Z}(\frac{\pi}{4}) supports magic state distillation with the aid of a logical Phase gate. When θ<π4\theta<\frac{\pi}{4}, θL<θ\theta_{L}<\theta, and the Steane code might be applied to convert 7 noisy copies of the state (|0+eıθ|1)/2(|{0}\rangle+e^{\imath\theta}|{1}\rangle)/\sqrt{2} into 1 copy of the state (|0+eıθL|1)/2(|{0}\rangle+e^{\imath\theta_{L}}|{1}\rangle)/\sqrt{2} with higher fidelity.

Refer to caption
Figure 2: The Steane Code: the logical angle θL\theta_{L} in terms of physical angle θ\theta, assuming we observe the trivial syndrome.

We now compute all Kraus operators induced by RZ(θ)R_{Z}(\theta) acting on the Steane code.

Example 1 (continued).

We take the data in Table 1 and substitute θ=π4\theta=\frac{\pi}{4} to obtain

A𝟎,𝟎(π4)\displaystyle A_{\bm{0},\bm{0}}\left(\frac{\pi}{4}\right) =34cosπ8,A𝟎,𝟏(π4)=34ısinπ8,\displaystyle=\frac{3}{4}\cos\frac{\pi}{8},\leavevmode\nobreak\ A_{\bm{0},\bm{1}}\left(\frac{\pi}{4}\right)=\frac{3}{4}\imath\sin\frac{\pi}{8},
A𝝁𝟎,𝟎(π4)=14ısinπ8,\displaystyle A_{\bm{\mu}\neq\bm{0},\bm{0}}\left(\frac{\pi}{4}\right)=-\frac{1}{4}\imath\sin\frac{\pi}{8},\leavevmode\nobreak\
A𝝁𝟎,𝟏(π4)=14cosπ8.\displaystyle A_{\bm{\mu}\neq\bm{0},\bm{1}}\left(\frac{\pi}{4}\right)=-\frac{1}{4}\cos\frac{\pi}{8}. (102)

We assume 𝜸𝝁=𝟎\bm{\gamma}_{\bm{\mu}}=\bm{0} for all 𝝁\bm{\mu}, and use these generator coefficients to compute the Kraus operators

B𝝁=𝟎(π4)\displaystyle B_{\bm{\mu}=\bm{0}}\left(\frac{\pi}{4}\right) =34cosπ8I¯+34ısinπ8Z¯34T¯,\displaystyle=\frac{3}{4}\cos\frac{\pi}{8}\bar{I}+\frac{3}{4}\imath\sin\frac{\pi}{8}\bar{Z}\equiv\frac{3}{4}\bar{T^{\dagger}}, (103)
B𝝁𝟎(π4)\displaystyle B_{\bm{\mu}\neq\bm{0}}\left(\frac{\pi}{4}\right) =14ısinπ8I¯14cosπ8Z¯14Z¯T¯,\displaystyle=-\frac{1}{4}\imath\sin\frac{\pi}{8}\bar{I}-\frac{1}{4}\cos\frac{\pi}{8}\bar{Z}\equiv\frac{1}{4}\bar{Z}\bar{T^{\dagger}}, (104)

which describe the average logical channel corresponds to the transversal TT gate. Reichardt [34] discussed the [[7,1,3]][\![7,1,3]\!] Steane code in magic state distillation. The computed average logical channel makes it clear that we can choose proper corrections based on syndromes (𝜸𝝁=Z¯\bm{\gamma}_{\bm{\mu}}=\bar{Z} for 𝝁𝟎\bm{\mu}\neq\bm{0}) to obtain the logical operator TT^{\dagger} from all the syndromes.

Note that the Steane code is not a triorthogonal code [9], but it can be used in state distillation [34]. The generator coefficients framework may help to characterize codes that are not preserved by transversal TT but realize a logical TT gate when the trivial syndrome is observed. Recently, Vasmer and Kubica [38] introduced a new [[10,1,2]][\![10,1,2]\!] code by morphing the [[15,1,3]][\![15,1,3]\!] quantum Reed-Muller code [24, 10] and the [[8,3,2]][\![8,3,2]\!] color code [14]. It provides the first protocol in state distillation that supports a fault-tolerant logical TT gate from a diagonal physical gate that is not transversal TT. The generator coefficient framework applies to arbitrary diagonal gates, and may facilitate finding more examples of distillation.

When UZU_{Z} is a QFD gate, the Kraus operators can be derived in the same way. Table 2 in Example 2 implies that the [[4,2,2]][\![4,2,2]\!] code is preserved by CZ2Z^{\otimes 2} and that the induced logical operator is Z1LZ_{1}^{L}\circ CZLZ^{L}.

4.2 Probability of Observing Different XX-Syndromes

The Kraus operators derived in Section 4.1 describe logical evolution conditioned on different outcomes from stabilizer measurement, and it is natural to calculate the probability of observing different syndromes 𝝁\bm{\mu}. Generator coefficients provide a means of calculating these probabilities that illuminates dependence on the initial state, and we will provide examples where the initial state and the outcome of syndrome measurement are entangled.

Consider a CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) code with codespace 𝒱(𝒮)\mathcal{V}(\mathcal{S}). For any fixed |ϕ𝒱(𝒮)|{\phi}\rangle\in\mathcal{V}(\mathcal{S}) , we first apply UZU_{Z}, and then measure with projectors {Π𝒮X(𝝁)}𝝁𝔽2n/𝒞2\{\Pi_{\mathcal{S}_{X({\bm{\mu}})}}\}_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}, where Π𝒮X(𝝁)=1|𝒞2|𝒂𝒞2(1)𝒂𝝁Tϵ(𝒂,𝟎)E(𝒂,𝟎)\Pi_{\mathcal{S}_{X({\bm{\mu}})}}=\frac{1}{|\mathcal{C}_{2}|}\sum_{\bm{a}\in\mathcal{C}_{2}}(-1)^{\bm{a}\bm{\mu}^{T}}\epsilon_{(\bm{a},\bm{0)}}E(\bm{a},\bm{0}). Then the probability of obtaining a syndrome 𝝁𝔽2n/𝒞2\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp} is

p𝝁(|ϕ)=ϕ|UZΠ𝒮X(𝝁)UZ|ϕ.p_{\bm{\mu}}\left(|{\phi}\rangle\right)=\langle{\phi}|U_{Z}^{\dagger}\Pi_{\mathcal{S}_{X}(\bm{\mu})}U_{Z}|{\phi}\rangle. (105)

It follows from equation (60) that

UZ|ϕ\displaystyle U_{Z}|{\phi}\rangle =UZΠ𝒮Z|ϕ\displaystyle=U_{Z}\Pi_{\mathcal{S}_{Z}}|{\phi}\rangle
=𝝁𝜸A𝝁,𝜸ϵ(𝟎,𝝁𝜸)E(𝟎,𝝁𝜸)|ϕ,\displaystyle=\sum_{\bm{\mu}}\sum_{\bm{\gamma}}A_{\bm{\mu},\bm{\gamma}}\leavevmode\nobreak\ \epsilon_{(\bm{0},\bm{\mu}\oplus\bm{\gamma})}E(\bm{0},\bm{\mu}\oplus\bm{\gamma})|{\phi}\rangle, (106)

and similarly

ϕ|UZ\displaystyle\langle{\phi}|U_{Z}^{\dagger} =ϕ|Π𝒮ZUZ\displaystyle=\langle{\phi}|\Pi_{\mathcal{S}_{Z}}U_{Z}^{\dagger}
=ϕ|𝝁𝜸A𝝁,𝜸¯ϵ(0,𝝁𝜸)E(0,𝝁𝜸).\displaystyle=\langle{\phi}|\sum_{\bm{\mu}}\sum_{\bm{\gamma}}\overline{A_{\bm{\mu},\bm{\gamma}}}\leavevmode\nobreak\ \epsilon_{(0,\bm{\mu}\oplus\bm{\gamma})}E(0,\bm{\mu}\oplus\bm{\gamma}). (107)

For any fixed 𝝁𝟎𝔽2n/𝒞2\bm{\mu_{0}}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}, since Π𝒮X(𝝁𝟎)Π𝒮X(𝝁𝟎)=Π𝒮X(𝝁𝟎)\Pi_{\mathcal{S}_{X}(\bm{\mu_{0}})}\Pi_{\mathcal{S}_{X}(\bm{\mu_{0}})}=\Pi_{\mathcal{S}_{X}(\bm{\mu_{0}})}, we have

p𝝁𝟎=ϕ|Π𝒮ZUZΠ𝒮X(𝝁𝟎)Π𝒮X(𝝁𝟎)UZΠ𝒮Z|ϕ.p_{\bm{\mu_{0}}}=\langle{\phi}|\Pi_{\mathcal{S}_{Z}}U_{Z}^{\dagger}\Pi_{\mathcal{S}_{X}(\bm{\mu_{0}})}\Pi_{\mathcal{S}_{X}(\bm{\mu_{0}})}U_{Z}\Pi_{\mathcal{S}_{Z}}|{\phi}\rangle. (108)

It follows from the simplification in Appendix C.5 of the later half in (108) that

Π𝒮X(𝝁𝟎)UZΠ𝒮Z|ϕ\displaystyle\Pi_{\mathcal{S}_{X}(\bm{\mu_{0}})}U_{Z}\Pi_{\mathcal{S}_{Z}}|{\phi}\rangle
=1|𝒞2|𝝁𝜸A𝝁,𝜸ϵ(𝟎,𝝁𝜸)E(𝟎,𝝁𝜸)s(𝒂)|ϕ,\displaystyle=\frac{1}{|\mathcal{C}_{2}|}\sum_{\bm{\mu}}\sum_{\bm{\gamma}}A_{\bm{\mu},\bm{\gamma}}\leavevmode\nobreak\ \epsilon_{(\bm{0},\bm{\bm{\mu}\oplus\bm{\gamma}})}E(\bm{0},\bm{\mu}\oplus\bm{\gamma})s(\bm{a})|{\phi}\rangle, (109)

where s(𝒂)𝒂𝒞2(1)𝒂(𝝁𝝁𝟎)Ts(\bm{a})\coloneqq\sum_{\bm{a}\in\mathcal{C}_{2}}(-1)^{\bm{a}(\bm{\mu}\oplus\bm{\mu_{0}})^{T}}. Note that since 𝒂𝒞2\bm{a}\in\mathcal{C}_{2} and 𝝁𝝁𝟎𝔽2n/𝒞2\bm{\mu}\oplus\bm{\mu_{0}}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}, the inner summation is nonzero only when 𝝁=𝝁𝟎\bm{\mu}=\bm{\mu_{0}} so that

Π𝒮X(μ0)UZΠ𝒮Z|ϕ=\displaystyle\Pi_{\mathcal{S}_{X}(\mu_{0})}U_{Z}\Pi_{\mathcal{S}_{Z}}|{\phi}\rangle=
𝜸𝒞2/𝒞1A𝝁𝟎,𝜸ϵ(𝟎,𝝁𝟎𝜸)E(𝟎,𝝁𝟎𝜸)|ϕ.\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu_{0}},\bm{\gamma}}\leavevmode\nobreak\ \epsilon_{(\bm{0},\bm{\mu_{0}}\oplus\bm{\gamma})}E(\bm{0},\bm{\mu_{0}}\oplus\bm{\gamma})|{\phi}\rangle. (110)

Similarly, we have

ϕ|Π𝒮ZUZΠ𝒮X(μ0)=\displaystyle\langle{\phi}|\Pi_{\mathcal{S}_{Z}}U_{Z}^{\dagger}\Pi_{\mathcal{S}_{X}(\mu_{0})}=
ϕ|𝜸𝒞2/𝒞1A𝝁𝟎,𝜸¯ϵ(𝟎,𝝁𝟎𝜸)E(𝟎,𝝁𝟎𝜸).\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \langle{\phi}|\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\overline{A_{\bm{\mu_{0}},\bm{\gamma}}}\leavevmode\nobreak\ \epsilon_{(\bm{0},\bm{\mu_{0}}\oplus\bm{\gamma})}E(\bm{0},\bm{\mu_{0}}\oplus\bm{\gamma}). (111)

Thus, the probability of observing the syndrome 𝝁\bm{\mu} can be written as

p𝝁(|ϕ)=𝜸|A𝝁,𝜸|2+\displaystyle p_{\bm{\mu}}\left(|{\phi}\rangle\right)=\sum_{\bm{\gamma}}|A_{\bm{\mu},\bm{\gamma}}|^{2}+
𝜸𝜸A𝝁,𝜸¯A𝝁,𝜸ϕ|ϵ(𝟎,𝜸𝜸)E(𝟎,𝜸𝜸)|ϕ.\displaystyle\sum_{\bm{\gamma}\neq\bm{\gamma^{\prime}}}\overline{A_{\bm{\mu},\bm{\gamma}}}A_{\bm{\mu},\bm{\gamma^{\prime}}}\langle{\phi}|\epsilon_{(\bm{0},\bm{\gamma}\oplus\bm{\gamma^{\prime}})}E(\bm{0},\bm{\gamma}\oplus\bm{\gamma^{\prime}})|{\phi}\rangle. (112)

Note that only the second term depends on the initial state. If some |ϕi{|+,|}|{\phi_{i}}\rangle\in\{|{+}\rangle,|{-}\rangle\} in the initial state |ϕ=|ϕ1ϕk¯|{\phi}\rangle=|{\overline{\phi_{1}\otimes\cdots\otimes\phi_{k}}}\rangle, then the second term (the cross terms) in (112) vanishes since every ϵ(𝟎,𝜸𝜸)E(𝟎,𝜸𝜸)\epsilon_{(\bm{0},\bm{\gamma}\oplus\bm{\gamma^{\prime}})}E(\bm{0},\bm{\gamma}\oplus\bm{\gamma^{\prime}}) with 𝜸𝜸\bm{\gamma}\neq\bm{\gamma^{\prime}} is some nontrivial Pauli ZZ logical. Note that it follows from Theorem 6 that 𝝁𝜸|A𝝁,𝜸|2=1\sum_{\bm{\mu}}\sum_{\bm{\gamma}}|A_{\bm{\mu},\bm{\gamma}}|^{2}=1. Since 𝝁pμ(|ϕ)=1\sum_{\bm{\mu}}p_{\mu}(|{\phi}\rangle)=1 for any initial state |ϕ𝒱(𝒮)|{\phi}\rangle\in\mathcal{V}(\mathcal{S}), it follows that the sum of the second term over all the XX-syndromes is 0, that is,

𝝁𝜸𝜸A𝝁,𝜸¯A𝝁,𝜸ϕ|ϵ(𝟎,𝜸𝜸)E(𝟎,𝜸𝜸)|ϕ=0.\sum_{\bm{\mu}}\sum_{\bm{\gamma}\neq\bm{\gamma^{\prime}}}\overline{A_{\bm{\mu},\bm{\gamma}}}A_{\bm{\mu},\bm{\gamma^{\prime}}}\langle{\phi}|\epsilon_{(\bm{0},\bm{\gamma}\oplus\bm{\gamma^{\prime}})}E(\bm{0},\bm{\gamma}\oplus\bm{\gamma^{\prime}})|{\phi}\rangle=0. (113)

Note that Pauli ZZ logicals only change signs in the |0&|1|{0}\rangle\&|{1}\rangle basis. If the second term is the same for all |0&|1|{0}\rangle\&|{1}\rangle computational basis states in the codespace, then the probability of observing different syndromes is the same for different initial states |ϕ|{\phi}\rangle. If not, the probabilities depend on the initial state, and encode the mutual information between initial state and syndrome measurement. In these circumstances, we cannot find a recovery operator for UZU_{Z} that is good for the entire codespace. An important special case is when a decoherence-free subspace is embedded in the codespace (useful for passive control of coherent errors UZ=RZ(θ)U_{Z}=R_{Z}(\theta)).

We now introduce two examples to illustrate how (112) provides insight into invariance of the codespace, the probability of success in magic state distillation, and existence of an embedded decoherence-free subspace. Continuing Example 1 below, we compute the probabilities of observing different syndromes for the [[7,1,3]][\![7,1,3]\!] Steane code and discuss implications. Continuing Example 2 below, we demonstrate that by changing signs of ZZ-stabilizers in the [[4,2,2]][\![4,2,2]\!] code, we can switch from the case where the second term is the same for every initial state to the case of an embedded decoherence-free subspace.

Example 1 (continued).

The Steane [[7,1,3]][\![7,1,3]\!] code has only one logical qubit, and we let |0¯|{\overline{0}}\rangle, |1¯|{\overline{1}}\rangle denote the the two computational basis states. Given a syndrome 𝝁\bm{\mu}, we observe that one of the generator coefficients A𝝁,𝜸=𝟎(θ)A_{\bm{\mu},\bm{\gamma}=\bm{0}}(\theta), A𝝁,𝜸𝟎(θ)A_{\bm{\mu},\bm{\gamma}\neq\bm{0}}(\theta), is real and the other is purely imaginary, so that the crossterms vanish in (112). Hence, the probabilities of observing different syndromes are constant for different initial states and are given by

p𝝁=𝟎(|0¯,θ)=p𝝁=𝟎(|1¯,θ)\displaystyle p_{\bm{\mu}=\bm{0}}(|{\overline{0}}\rangle,\theta)=p_{\bm{\mu}=\bm{0}}(|{\overline{1}}\rangle,\theta) =132(7cos4θ+25),\displaystyle=\frac{1}{32}\left(7\cos 4\theta+25\right),
p𝝁𝟎(|0¯,θ)=p𝝁𝟎(|1¯,θ)\displaystyle p_{\bm{\mu}\neq\bm{0}}(|{\overline{0}}\rangle,\theta)=p_{\bm{\mu}\neq\bm{0}}(|{\overline{1}}\rangle,\theta) =132(1cos4θ).\displaystyle=\frac{1}{32}\left(1-\cos 4\theta\right). (114)

It is not hard to verify that 𝝁p𝝁(|ϕ,θ)=132(7cos4θ+25)+732(1cos4θ)=1\sum_{\bm{\mu}}p_{\bm{\mu}}(|{\phi}\rangle,\theta)=\frac{1}{32}\left(7\cos 4\theta+25\right)+\frac{7}{32}\left(1-\cos 4\theta\right)=1 for all |ϕ𝒱(𝒮)|{\phi}\rangle\in\mathcal{V}(\mathcal{S}) and for all θ\theta. Figure 3 plots the probability of observing the trivial syndrome as a function of the rotation angle.

Refer to caption
Figure 3: The probability of observing the trivial syndrome for the Steane Code under RZ(θ)R_{Z}(\theta) for varying physical angles θ\theta.

We observe from Figure 3 that when θ\theta is a multiple of π2\frac{\pi}{2}, p𝝁=𝟎(|ϕ)=1p_{\bm{\mu}=\bm{0}}(|{\phi}\rangle)=1 for all the states |ϕ|{\phi}\rangle in the Steane codespace 𝒱(𝒮)\mathcal{V}(\mathcal{S}), which implies that RZ(kπ2)R_{Z}(\frac{k\pi}{2}) preserves 𝒱(𝒮)\mathcal{V}(\mathcal{S}). The angle θ=π4+kπ2\theta=\frac{\pi}{4}+\frac{k\pi}{2} minimizes the probability of obtaining the zero syndrome and this minimum value relates to the probability of success in magic state distillation. Substituting θ=π4\theta=\frac{\pi}{4}, we obtain p𝝁=𝟎(|ϕ,π4)=916, and p𝝁𝟎(|ϕ,π4)=116,p_{\bm{\mu}=\bm{0}}\left(|{\phi}\rangle,\frac{\pi}{4}\right)=\frac{9}{16}\text{, and }p_{\bm{\mu}\neq\bm{0}}\left(|{\phi}\rangle,\frac{\pi}{4}\right)=\frac{1}{16}, for all |ϕ𝒱(𝒮)|{\phi}\rangle\in\mathcal{V}(\mathcal{S}).

Example 2 (continued).

Recall the [[4,2,2]][\![4,2,2]\!] CSS(X,𝒞2={𝟎,𝟏};Z,𝒞1=𝒞2X,\mathcal{C}_{2}=\{\bm{0},\bm{1}\};Z,\mathcal{C}_{1}^{\perp}=\mathcal{C}_{2}) code with two different choices of signs defined by the character vectors 𝒚=𝟎\bm{y}=\bm{0} (all positive signs), and 𝒚=[0,0,0,1]\bm{y^{\prime}}=[0,0,0,1] (negative Z4Z^{\otimes 4} in the stabilizer group).

Table 4: Generator coefficients A𝝁,𝜸(θ)A_{\bm{\mu},\bm{\gamma}}(\theta) for RZ(θ)R_{Z}(\theta) of the [[4,2,2]][\![4,2,2]\!] code with all positive signs (𝒚=𝟎\bm{y}=\bm{0}).
𝜸=𝟎\bm{\gamma}=\bm{0} 𝜸𝟎\bm{\gamma}\neq\bm{0}
𝝁=𝟎\bm{\mu}=\bm{0} 14(cos2θ+3)\frac{1}{4}\left(\cos 2\theta+3\right) 14(cos2θ1)\frac{1}{4}\left(\cos 2\theta-1\right)
𝝁=[1,0,0,0]\bm{\mu}=[1,0,0,0] 14ısin2θ-\frac{1}{4}\imath\sin 2\theta

Table 4 lists the generator coefficients for all positive signs (𝒚=𝟎\bm{y}=\bm{0}). We now use the data to calculate the probabilities of observing different syndromes as described in (112). For the encoded |00¯|{\overline{00}}\rangle state, we have

p𝝁=𝟎(|00¯,θ)\displaystyle p_{\bm{\mu}=\bm{0}}(|{\overline{00}}\rangle,\theta) =12cos4θ+12,\displaystyle=\frac{1}{2}\cos 4\theta+\frac{1}{2},
p𝝁=[0,0,0,1](|00¯,θ)\displaystyle p_{\bm{\mu}=[0,0,0,1]}(|{\overline{00}}\rangle,\theta) =12cos4θ+12.\displaystyle=-\frac{1}{2}\cos 4\theta+\frac{1}{2}. (115)
Table 5: Generator coefficients A𝝁,𝜸(θ)A_{\bm{\mu},\bm{\gamma}}(\theta) for RZ(θ)R_{Z}(\theta) of the [[4,2,2]][\![4,2,2]\!] code with negative Z4Z^{\otimes 4} stabilizer (𝒚=[0,0,0,1]\bm{y}=[0,0,0,1]).
XX-syndromes ZZ-logicals 𝜸=𝟎\bm{\gamma}=\bm{0} 𝜸𝟏=[0,0,1,1]\bm{\gamma_{1}}=[0,0,1,1] 𝜸𝟐=[0,1,1,0]\bm{\gamma_{2}}=[0,1,1,0] 𝜸𝟑=𝜸𝟏𝜸𝟐\bm{\gamma_{3}}=\bm{\gamma_{1}}\oplus\bm{\gamma_{2}}
𝝁=𝟎\bm{\mu}=\bm{0} cosθ\cos\theta 0 0 0
𝝁=[1,0,0,0]\bm{\mu}=[1,0,0,0] 12ısinθ-\frac{1}{2}\imath\sin\theta 12ısinθ\frac{1}{2}\imath\sin\theta 12ısinθ-\frac{1}{2}\imath\sin\theta 12ısinθ-\frac{1}{2}\imath\sin\theta

The remaining three states have the same probabilities of observing XX-syndromes:

p𝝁=𝟎(|ϕ{|01¯,|10¯,|11¯},θ)=\displaystyle p_{\bm{\mu}=\bm{0}}(|{\phi}\rangle\in\{|{\overline{01}}\rangle,|{\overline{10}}\rangle,|{\overline{11}}\rangle\},\theta)=
18(cos4θ+7)+18(1cos4θ)=1,\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \frac{1}{8}(\cos 4\theta+7)+\frac{1}{8}\left(1-\cos 4\theta\right)=1, (116)
p𝝁=[1,0,0,0](|ϕ{|01¯,|10¯,|11¯},θ)=\displaystyle p_{\bm{\mu}=[1,0,0,0]}(|{\phi}\rangle\in\{|{\overline{01}}\rangle,|{\overline{10}}\rangle,|{\overline{11}}\rangle\},\theta)=
18(1cos4θ)18(1cos4θ)=0.\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \frac{1}{8}(1-\cos 4\theta)-\frac{1}{8}\left(1-\cos 4\theta\right)=0. (117)

If the initial state is among |01¯,|10¯,|11¯|{\overline{01}}\rangle,|{\overline{10}}\rangle,|{\overline{11}}\rangle, then it evolves within the codespace for all angles θ\theta, which implies that span(|01¯,|10¯,|11¯)\mathcal{F}\coloneqq\mathrm{span}(|{\overline{01}}\rangle,|{\overline{10}}\rangle,|{\overline{11}}\rangle) forms a embedded decoherence-free subspace (DFS) inside the codespace [23].

Refer to caption
Figure 4: The [[4,2,2]][\![4,2,2]\!] code with all positive stabilizers. The probability of observing the trivial syndrome for the initial encoded state |00¯|{\overline{00}}\rangle under RZ(θ)R_{Z}(\theta) for varying physical angles θ\theta.

Figure 4 plots (2) for different physical angles θ\theta. When θ=π4+kπ2\theta=\frac{\pi}{4}+\frac{k\pi}{2} for some integer kk, syndrome measurement acts as projection from 𝒱(𝒮)\mathcal{V}(\mathcal{S}) to the embedded DFS, and we are able to learn whether the initial state was |00¯|{\overline{00}}\rangle; When θ=kπ2\theta=\frac{k\pi}{2} for some integer kk, the measurement outcome is always the zero syndrome, which implies that RZ(π2)R_{Z}(\frac{\pi}{2}) perserve the codespace and some logical operator is induced. The Kraus operators derived in (94) imply that the induced logical operator is

B𝝁=𝟎(π2)\displaystyle B_{\bm{\mu}=\bm{0}}\left(\frac{\pi}{2}\right) =𝜸A𝟎,𝜸(π2)E(𝟎,𝜸)\displaystyle=\sum_{\bm{\gamma}}A_{\bm{0},\bm{\gamma}}\left(\frac{\pi}{2}\right)E(\bm{0},\bm{\gamma})
(Z¯Z¯)CZ¯.\displaystyle\equiv\left(\bar{Z}\otimes\bar{Z}\right)\circ\overline{CZ}. (118)

Next, we compute the generator coefficients for the same [[4,2,2]][\![4,2,2]\!] code but with nontrivial signs (character vector 𝒚=[0,0,0,1]\bm{y}=[0,0,0,1]).

It follows from (112) and Table 5 that

p𝝁=𝟎(|ϕ{|00¯,|01¯,|10¯,|11¯},θ)=(cosθ)2,\displaystyle p_{\bm{\mu}=\bm{0}}(|{\phi}\rangle\in\{|{\overline{00}}\rangle,|{\overline{01}}\rangle,|{\overline{10}}\rangle,|{\overline{11}}\rangle\},\theta)=(\cos\theta)^{2},
p𝝁=[1,0,0,0](|ϕ{|00¯,|01¯,|10¯,|11¯},θ)\displaystyle p_{\bm{\mu}=[1,0,0,0]}(|{\phi}\rangle\in\{|{\overline{00}}\rangle,|{\overline{01}}\rangle,|{\overline{10}}\rangle,|{\overline{11}}\rangle\},\theta)
=(sinθ)2.\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ =(\sin\theta)^{2}.

In this case, the probabilities are independent of the different initial states and there is no embedded decoherence-free subspace in the codespace. This example shows that for the same code, state evolution depends very strongly on signs of ZZ-stabilizers.

In prior work [23], we have derived criteria that ensure a stabilizer code is a DFS, and (112) opens the door to developing criteria for embedded DFS, in which the second term acts as an amendment to the first term and implies the probability is either 0 or 11 for a subset of initial |0&|1|{0}\rangle\&|{1}\rangle-basis state in the codespace.

5 CSS codes Preserved by UZU_{Z}

When a CSS code is preserved by a unitary UZU_{Z}, the probability of observing the zero syndrome is 1, and the Kraus operators capture evolution of logical states. Theorem 7 provides necessary and sufficient conditions for a unitary UZU_{Z} to preserve a CSS code.

We prove Theorem 7 by writing Π𝒮\Pi_{\mathcal{S}} as a product Π𝒮=Π𝒮XΠ𝒮Z\Pi_{\mathcal{S}}=\Pi_{\mathcal{S}_{X}}\Pi_{\mathcal{S}_{Z}}, where UZU_{Z} commutes with the ZZ-projector Π𝒮Z\Pi_{\mathcal{S}_{Z}}, and we then translate commutativity to conditions on generator coefficients. We generalize these conditions to arbitrary stabilizer codes in Appendix B.

Theorem 7.

Let CSS(X,𝒞2=ci:1ik2;Z,𝒞1=dj:1jnk1X,\mathcal{C}_{2}=\langle c_{i}:1\leq i\leq k_{2}\rangle;Z,\mathcal{C}_{1}^{\perp}=\langle d_{j}:1\leq j\leq n-k_{1}\rangle) be an [[n,k1k2,d]]\left[\left[n,k_{1}-k_{2},d\right]\right] CSS code 𝒱(𝒮)\mathcal{V}(\mathcal{S}) defined by the stabilizer group 𝒮\mathcal{S} with code projector Π𝒮\Pi_{\mathcal{S}}. Then the unitary UZ=𝐯𝔽2nf(𝐯)E(𝟎,𝐯)U_{Z}=\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}f(\bm{v})E(\bm{0},\bm{v}) preserves 𝒱(𝒮)\mathcal{V}(\mathcal{S}) (i.e. UZΠ𝒮UZ=Π𝒮U_{Z}\Pi_{\mathcal{S}}U_{Z}^{\dagger}=\Pi_{\mathcal{S}}) if and only if

𝜸𝒞2/𝒞1|A𝟎,𝜸|2=1.\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}|A_{\bm{0},\bm{\gamma}}|^{2}=1. (119)
Proof.

See Appendix C.6. ∎

Remark 8 (Logical Operator induced by UZU_{Z}).

We assume that UZΠ𝒮UZ=Π𝒮U_{Z}\Pi_{\mathcal{S}}U_{Z}^{\dagger}=\Pi_{\mathcal{S}} for a CSS code defined by 𝒮\mathcal{S}. By Theorem 7, (119) holds, so that by Theorem 6 we only have one Kraus operator left in (94) that is given by

B𝝁=𝟎=𝜸𝒞2/𝒞1A𝟎,𝜸ϵ(𝟎,𝜸)E(𝟎,𝜸).B_{\bm{\mu}=\bm{0}}=\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{0},\bm{\gamma}}\leavevmode\nobreak\ \epsilon_{(\bm{0},\bm{\gamma})}E(\bm{0},\bm{\gamma}). (120)

Note that 𝔽2k𝒞2/𝒞1\mathbb{F}_{2}^{k}\simeq\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp} and we have a bijective map g:𝔽2k𝒞2/𝒞1g:\mathbb{F}_{2}^{k}\to\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp} defined by g(𝜶)=𝜶G𝒞2/𝒞1g(\bm{\alpha})=\bm{\alpha}G_{\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}, where G𝒞2/𝒞1G_{\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}} is the generator matrix selected. Let UZLU_{Z}^{L} be the logical operator induced by UZU_{Z}, and let αj\alpha_{j} be the jjth entry of the vector 𝜶\bm{\alpha}. Then, using (50), we translate the Kraus operator into the logical space as

UZL\displaystyle U_{Z}^{L} =𝜶𝔽2kA𝟎,g(𝜶)(j=1k(ZjL)αj)\displaystyle=\sum_{\bm{\alpha}\in\mathbb{F}_{2}^{k}}A_{\bm{0},g(\bm{\alpha})}\left(\prod_{j=1}^{k}\left(Z_{j}^{L}\right)^{\alpha_{j}}\right)
=𝜶𝔽2kA𝟎,g(𝜶)E(𝟎,𝜶),\displaystyle=\sum_{\bm{\alpha}\in\mathbb{F}_{2}^{k}}A_{\bm{0},g(\bm{\alpha})}E(\bm{0},\bm{\alpha}), (121)

Thus, if a CSS code is preserved by UZ=𝒗𝔽2nf(𝒗)E(𝟎,𝒗)U_{Z}=\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}f(\bm{v})E(\bm{0},\bm{v}), then the generator coefficients corresponding to the zero syndrome are simply the coefficients in the Pauli expansion of the induced logical operator. We also observe that UZLU_{Z}^{L} given in (121) is unitary if and only if (119) holds.

In the following subsections, we simplify (119) in special cases when UZU_{Z} is a QFD gate, and when UZ=RZ(πp)U_{Z}=R_{Z}(\frac{\pi}{p}) for some integer pp. We then provide necessary and sufficient conditions for quantum Reed-Muller codes to be preserved by RZ(2π2l)R_{Z}(\frac{2\pi}{2^{l}}), and connect to the conditions in [35, Theorem 17].

5.1 QFD Gates

Theorem 9 below specializes Theorem 7 to the broad class of diagonal level-ll QFD gates τR(l)\tau_{R}^{(l)} determined by symmetric matrices R2ln×nR\in\mathbb{Z}_{2^{l}}^{n\times n}. Note that Theorem 9 applies to CSS codes with arbitrary signs and RZ(2π2l)R_{Z}\left(\frac{2\pi}{2^{l}}\right) form a subset of QFD gates. Theorem 9 includes the divisibility conditions derived in [43, 26, 39] as a special case.

Theorem 9.

Consider a CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp})code, where 𝐲\bm{y} is the character vector of the ZZ-stabilizers. Then, a QFD gate τR(l)=𝐯𝔽2nξl𝐯R𝐯Tmod2l|𝐯𝐯|\tau_{R}^{(l)}=\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}\xi_{l}^{\bm{v}R\bm{v}^{T}\bmod{2^{l}}}|{\bm{v}}\rangle\langle{\bm{v}}| preserves the codespace 𝒱(𝒮)\mathcal{V}(\mathcal{S}) if and only if

2l(𝒗𝟏R𝒗𝟏T𝒗𝟐R𝒗𝟐T)2^{l}\mid(\bm{v_{1}}R\bm{v_{1}}^{T}-\bm{v_{2}}R\bm{v_{2}}^{T}) (122)

for all 𝐯𝟏,𝐯𝟐𝒞1+𝐲\bm{v_{1}},\bm{v_{2}}\in\mathcal{C}_{1}+\bm{y} such that 𝐯𝟏𝐯𝟐𝒞2\bm{v_{1}}\oplus\bm{v_{2}}\in\mathcal{C}_{2}.

Proof.

It follows from (84) that

𝜸𝒞2/𝒞1|A𝟎,𝜸(R,l)|2=\displaystyle\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\left|A_{\bm{0},\bm{\gamma}}(R,l)\right|^{2}=
1|𝒞1|2𝒗𝒞1s(𝒗,𝒚)γ𝒞2/𝒞1(1)𝜸𝒗T,\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \frac{1}{|\mathcal{C}_{1}|^{2}}\sum_{\bm{v}\in\mathcal{C}_{1}}s(\bm{v},\bm{y})\sum_{{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}(-1)^{\bm{\gamma}\bm{v}^{T}}, (123)

where

s(𝒗,𝒚)𝒗𝟏𝒞1+𝒚ξl𝒗𝟏R𝒗𝟏T(𝒗𝒗𝟏)R(𝒗𝒗𝟏)Tmod2l.s(\bm{v},\bm{y})\coloneqq\sum_{\bm{v_{1}}\in\mathcal{C}_{1}+\bm{y}}\xi_{l}^{\bm{v_{1}}R\bm{v_{1}}^{T}-(\bm{v}\oplus\bm{v_{1}})R(\bm{v}\oplus\bm{v_{1}})^{T}\bmod{2^{l}}}. (124)

We simplify (119) using (5.1) to obtain

1\displaystyle 1 =γ𝒞2/𝒞1|A𝟎,𝜸(R,l)|2\displaystyle=\sum_{{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\left|A_{\bm{0},\bm{\gamma}}(R,l)\right|^{2}
=1|𝒞1|2𝒗𝒞1s(𝒗,𝒚)𝜸𝒞2/𝒞1(1)𝜸𝒗T\displaystyle=\frac{1}{|\mathcal{C}_{1}|^{2}}\sum_{\bm{v}\in\mathcal{C}_{1}}s(\bm{v},\bm{y})\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}(-1)^{\bm{\gamma}\bm{v}^{T}}
=𝒗𝒞2𝒗𝟏𝒞1+𝒚ξl𝒗𝟏R𝒗𝟏T(𝒗𝒗𝟏)R(𝒗𝒗𝟏)T|𝒞1||𝒞2|,\displaystyle=\frac{\sum_{\bm{v}\in\mathcal{C}_{2}}\sum_{\bm{v_{1}}\in\mathcal{C}_{1}+\bm{y}}\xi_{l}^{\bm{v_{1}}R\bm{v_{1}}^{T}-(\bm{v}\oplus\bm{v_{1}})R(\bm{v}\oplus\bm{v_{1}})^{T}}}{|\mathcal{C}_{1}||\mathcal{C}_{2}|}, (125)

which requires each term to contribute 11 to the summation. We complete the proof by setting 𝒗𝟐=𝒗𝒗𝟏\bm{v_{2}}=\bm{v}\oplus\bm{v_{1}}. ∎

Remark 10.

When R=IR=I, then 𝒗R𝒗T=wH(𝒗)\bm{v}R\bm{v}^{T}=w_{H}(\bm{v}) and the divisibility condition simplifies to the condition previously obtained for RZ(2π2l)R_{Z}\left(\frac{2\pi}{2^{l}}\right). If a CSS code is preserved by RZ(2π2l)R_{Z}\left(\frac{2\pi}{2^{l}}\right) for all l1l\geq 1, then it follows (122) that for any fixed 𝒘𝒞1𝒞2\bm{w}\in\mathcal{C}_{1}\ \mathcal{C}_{2}, all elements in the coset 𝒞2+𝒘+𝒚\mathcal{C}_{2}+\bm{w}+\bm{y} have the same Hamming weight. It then follows from the generalized encoding map given in (36) that any CSS code invariant under RZ(2π2l)R_{Z}\left(\frac{2\pi}{2^{l}}\right) for all l1l\geq 1 is a constant-excitation code [41].

We now explore the influence of signs by analyzing and separating the effect of the character vector 𝒚\bm{y}.

Lemma 11.

Consider a CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) code, where 𝐲\bm{y} is the character vector of the ZZ-stabilizers. Then, (122) holds for all 𝐯𝟏,𝐯𝟐𝒞1+𝐲\bm{v_{1}},\bm{v_{2}}\in\mathcal{C}_{1}+\bm{y} such that 𝐯𝟏𝐯𝟐𝒞2\bm{v_{1}}\oplus\bm{v_{2}}\in\mathcal{C}_{2} if and only if

2l(𝒗𝟏R𝒗𝟏T𝒗𝟐R𝒗𝟐T), for all 𝒗𝟏,𝒗𝟐𝒞2+𝒚;2^{l}\mid(\bm{v_{1}}R\bm{v_{1}}^{T}-\bm{v_{2}}R\bm{v_{2}}^{T}),\text{ for all }\bm{v_{1}},\bm{v_{2}}\in\mathcal{C}_{2}+\bm{y}; (126)
2l1(𝒖𝟏𝒖𝟐)R𝒘T,2^{l-1}\mid(\bm{u_{1}}-\bm{u_{2}})R\bm{w}^{T}, (127)

for all 𝐮𝟏,𝐮𝟐𝒞2\bm{u_{1}},\bm{u_{2}}\in\mathcal{C}_{2} and 𝐰𝒞1/𝒞2.\bm{w}\in\mathcal{C}_{1}/\mathcal{C}_{2}.

Proof.

See Appendix C.7. ∎

Note that only (126) depends on the character vector 𝒚\bm{y}, and its contribution is moving the divisible requirement for a set to that for a coset.

Note that by varying the level ll, the same symmetric matrix RR can determine different gates (for example, the gates CZZ and CPP in Example 5). The divisibility conditions corresponding to successive levels differ by a factor of 22. This suggests using concatenation to lift a code preserved by a level ll QFD gate determined by RR to a code preserved by a level l+1l+1 QFD gate determine by I2RI_{2}\otimes R. We defer investigation to future work.

5.2 Transversal θ\theta ZZ-Rotation RZ(θ)R_{Z}(\theta)

5.2.1 RZ(π/p)R_{Z}(\pi/p) and RM Constructions

If the physical rotation angle θ\theta is a fraction of π\pi, then the constraint on generator coefficients in (119) is equivalent to conditions on the Hamming weights that appear in the classical codes 𝒞1\mathcal{C}_{1} and 𝒞2\mathcal{C}_{2} that determine the quantum CSS code.

Theorem 12.

Let pp\in\mathbb{Z}. Then RZ(πp)R_{Z}\left(\frac{\pi}{p}\right) preserves the CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) codespace if and only if

2p|(wH(𝒘)2wH(𝒘𝒛)),2p\leavevmode\nobreak\ |\leavevmode\nobreak\ \left(w_{H}(\bm{w})-2w_{H}(\bm{w}*\bm{z})\right), (128)

for all 𝐰𝒞2\bm{w}\in\mathcal{C}_{2} and all 𝐳𝒞1+𝐲\bm{z}\in\mathcal{C}_{1}+\bm{y}, where 𝐲\bm{y} is the character vector that determines signs of ZZ-stabilizers and 𝐰𝐳\bm{w}*\bm{z} is the coordinate-wise product of 𝐰\bm{w} and 𝐳\bm{z}.

Proof.

See Appendix C.8. ∎

Remark 13 (Transversal π/2l\pi/2^{l} ZZ-rotation).

Assume positive signs (character vector 𝒚=𝟎\bm{y}=\bm{0}) and set p=2l1p=2^{l-1} for some integer l1l\geq 1. Since 𝟎𝒞1\bm{0}\in\mathcal{C}_{1} and 𝟎𝒞2\bm{0}\in\mathcal{C}_{2}, it follows from Theorem 12 that RZ(π2l1)R_{Z}\left(\frac{\pi}{2^{l-1}}\right) preserves a CSS codespace 𝒱(𝒮)\mathcal{V}(\mathcal{S}) if and only if

2l|wH(𝒘) for all 𝒘𝒞2, and2^{l}\leavevmode\nobreak\ |\leavevmode\nobreak\ w_{H}(\bm{w})\text{ for all }\bm{w}\in\mathcal{C}_{2}\text{, and} (129)
2l1|wH(𝒘𝒛) for all 𝒘𝒞2 and for all 𝒛𝒞1.2^{l-1}\leavevmode\nobreak\ |\leavevmode\nobreak\ w_{H}(\bm{w}*\bm{z})\text{ for all }\bm{w}\in\mathcal{C}_{2}\text{ and for all }\bm{z}\in\mathcal{C}_{1}. (130)

This result coincides with the sufficient conditions in [39, Proposition 4], which is a special case of the quasitransversality introduced earlier by Campbell and Howard [14]. For example, if a CSS code with all positive stabilizers is invariant under RZ(π4)R_{Z}\left(\frac{\pi}{4}\right), then the weight of every XX-stabilizers needs to be divisible by 8. We note that the [[8,3,2]][\![8,3,2]\!] color code is the smallest error-detecting CSS code with all positive signs that is preserved by RZ(π4)R_{Z}\left(\frac{\pi}{4}\right). We defer the study of non-trivial character vectors 𝒚\bm{y} to future work.

The divisibility conditions (129), (130) suggest constructing CSS codes from classical Reed-Muller codes.

Theorem 14 (Reed-Muller Constructions).

Consider Reed-Muller codes 𝒞1=RM(r1,m)𝒞2=RM(r2,m)\mathcal{C}_{1}=\mathrm{RM}(r_{1},m)\supset\mathcal{C}_{2}=\mathrm{RM}(r_{2},m) with r1>r2r_{1}>r_{2}. The [[n=2m,k=j=r2+1r1(mj),d=2min{r2+1,mr1}]][\![n=2^{m},k=\sum_{j=r_{2}+1}^{r_{1}}\binom{m}{j},d=2^{\min\{r_{2}+1,m-r_{1}\}}]\!] CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) code with all positive stabilizers is preserved by RZ(π2l1)R_{Z}(\frac{\pi}{2^{l-1}}) if and only if

l{m1r1+1, if r2=0,min{mr21r1+1,mr1r2+1}, if r20.l\leq\left\{\begin{array}[]{lc}\left\lfloor\frac{m-1}{r_{1}}\right\rfloor+1,\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \text{ if }r_{2}=0,\\ \min\left\{\left\lfloor\frac{m-r_{2}-1}{r_{1}}\right\rfloor+1,\left\lfloor\frac{m-r_{1}}{r_{2}}\right\rfloor+1\right\},\text{ if }r_{2}\neq 0.\end{array}\right. (131)
Proof.

Note that all ZZ-stabilizers have positive signs corresponding to the case 𝒚=𝟎\bm{y}=\bm{0} in Theorem 12. Then, RZ(π2l1)R_{Z}\left(\frac{\pi}{2^{l-1}}\right) preserves a CSS codespace if and only if (129) and (130) hold.

Let 𝒘𝒞2\bm{w}\in\mathcal{C}_{2} and 𝒛𝒞1\bm{z}\in\mathcal{C}_{1}. If r2=0r_{2}=0, then 𝒞2={𝟎,𝟏}\mathcal{C}_{2}=\{\bm{0},\bm{1}\} and wH(𝒘){0,2m}w_{H}(\bm{w})\in\{0,2^{m}\}. It follows from McEliece [29] (see also Ax [3]) that

2m1r1wH(𝒘𝒛),2^{\left\lfloor\frac{m-1}{r_{1}}\right\rfloor}\mid w_{H}(\bm{w}*\bm{z}), (132)

and this bound is tight. The two conditions become lmin{m,m1r1+1}=m1r1+1l\leq\min\{m,\left\lfloor\frac{m-1}{r_{1}}\right\rfloor+1\}=\left\lfloor\frac{m-1}{r_{1}}\right\rfloor+1.

If r20r_{2}\neq 0, then it follows from McEliece [30, 6] that m1r2\left\lfloor\frac{m-1}{r_{2}}\right\rfloor is the highest power of 22 that divides wH(𝒘)w_{H}(\bm{w}) for all 𝒘𝒞2=RM(r2,m)\bm{w}\in\mathcal{C}_{2}=\mathrm{RM}(r_{2},m). We first show (131) is necessary. It follows from (129) that

lm1r2.l\leq\left\lfloor\frac{m-1}{r_{2}}\right\rfloor. (133)

We need to understand divisibility of weights wH(𝒘𝒛)w_{H}(\bm{w}*\bm{z}) where 𝒘𝒞2\bm{w}\in\mathcal{C}_{2} and 𝒛𝒞1\bm{z}\in\mathcal{C}_{1}. The codeword 𝒘\bm{w} is the evaluation vector of a sum of monomials, and we start by considering the case of a single monomial. Consider a codeword 𝒘𝟏𝒞2\bm{w_{1}}\in\mathcal{C}_{2} corresponding to the evaluation of a monomial of degree ss. For all 𝒛𝒞1\bm{z}\in\mathcal{C}_{1}, we observe that 𝒘𝟏𝒛\bm{w_{1}}*\bm{z} is a codeword in RM(min{r1,ms},ms)(\min\{r_{1},m-s\},m-s) supported on 𝒘𝟏\bm{w_{1}}. Then, ms1max{r1,ms}\left\lfloor\frac{m-s-1}{\max\{r_{1},m-s\}}\right\rfloor is the highest power of 22 that divides wH(𝒘𝟏𝒛)w_{H}(\bm{w_{1}}*\bm{z}) for all 𝒛𝒞1\bm{z}\in\mathcal{C}_{1}. Note that since ss takes values from 0 to r2r_{2}, we have

l\displaystyle l mr21max{r1,mr2}+1\displaystyle\leq\left\lfloor\frac{m-r_{2}-1}{\max\{r_{1},m-r_{2}\}}\right\rfloor+1
={mr21r1+1, if r1+r2m,1=mr1r2+1, if m<r1+r2.\displaystyle=\left\{\begin{array}[]{lc}\left\lfloor\frac{m-r_{2}-1}{r_{1}}\right\rfloor+1,&\text{ if }r_{1}+r_{2}\leq m,\\ 1=\left\lfloor\frac{m-r_{1}}{r_{2}}\right\rfloor+1,&\text{ if }m<r_{1}+r_{2}.\end{array}\right. (136)

We now consider 𝒘𝒞2\bm{w}\in\mathcal{C}_{2} such that 𝒘=𝒘𝟏𝒘𝟐\bm{w}=\bm{w_{1}}\oplus\bm{w_{2}}, where 𝒘𝟏\bm{w_{1}}, 𝒘𝟐\bm{w_{2}} are evaluation vectors correspond to monomials in 𝒞2\mathcal{C}_{2}. Then, for 𝒛𝒞1\bm{z}\in\mathcal{C}_{1}, we have

wH(𝒘𝒛)\displaystyle w_{H}(\bm{w}*\bm{z}) =wH(𝒘𝟏𝒛)+wH(𝒘𝟐𝒛)\displaystyle=w_{H}(\bm{w_{1}}*\bm{z})+w_{H}(\bm{w_{2}}*\bm{z})
2wH(𝒘𝟏𝒘𝟐𝒛).\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ -2w_{H}(\bm{w_{1}}*\bm{w_{2}}*\bm{z}). (137)

Since 𝒘,𝒘𝟏,𝒘𝟐𝒞2\bm{w},\bm{w_{1}},\bm{w_{2}}\in\mathcal{C}_{2}, it follows from (130) that 2l2^{l} divides 2wH(𝒘𝒛), 2wH(𝒘𝟏𝒛)2w_{H}(\bm{w}*\bm{z}),\leavevmode\nobreak\ 2w_{H}(\bm{w_{1}}*\bm{z}), and so 2wH(𝒘𝟐𝒛)2w_{H}(\bm{w_{2}}*\bm{z}). By (5.2.1), we have

2l|4wH(𝒘𝟏𝒘𝟐𝒛).2^{l}|4w_{H}(\bm{w_{1}}*\bm{w_{2}}*\bm{z}). (138)

Since 𝒘𝟏𝒘𝟐\bm{w_{1}}*\bm{w_{2}} is the evaluation vector of a monomial with degree smin{m,2r2}s^{\prime}\leq\min\{m,2r_{2}\}, 𝒘𝟏𝒘𝟐𝒛\bm{w_{1}}*\bm{w_{2}}*\bm{z} is a codeword in RM(min{r1,ms},ms)(\min\{r_{1},m-s^{\prime}\},m-s^{\prime}) supported on 𝒘𝟏𝒘𝟐\bm{w_{1}}*\bm{w_{2}}. Then, m2r21max{r1,m2r2}\left\lfloor\frac{m-2r_{2}-1}{\max\{r_{1},m-2r_{2}\}}\right\rfloor is the highest power of 22 that divides wH(𝒘𝟏𝒘𝟐𝒛)w_{H}(\bm{w_{1}}*\bm{w_{2}}*\bm{z}) for all 𝒘𝟏𝒘𝟐𝒞2\bm{w_{1}}*\bm{w_{2}}\in\mathcal{C}_{2}. The extremum is achieved when the monimials corresponding to 𝒘𝟏\bm{w_{1}} and 𝒘𝟐\bm{w_{2}} have degree r2r_{2} and do not share a variable. Hence,

lm2r21max{r1,m2r2}+2={m2r21r1+2, if r1+2r2m,2=mr1r2+1, if r1+r2m<r1+2r2.l\leq\left\lfloor\frac{m-2r_{2}-1}{\max\{r_{1},m-2r_{2}\}}\right\rfloor+2=\left\{\begin{array}[]{lc}\left\lfloor\frac{m-2r_{2}-1}{r_{1}}\right\rfloor+2,&\text{ if }r_{1}+2r_{2}\leq m,\\ 2=\left\lfloor\frac{m-r_{1}}{r_{2}}\right\rfloor+1,&\text{ if }r_{1}+r_{2}\leq m<r_{1}+2r_{2}.\end{array}\right. (139)

It remains to consider the case 𝒘=𝒘𝟏𝒘𝟐𝒘𝒕𝒞2\bm{w}=\bm{w_{1}}\oplus\bm{w_{2}}\oplus\cdots\oplus\bm{w_{t}}\in\mathcal{C}_{2}, where each 𝒘𝒊\bm{w_{i}} is the evaluation vector of a monomial. We use inclusion-exclusion to rewrite (130) as

2l1|i=1t(2)i11j1jitwH(𝒘𝒋𝟏𝒘𝒋𝒊𝒛).\displaystyle 2^{l-1}\Big{|}\sum_{i=1}^{t}(-2)^{i-1}\sum_{1\leq j_{1}\leq\dots\leq j_{i}\leq t}w_{H}(\bm{w_{j_{1}}}*\cdots*\bm{w_{j_{i}}}*\bm{z}). (140)

We now use induction. Assume for 1it11\leq i\leq t-1, we have

lmir21max{r1,mir2}+i={mir21r1+i, if r1+ir2m,i=mr1r2+1, if (i1)r2mr1<ir2.\displaystyle l\leq\left\lfloor\frac{m-ir_{2}-1}{\max\{r_{1},m-ir_{2}\}}\right\rfloor+i=\left\{\begin{array}[]{lc}\left\lfloor\frac{m-ir_{2}-1}{r_{1}}\right\rfloor+i,&\text{ if }r_{1}+ir_{2}\leq m,\\ i=\left\lfloor\frac{m-r_{1}}{r_{2}}\right\rfloor+1,&\text{ if }(i-1)r_{2}\leq m-r_{1}<ir_{2}.\end{array}\right. (143)

Note that for 1it11\leq i\leq t-1, 𝒘𝒋𝟏𝒘𝒋𝒊\bm{w_{j_{1}}}*\cdots*\bm{w_{j_{i}}} corresponds to a monomial with degree s′′min{m,ir}s^{\prime\prime}\leq\min\{m,ir\}, hence 𝒘𝒋𝟏𝒘𝒋𝒊𝒛\bm{w_{j_{1}}}*\cdots*\bm{w_{j_{i}}}*\bm{z} is a codeword in RM(min{r1,ms′′},ms′′\min\{r_{1},m-s^{\prime\prime}\},m-s^{\prime\prime}) supported on 𝒘𝒋𝟏𝒘𝒋𝒊\bm{w_{j_{1}}}*\cdots*\bm{w_{j_{i}}}. Then, we have

2mir21max{r1,mir2}+i2iwH(𝒘𝒋𝟏𝒘𝒋𝒊𝒛),2^{\left\lfloor\frac{m-ir_{2}-1}{\max\{r_{1},m-ir_{2}\}}\right\rfloor+i}\mid 2^{i}w_{H}(\bm{w_{j_{1}}}*\cdots*\bm{w_{j_{i}}}*\bm{z}), (144)

in which the bound on the exponent is tight since we can choose 𝒘𝟏,,𝒘𝒊\bm{w_{1}},\cdots,\bm{w_{i}} to be evulations vectors corresponding to ii disjoint monomials of degree r2r_{2}. Hence, 2l12^{l-1} divides all terms in (140) for i=1,2,,t1i=1,2,\dots,t-1. Hence, for the last term, we must have

2l1|2t1wH(𝒘𝟏𝒘𝒕𝒛),2^{l-1}|2^{t-1}w_{H}(\bm{w_{1}}*\cdots*\bm{w_{t}}*\bm{z}), (145)

which implies that

lmtr21max{r1,mtr2}+t={mtr21r1+t, if r1+tr2m,t=mr1r2+1, if (t1)r2mr1<tr2,\displaystyle l\leq\left\lfloor\frac{m-tr_{2}-1}{\max\{r_{1},m-tr_{2}\}}\right\rfloor+t=\left\{\begin{array}[]{lc}\left\lfloor\frac{m-tr_{2}-1}{r_{1}}\right\rfloor+t,&\text{ if }r_{1}+tr_{2}\leq m,\\ t=\left\lfloor\frac{m-r_{1}}{r_{2}}\right\rfloor+1,&\text{ if }(t-1)r_{2}\leq m-r_{1}<tr_{2},\end{array}\right. (148)

and the induction is complete. Note that since r1>r2r_{1}>r_{2}, we have

mtr21r1+tmr21r1+1 for t1,\left\lfloor\frac{m-tr_{2}-1}{r_{1}}\right\rfloor+t\geq\left\lfloor\frac{m-r_{2}-1}{r_{1}}\right\rfloor+1\text{ for }t\geq 1, (149)

and the necessary condition reduces to

lmin{mr21r1+1,mr1r2+1}.l\leq\min\left\{\left\lfloor\frac{m-r_{2}-1}{r_{1}}\right\rfloor+1,\left\lfloor\frac{m-r_{1}}{r_{2}}\right\rfloor+1\right\}. (150)

To prove the sufficiency of the case r20r_{2}\neq 0, we simply reverse the steps. ∎

Remark 15 (Puncturing RM codes by removing the first coordinate).

Consider the classical RM(r,m)(r,m) code, and two elementary operations on its generator matrix: 1. removing the first column which is [1,0,,0]T[1,0,\dots,0]^{T}; 2. removing the first row of all 1s. After either of the two operations, we observe that 2(m1)22^{\lfloor\frac{(m-1)}{2}\rfloor} is still the highest power of 22 that divides all of its weights. Hence, the RM constructions described in Theorem 14 can be extended to punctured RM codes. If operation 1 is applied on 𝒞1=RM(r1,m)\mathcal{C}_{1}=\mathrm{RM}(r_{1},m), and operations 1 and 2 are applied on 𝒞2=RM(r2,m)\mathcal{C}_{2}=\mathrm{RM}(r_{2},m), then we can relax the relation between r1r_{1} and r2r_{2} as r1r2r_{1}\geq r_{2}. It follows from the same arguments that the resulting [[2m1,jr2+1r1(mj)+1,2min{r2+1,mr1}1]][\![2^{m}-1,\sum_{j-r_{2}+1}^{r_{1}}\binom{m}{j}+1,2^{\min\{r_{2}+1,m-r_{1}\}}-1]\!] CSS code is preserved by RZ(π2l1)R_{Z}(\frac{\pi}{2^{l-1}}) with the same constraint on ll as described in (131). This family contains the [[2m1,1,3]][\![2^{m}-1,1,3]\!] triorthogonal codes described in [9].

Remark 16 (QRM(r,m)(r,m) Codes).

When r1=rr_{1}=r and r2=r1r_{2}=r-1, this family of CSS codes coincides with the QRM(r,mr,m) [[2m,(mr),2min{r,mr}]][\![2^{m},\binom{m}{r},2^{\min\{r,m-r\}}]\!] codes constructed in [22] and [35, Theorem 19]. The code QRM(r,mr,m) is preserved by RZ(2π2m/r)R_{Z}(\frac{2\pi}{2^{m/r}}) if 1rm/21\leq r\leq m/2 and rmr\mid m. When r2=0r_{2}=0, we obtain the [[2m,m,2]][\![2^{m},m,2]\!] family that is preserved by RZ(2π2m)R_{Z}(\frac{2\pi}{2^{m}}). If r20r_{2}\neq 0, since rmr\mid m, we have

l\displaystyle l =mr=min{mrr+1,m1r1}\displaystyle=\frac{m}{r}=\min\left\{\left\lfloor\frac{m-r}{r}\right\rfloor+1,\left\lfloor\frac{m-1}{r-1}\right\rfloor\right\}
=min{m(r1)1r+1,mrr1+1},\displaystyle=\min\left\{\left\lfloor\frac{m-(r-1)-1}{r}\right\rfloor+1,\left\lfloor\frac{m-r}{r-1}\right\rfloor+1\right\}, (151)

which satisfies the necessary and sufficient conditions in (131).

We now illustrate Theorem 7 and Theorem 12 through two CSS codes preserved by RZ(π4)R_{Z}\left(\frac{\pi}{4}\right), one with a single logical qubit, the other with multiple logical quibts.

Example 6 (The [[15,1,3]][\![15,1,3]\!] punctured quantum Reed-Muller code [24, 10]).

Consider the CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) code defined by 𝒞2=x1,x2,x3,x4\mathcal{C}_{2}=\langle x_{1},x_{2},x_{3},x_{4}\rangle and 𝒞1=x1,x2,x3,x4,x1x2,x1x3,x1x4,x2x3,x2x4,x3x4\mathcal{C}_{1}^{\perp}=\langle x_{1},x_{2},x_{3},x_{4},x_{1}x_{2},x_{1}x_{3},x_{1}x_{4},x_{2}x_{3},x_{2}x_{4},x_{3}x_{4}\rangle, with the first coordinate removed in both 𝒞2\mathcal{C}_{2} and 𝒞1\mathcal{C}_{1}^{\perp}. It is well-known [10, 35] that RZ(π4)R_{Z}(\frac{\pi}{4}) preserves the CSS codespace when the signs of ZZ-stabilizers are trivial. Since 8wH(𝒗)8\mid w_{H}(\bm{v}), for 𝒗RM(1,4)\bm{v}\in\mathrm{RM}(1,4) and 4wH(𝒖)4\mid w_{H}(\bm{u}) for 𝒖RM(2,4)\bm{u}\in\mathrm{RM}(2,4)), the code satisfies the divisibility conditions in Theorem 12. We compute the induced logical operator by computing the generator coefficients for the zero syndrome. Note that 𝒞2/𝒞1={𝟎,𝟏}\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}=\{\bm{0},\bm{1}\}. The weight enumerators of 𝒞1\mathcal{C}_{1} and 𝒞1+𝟏\mathcal{C}_{1}+\bm{1} are given by

P𝒞1(x,y)=P𝒞1+𝟏(x,y)\displaystyle P_{\mathcal{C}_{1}}(x,y)=P_{\mathcal{C}_{1}+\bm{1}}(x,y)
=x15+15x8y7+15x7y8+y15.\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\ =x^{15}+15x^{8}y^{7}+15x^{7}y^{8}+y^{15}.

We have

A𝟎,𝟎(π4)\displaystyle A_{\bm{0},\bm{0}}\left(\frac{\pi}{4}\right) =132(2cos15π8+30cosπ8)=cosπ8,\displaystyle=\frac{1}{32}\left(2\cos\frac{15\pi}{8}+30\cos\frac{\pi}{8}\right)=\cos\frac{\pi}{8},
A𝟎,𝟏(π4)\displaystyle A_{\bm{0},\bm{1}}\left(\frac{\pi}{4}\right) =ısinπ8.\displaystyle=\imath\sin\frac{\pi}{8}. (152)

The constraint on generator coefficients in (119) is satisfied:

𝜸{𝟎,𝟏}|A𝟎,𝜸(π4)|2=(cosπ8)2+(sinπ8)2=1.\displaystyle\sum_{\bm{\gamma}\in\{\bm{0},\bm{1}\}}\left|A_{\bm{0},\bm{\gamma}}\left(\frac{\pi}{4}\right)\right|^{2}=\left(\cos\frac{\pi}{8}\right)^{2}+\left(\sin\frac{\pi}{8}\right)^{2}=1.

It follows from (121) that the logical operator induced by RZ(π4)R_{Z}\left(\frac{\pi}{4}\right) is

RZL(π4)\displaystyle R_{Z}^{L}\left(\frac{\pi}{4}\right) =A𝟎,𝟎(π4)IL+A𝟎,𝟏(π4)ZL\displaystyle=A_{\bm{0},\bm{0}}\left(\frac{\pi}{4}\right)I^{L}+A_{\bm{0},\bm{1}}\left(\frac{\pi}{4}\right)Z^{L}
=cosπ8IL+ısinπ8ZL=(T)L.\displaystyle=\cos\frac{\pi}{8}I^{L}+\imath\sin\frac{\pi}{8}Z^{L}=(T^{\dagger})^{L}.
Example 7 (The [[8,3,2]][\![8,3,2]\!] code).

The [[8,3,2]][\![8,3,2]\!] color code [14] is defined on 88 qubits which we identify with vertices of the cube. All vertices participate in the X-stabilizer and generators of the Z-stabilizers can be identified with 4 independent faces of the cube. The signs of all the stabilizers are positive. The [[8,3,2]][\![8,3,2]\!] color code can also be thought as a Reed-Muller CSS(X,𝒞2={𝟎,𝟏};Z,𝒞1=RM(1,3)X,\leavevmode\nobreak\ \mathcal{C}_{2}=\{\bm{0,\bm{1}}\};\leavevmode\nobreak\ Z,\leavevmode\nobreak\ \mathcal{C}_{1}^{\perp}=\text{RM}(1,3)) code with generator matrix

GS=[𝟏11111111000011110011001101010101].\displaystyle G_{S}=\left[\begin{array}[]{c|cccccccc}\bm{1}&&&&&&&&\\ \hline\cr&1&1&1&1&1&1&1&1\\ &0&0&0&0&1&1&1&1\\ &0&0&1&1&0&0&1&1\\ &0&1&0&1&0&1&0&1\\ \end{array}\right]. (158)

The [[8,3,2]][\![8,3,2]\!] code can be used in magic state distillation for the controlled-controlled-ZZ (CCZ) gate in the third-level of Clifford hierarchy. To verify that the code is preserved by RZ(π4)R_{Z}\left(\frac{\pi}{4}\right) and the induced logical operator is CCZZ (up to some logical Pauli ZLZ^{L}), we first compute the generator coefficients corresponding to the trivial syndrome. The weight enumerators of 𝒞1\mathcal{C}_{1}^{\perp} and 𝒞1+𝜸\mathcal{C}_{1}^{\perp}+\bm{\gamma} for 𝜸𝒞2/𝒞1{𝟎}\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}\setminus\{\bm{0}\} are given by

P𝒞1(x,y)\displaystyle P_{\mathcal{C}_{1}^{\perp}}(x,y) =x8+14x4y4+y8,\displaystyle=x^{8}+14x^{4}y^{4}+y^{8},
P𝒞1+𝜸(x,y)\displaystyle P_{\mathcal{C}_{1}^{\perp}+\bm{\gamma}}(x,y) =4x6y2+8x4y4+4x2y6,\displaystyle=4x^{6}y^{2}+8x^{4}y^{4}+4x^{2}y^{6},

so that

A𝟎,𝟎(π4)=34, and A𝟎,𝜸𝟎(π4)=14\displaystyle A_{\bm{0},\bm{0}}\left(\frac{\pi}{4}\right)=\frac{3}{4},\text{ and }A_{\bm{0},\bm{\gamma}\neq\bm{0}}\left(\frac{\pi}{4}\right)=-\frac{1}{4} (159)

for all the seven non-zero 𝜸𝒞2/𝒞1\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}. Then,

γ𝒞2/𝒞1|A𝟎,𝜸(π4)|2=(34)2+7(14)2=1,\displaystyle\sum_{\gamma\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\left|A_{\bm{0},\bm{\gamma}}\left(\frac{\pi}{4}\right)\right|^{2}=\left(\frac{3}{4}\right)^{2}+7\cdot\left(-\frac{1}{4}\right)^{2}=1,

so (119) holds, and the induced logical operator is

RZL(π4)\displaystyle R_{Z}^{L}\left(\frac{\pi}{4}\right) =𝜶𝔽23A𝟎,g(𝜶)(π4)E(𝟎,𝜶)\displaystyle=\sum_{\bm{\alpha}\in\mathbb{F}_{2}^{3}}A_{\bm{0},g(\bm{\alpha)}}\left(\frac{\pi}{4}\right)E(\bm{0},\bm{\alpha})
(ZLILZL)CCZL.\displaystyle\equiv(Z^{L}\otimes I^{L}\otimes Z^{L})\circ\mathrm{CC}Z^{L}. (160)

5.2.2 Generator Coefficients and Trigonometric Identities

When θ=π2l\theta=\frac{\pi}{2^{l}} for some integer ll, Rengaswamy et al. [35] derived necessary and sufficient conditions for a stabilizer code to be invariant under RZ(θ)R_{Z}(\theta). This derivation depends on prior work characterizing conjugates of arbitrary Pauli matrices by RZ(π2l)R_{Z}(\frac{\pi}{2^{l}}) [36]. The necessary and sufficient conditions provided in [35, Theorem 17] are expressed as two types of trigonometric identity. We now show that our constraint on generator coefficients is equivalent to the first trigonometric identity, and that the second trigonometric identity follows from the first. Our main tool is the MacWilliams Identities [27], and our analysis extends from CSS codes to general stabilizer codes.

We demonstrate equivalence through a sequence of three lemmas.

Lemma 17.

Given a CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) code, let ={𝐳𝒞1:ϵ𝐳=1}\mathcal{B}=\{\bm{z}\in\mathcal{C}_{1}^{\perp}:\epsilon_{\bm{z}}=1\} and =𝒞1,𝐲\mathcal{B}^{\perp}=\langle\mathcal{C}_{1},\bm{y}\rangle. For all nontrivial 𝐰𝒞2\bm{w}\in\mathcal{C}_{2}, define 𝒟𝐰{𝐰𝐯:𝐯𝒞1}\mathcal{D}_{\bm{w}}\coloneqq\{\bm{w}*\bm{v}:\bm{v}\in\mathcal{C}_{1}\}. Let θ(0,2π)\theta\in(0,2\pi). Then, (119) holds if and only if for all non-zero 𝐰𝒞2\bm{w}\in\mathcal{C}_{2}

1|𝒟𝒘|𝒙𝒟𝒘+𝒘𝒚(eıθ)wH(𝒘)2wH(𝒙)=1.\frac{1}{|\mathcal{D}_{\bm{w}}|}\sum_{\bm{x}\in\mathcal{D}_{\bm{w}}+\bm{w}*\bm{y}}\left(e^{\imath\theta}\right)^{w_{H}(\bm{w})-2w_{H}(\bm{x})}=1. (161)
Proof.

See Appendix C.9. ∎

The support of a binary vector 𝒙\bm{x} is the set of coordinates for which the corresponding entry is non-zero. Given two binary vectors 𝒙\bm{x}, 𝒚\bm{y}, we write 𝒙𝒚\bm{x}\preceq\bm{y} to mean that the support of 𝒙\bm{x} is contained in the support of 𝒚\bm{y}. Let supp(𝒙)\mathrm{supp}(\bm{x}) be the support of 𝒙\bm{x}. We define 𝒚|supp(𝒙)𝔽2wH(𝒙)\bm{y}|_{\mathrm{supp}(\bm{x})}\in\mathbb{F}_{2}^{w_{H}(\bm{x})} to be the truncated binary vector that drops all the coordinates outside supp(𝒙)\mathrm{supp}(\bm{x}). Given a space 𝒞\mathcal{C}, we denote proj𝒙(𝒞){𝒗𝒞:𝒗𝒙}\mathrm{proj}_{\bm{x}}(\mathcal{C})\coloneqq\{\bm{v}\in\mathcal{C}:\bm{v}\preceq\bm{x}\}. The next lemma finds equivalent representations of the cosets 𝒟𝒘+𝒘𝒚\mathcal{D}_{\bm{w}}+\bm{w}*\bm{y} for non-zero 𝒘𝒞2\bm{w}\in\mathcal{C}_{2}.

Lemma 18.

Given a CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) code, define 𝒟𝐰\mathcal{D}_{\bm{w}} and 𝐲\bm{y} as above. For any non-zero 𝐰𝒞2\bm{w}\in\mathcal{C}_{2}, define 𝒵𝐰{𝐳|supp(𝐰)𝔽2wH(𝐰):𝐳𝒞1 and 𝐳𝐰}\mathcal{Z}_{\bm{w}}\coloneqq\{\bm{z}\big{|}_{\mathrm{supp}(\bm{w})}\in\mathbb{F}_{2}^{w_{H}(\bm{w})}:\bm{z}\in\mathcal{C}_{1}^{\perp}\text{ and }\bm{z}\preceq\bm{w}\} and 𝐰={𝐯𝒵𝐰:ϵ𝐯=1}\mathcal{B}_{\bm{w}}=\{\bm{v}\in\mathcal{Z}_{\bm{w}}:\epsilon_{\bm{v}}=1\}. Define 𝒵~𝐰𝔽2n\tilde{\mathcal{Z}}_{\bm{w}}\subset\mathbb{F}_{2}^{n} (resp. ~𝐰𝔽2n\tilde{\mathcal{B}}_{\bm{w}}\subset\mathbb{F}_{2}^{n}) by adding all the zero coordinates outside supp(𝐰)\mathrm{supp}(\bm{w}) back into 𝒵𝐰\mathcal{Z}_{\bm{w}} (resp. 𝐰\mathcal{B}_{\bm{w}}). Note that dim(proj𝐰(~𝐰))=dim(proj𝐰(𝒵~𝐰))+1\dim(\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{B}}_{\bm{w}}^{\perp}))=\dim(\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp}))+1. Define 𝐲𝔽2n\bm{y}^{\prime}\in\mathbb{F}_{2}^{n} such that proj𝐰(~𝐰)=proj𝐰(𝒵~𝐰),𝐲\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{B}}_{\bm{w}}^{\perp})=\langle\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp}),\bm{y}^{\prime}\rangle. Then for all nontirvial 𝐰𝒞2\bm{w}\in\mathcal{C}_{2},

𝒟𝒘+𝒘𝒚=proj𝒘(𝒵~𝒘)+𝒚.\mathcal{D}_{\bm{w}}+\bm{w}*\bm{y}=\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp})+\bm{y}^{\prime}. (162)
Proof.

See Appendix C.10. ∎

Lemma 19.

Given a CSS(X,𝒞2;Z,𝒞1X,\mathcal{C}_{2};Z,\mathcal{C}_{1}^{\perp}) code, let ={𝐳𝒞1:ϵ𝐳=1}\mathcal{B}=\{\bm{z}\in\mathcal{C}_{1}^{\perp}:\epsilon_{\bm{z}}=1\}, and define 𝒵𝐰\mathcal{Z}_{\bm{w}}, 𝒵~𝐰\tilde{\mathcal{Z}}_{\bm{w}}, 𝐰\mathcal{B}_{\bm{w}}, ~𝐰\tilde{\mathcal{B}}_{\bm{w}}, 𝐲\bm{y^{\prime}} as above. Recall that proj𝐰(~𝐰)=proj𝐰(𝒵~𝐰),𝐲\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{B}}_{\bm{w}}^{\perp})=\langle\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp}),\bm{y}^{\prime}\rangle. For any θ\theta and any nontrivial 𝐰𝒞2\bm{w}\in\mathcal{C}_{2},

1=\displaystyle 1=
1|proj𝒘(𝒵~𝒘)|𝒗proj𝒘(𝒵~𝒘)+𝒚(eiθ)wH(𝒘)2wH(𝒗),\displaystyle\frac{1}{\left|\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp})\right|}\sum_{\bm{v}\in\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp})+\bm{y^{\prime}}}\left(e^{i\theta}\right)^{w_{H}(\bm{w})-2w_{H}(\bm{v})}, (163)

if and only if

𝒗𝒵𝒘ϵ𝒗(ıtanθ)wH(𝒗)=(secθ)wH(𝒘).\sum_{\bm{v}\in\mathcal{Z}_{\bm{w}}}\epsilon_{\bm{v}}\left(\imath\tan\theta\right)^{w_{H}(\bm{v})}=\left(\sec\theta\right)^{w_{H}(\bm{w})}. (164)
Proof.

See Appendix C.11. ∎

Theorem 20.

The unitary RZ(θ)R_{Z}(\theta) realizes a logical operation on the codespace V(S)V(S) of an [[n,k,d]][\![n,k,d]\!] CSS(X,C2;Z,C1X,C_{2};Z,C_{1}^{\perp}) code if and only if for all non-zero 𝐰𝒞2\bm{w}\in\mathcal{C}_{2},

𝒗𝒵𝒘ϵ𝒗(ıtanθ)wH(𝒗)=(secθ)wH(𝒘).\sum_{\bm{v}\in\mathcal{Z}_{\bm{w}}}\epsilon_{\bm{v}}\left(\imath\tan\theta\right)^{w_{H}(\bm{v})}=\left(\sec\theta\right)^{w_{H}(\bm{w})}. (165)
Proof.

By Lemma 18, we know (161) equals (19). It now follows from Lemma 17 and Lemma 19 that (119) equals (165). It then follows directly from Theorem 7. ∎

Remark 21.

Rengaswamy [35, Theorem 17] derived a pair of necessary and sufficient conditions for a CSS code to be invariant under RZ(π2l)R_{Z}(\frac{\pi}{2^{l}}). Theorem 20 shows that the first of these conditions implies the second and also generalizes the first condition to arbitrary angle θ\theta. Note that the trigonometric conditions are local whereas the square sum constraint on generator coefficients is global.

6 Conclusion

We have introduced a framework that describes the process of preparing a code state, applying a diagonal physical gate, measuring a code syndrome, and applying a Pauli correction. We have described the interaction of code states and physical gates in terms of generator coefficients determined by the induced logical operator, and have shown that this interaction depends strongly on the signs of ZZ-stabilizers in a CSS code. We have derived necessary and sufficient conditions for a diagonal gate to preserve the code space of a CSS code, and have provided an explicit expression of its induced logical operator. When the diagonal gate is a transversal ZZ-rotation through an angle θ\theta, we derived a simple global condition that can be expressed in terms of divisibility of weights in the two classical codes that determine the CSS code. When all signs in the CSS code are positive, we have proved the necessary and sufficient conditions for Reed-Muller component codes to construct families of CSS codes invariant under transversal Z-rotation through π/2l\pi/2^{l}. It remains open to investigate the constraints for a CSS code determined by two classical decreasing monomial codes to be invariant under transversal π/2l\pi/2^{l} ZZ-rotation.

The generator coefficient framework provides a tool to analyze the evolution under any given diagonal gate of stabilizer codes with arbitrary signs, and we are working to characterize more valid CSS codes can be used in magic state distillation.

Acknowledgement

We would like to thank Ken Brown, Dripto Debroy, and Felice Manganiello for helpful discussions. Ken Brown suggested we look at the method of simulating coherent noise for surface codes described in [8], and this led to our generator coefficient framework, and its use in analyzing the average logical channel. Dripto Debroy encouraged us to interpret the decoherence-free subspace appearing in Example 2 in terms of entanglement of initial states and syndrome measurements. Felice Manganiello shared his construction of CSS codes with RM components that are preserved by a transversal TT gate, and this led to our construction of CSS codes with RM components that are preserved by transversal π/2l\pi/2^{l} ZZ-rotations.

The work of the authors was supported in part by NSF under grants CCF-1908730 and CCF-2106213.

References

  • [1] Jonas T. Anderson and Tomas Jochym-O’Connor. Classification of transversal gates in qubit stabilizer codes. Quantum Info. Comput., 16(9–10):771–802, Jul 2016. doi:10.26421/qic16.9-10-3.
  • [2] Hussain Anwar, Earl T. Campbell, and Dan E Browne. Qutrit magic state distillation. New J. Phys., 14(6):063006, 2012. doi:10.1088/1367-2630/14/6/063006.
  • [3] James Ax. Zeroes of polynomials over finite fields. Am. J. Math., 86(2):255–261, 1964. doi:10.2307/2373163.
  • [4] Salman Beigi and Peter W Shor. 𝒞3\mathcal{C}_{3}, semi-Clifford and generalized semi-Clifford operations. Quantum Inf. Comput., 10(1&2), 2010. doi:10.26421/QIC10.1-2-4.
  • [5] Ingemar Bengtsson, Kate Blanchfield, Earl T. Campbell, and Mark Howard. Order 3 symmetry in the Clifford hierarchy. J. Phys. A Math. Theor., 47(45):455302, 2014. doi:10.1088/1751-8113/47/45/455302.
  • [6] Yuri L. Borissov. On Mceliece’s result about divisibility of the weights in the binary Reed-Muller codes. In Seventh International Workshop, Optimal Codes and related topics, pages 47–52, 2013. URL: http://www.moi.math.bas.bg/oc2013/a7.pdf.
  • [7] P. Oscar Boykin, Tal Mor, Matthew Pulver, Vwani Roychowdhury, and Farrokh Vatan. On universal and fault-tolerant quantum computing: a novel basis and a new constructive proof of universality for shor’s basis. In 40th Annu. Symp. Found. Comput. Sci. (Cat. No.99CB37039), pages 486–494. IEEE, 1999. doi:10.1109/sffcs.1999.814621.
  • [8] Sergey Bravyi, Matthias Englbrecht, Robert König, and Nolan Peard. Correcting coherent errors with surface codes. Npj Quantum Inf., 4(1):1–6, 2018. doi:10.1038/s41534-018-0106-y.
  • [9] Sergey Bravyi and Jeongwan Haah. Magic-state distillation with low overhead. Phys. Rev. A, 86(5):052329, 2012. doi:10.1103/physreva.86.052329.
  • [10] Sergey Bravyi and Alexei Kitaev. Universal quantum computation with ideal Clifford gates and noisy ancillas. Phys. Rev. A, 71(2):022316, 2005. doi:10.1103/physreva.71.022316.
  • [11] Robert A. Calderbank, Eric M. Rains, Peter W. Shor, and Neil J.A. Sloane. Quantum error correction via codes over GF{GF}(4). IEEE Trans. Inf. Theory, 44(4):1369–1387, 1998. doi:10.1109/isit.1997.613213.
  • [12] Robert A. Calderbank and Peter W. Shor. Good quantum error-correcting codes exist. Phys. Rev. A, 54:1098–1105, Aug 1996. doi:10.1103/physreva.54.1098.
  • [13] Earl T. Campbell, Hussain Anwar, and Dan E Browne. Magic-state distillation in all prime dimensions using quantum Reed-Muller codes. Phys. Rev. X, 2(4):041021, 2012. doi:10.1103/physrevx.2.041021.
  • [14] Earl T. Campbell and Mark Howard. Unified framework for magic state distillation and multiqubit gate synthesis with reduced resource cost. Phys. Rev. A, 95(2):022316, 2017. doi:10.1103/physreva.95.022316.
  • [15] Shawn X. Cui, Daniel Gottesman, and Anirudh Krishna. Diagonal gates in the Clifford hierarchy. Phys. Rev. A, 95(1):012329, 2017. doi:10.1103/physreva.95.012329.
  • [16] Dripto M. Debroy, Laird Egan, Crystal Noel, Andrew Risinger, Daiwei Zhu, Debopriyo Biswas, Marko Cetina, Chris Monroe, and Kenneth R. Brown. Optimizing stabilizer parities for improved logical qubit memories. Phys. Rev. Lett., 127(24), Dec 2021. doi:10.1103/physrevlett.127.240501.
  • [17] Bryan Eastin and Emanuel Knill. Restrictions on transversal encoded quantum gate sets. Phys. Rev. Lett., 102(11):110502, 2009. doi:10.1103/physrevlett.102.110502.
  • [18] Daniel Gottesman. Stabilizer codes and quantum error correction. California Institute of Technology, 1997. doi:10.48550/arXiv.quant-ph/9705052.
  • [19] Daniel Gottesman. The heisenberg representation of quantum computers. arXiv preprint quant-ph/9807006, 1998. doi:10.48550/arXiv.quant-ph/9807006.
  • [20] Daniel Gottesman and Isaac L. Chuang. Demonstrating the viability of universal quantum computation using teleportation and single-qubit operations. Nature, 402(6760):390–393, 1999. doi:10.1038/46503.
  • [21] Jeongwan Haah. Towers of generalized divisible quantum codes. Phys. Rev. A, 97(4):042327, 2018. doi:10.1103/physreva.97.042327.
  • [22] Jeongwan Haah and Matthew B. Hastings. Codes and protocols for distilling tt, controlled-ss, and toffoli gates. Quantum, 2:71, 2018. doi:10.22331/q-2018-06-07-71.
  • [23] Jingzhen Hu, Qingzhong Liang, Narayanan Rengaswamy, and Robert Calderbank. Mitigating coherent noise by balancing weight-22 ZZ-stabilizers. IEEE Trans. Inf. Theory, 68(3):1795–1808, 2022. doi:10.1109/tit.2021.3130155.
  • [24] Emanuel Knill, Raymond Laflamme, and Wojciech Zurek. Accuracy threshold for quantum computation. arXiv quant-ph/9610011, 1996. doi:10.48550/arXiv.quant-ph/9610011.
  • [25] Anirudh Krishna and Jean-Pierre Tillich. Towards low overhead magic state distillation. Phys. Rev. Lett., 123(7):070507, 2019. doi:10.1103/physrevlett.123.070507.
  • [26] Andrew J. Landahl and Chris Cesare. Complex instruction set computing architecture for performing accurate quantum zz rotations with less magic. arXiv preprint arXiv:1302.3240, 2013. doi:10.48550/arXiv.1302.3240.
  • [27] Florence J. MacWilliams. A theorem on the distribution of weights in a systematic code. Bell Labs Tech. J., 42(1):79–94, January 1963. doi:10.1002/j.1538-7305.1963.tb04003.x.
  • [28] Florence J. MacWilliams and Neil J. A. Sloane. The theory of error correcting codes, volume 16. Elsevier, 1977.
  • [29] Robert J. McEliece. On periodic sequences from GF(qq). J. Comb. Theory Ser. A., 10(1):80–91, 1971. doi:10.1016/0097-3165(71)90066-5.
  • [30] Robert J. McEliece. Weight congruences for p-ary cyclic codes. Discrete Math, 3(1):177–192, 1972. doi:10.1016/0012-365X(72)90032-5.
  • [31] Sepehr Nezami and Jeongwan Haah. Classification of small triorthogonal codes. Phys. Rev. A, 106:012437, Jul 2022. doi:10.1103/PhysRevA.106.012437.
  • [32] Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information: 10th Anniversary Edition. Cambridge University Press, 2011.
  • [33] Tefjol Pllaha, Narayanan Rengaswamy, Olav Tirkkonen, and Robert A. Calderbank. Un-weyl-ing the Clifford hierarchy. Quantum, 4:370, 2020. doi:10.22331/q-2020-12-11-370.
  • [34] Ben W. Reichardt. Quantum universality from magic states distillation applied to css codes. Quantum Inf. Process., 4(3):251–264, 2005. doi:10.1007/s11128-005-7654-8.
  • [35] Narayanan Rengaswamy, Robert A. Calderbank, Michael Newman, and Henry D. Pfister. On optimality of CSS codes for transversal TT. IEEE J. Sel. Areas in Inf. Theory, 1(2):499–514, 2020. doi:10.1109/jsait.2020.3012914.
  • [36] Narayanan Rengaswamy, Robert A. Calderbank, and Henry D. Pfister. Unifying the Clifford hierarchy via symmetric matrices over rings. Phys. Rev. A, 100(2):022304, 2019. doi:10.1103/physreva.100.022304.
  • [37] A. M. Steane. Simple quantum error-correcting codes. Phys. Rev. A, 54(6):4741–4751, 1996. doi:10.1103/PhysRevA.54.4741.
  • [38] Michael Vasmer and Aleksander Kubica. Morphing quantum codes. PRX Quantum, 3(3), Aug 2022. doi:10.1103/prxquantum.3.030319.
  • [39] Christophe Vuillot and Nikolas P. Breuckmann. Quantum pin codes. IEEE Trans. Inf. Theory, 68(9):5955–5974, Sep 2022. doi:10.1109/tit.2022.3170846.
  • [40] Mark M Wilde. Quantum information theory. Cambridge University Press, 2013.
  • [41] Paolo Zanardi and Mario Rasetti. Noiseless quantum codes. Phys. Rev. Lett., 79(17):3306, 1997. doi:10.1103/PhysRevLett.79.3306.
  • [42] Bei Zeng, Xie Chen, and Isaac L. Chuang. Semi-Clifford operations, structure of 𝒞k\mathcal{C}_{k} hierarchy, and gate complexity for fault-tolerant quantum computation. Phys. Rev. A, 77(4):042313, 2008. doi:10.1103/physreva.77.042313.
  • [43] Bei Zeng, Andrew Cross, and Isaac L. Chuang. Transversality versus universality for additive quantum codes. IEEE Trans. Inf. Theory, 57(9):6272–6284, 2011. doi:10.1109/tit.2011.2161917.

Appendix A Magic State Distillation Using the Steane Code

We use the Steane code as an example to show the trade-off between fidelity and the probability of success in magic state distillation. Classical magic state distillation post-selects on the trivial syndrome without considering the error correction. If we follow this procedure, then the [[7,1,3]][\![7,1,3]\!] Steane code can be used to distill the state with linear convergence as described in Case 1. In Case 2, we try to increase the probability of success by introducing error-correction instead of post-selecting on the trivial syndrome. In Case 3, we consider only correcting one of non-trivial syndromes.

Case 1: Reichardt [34] calculated error rate by tracking evolution of code states. The generator coefficient framework makes it possible to calculate the output error rate by tracking operators.

  1. (i)

    Encode to get the |+¯|{\overline{+}}\rangle of the Steane codestate.

  2. (ii)

    Given seven copies of |A:=T|+=(|0+eıπ/4|1)/2|{A}\rangle:=T|+\rangle=(|0\rangle+e^{\imath\pi/4}|1\rangle)/\sqrt{2} and ancillary qubits, we can realize the phsyical transversal T7=[exp(ıπ8Z)]7T^{\otimes 7}=[\exp(-\imath\frac{\pi}{8}Z)]^{\otimes 7} with the help of Clifford gates and Pauli measurements. If the states |A|{A}\rangle are exact, the probability of observing the trivial syndrome is p𝝁=𝟎e=916p^{e}_{\bm{\bm{\mu}=\bm{0}}}=\frac{9}{16} and the probability of observing each non-trivial syndrome is p𝝁𝟎e=116p^{e}_{\bm{\bm{\mu}\neq\bm{0}}}=\frac{1}{16} (Take θ=π4\theta=\frac{\pi}{4} in (114)). When the trivial syndrome is observed, it follows from Example 1 that the induced logical operator is TL=exp(ıπ8ZL)T^{\dagger}_{L}=\exp(\imath\frac{\pi}{8}Z_{L}). We then apply a physical representation of the logical PPhase gate P¯\overline{P} to obtain |A¯=PLTL|+¯|{\overline{A}}\rangle=P_{L}T^{\dagger}_{L}|{\overline{+}}\rangle. In practice, each of the input magic states |A|{A}\rangle is noisy. We assume dephasing noise: ρ(1p)ρ+pZρZ\rho\to(1-p)\rho+pZ\rho Z with the same probability pp of a Pauli ZZ error for each of the seven physical qubits. The probability of observing the trivial syndrome involves two terms. The first term captures the event that upon observing the trivial syndrome 𝝁=𝟎\bm{\mu}=\bm{0}, the dephasing error is undetectable. The second term captures the event that upon observing the non-trivial syndrome 𝝁𝟎\bm{\mu}\neq\bm{0}, the dephasing error cancels the observed syndrome. The probability of success is given by

    P𝝁=𝟎\displaystyle P_{\bm{\mu}=\bm{0}} =p𝝁=𝟎eP(Z-error in 𝒞2)+𝝁𝟎p𝝁eP(Z-error in 𝒞2+𝝁)\displaystyle=p^{e}_{\bm{\bm{\mu}=\bm{0}}}P(Z\text{-error in }\mathcal{C}_{2}^{\perp})+\sum_{\bm{\mu}\neq\bm{0}}p^{e}_{\bm{\bm{\mu}}}P(Z\text{-error in }\mathcal{C}_{2}^{\perp}+\bm{\mu}) (166)
    =916𝒗𝒞2(1p)7wH(𝒗)pwH(𝒗)+𝝁𝟎116𝒗𝒞2+𝝁(1p)7wH(𝒗)pwH(𝒗)\displaystyle=\frac{9}{16}\sum_{\bm{v}\in\mathcal{C}_{2}^{\perp}}(1-p)^{7-w_{H}(\bm{v})}p^{w_{H}(\bm{v})}+\sum_{\bm{\mu}\neq\bm{0}}\frac{1}{16}\sum_{\bm{v}\in\mathcal{C}_{2}^{\perp}+\bm{\mu}}(1-p)^{7-w_{H}(\bm{v})}p^{w_{H}(\bm{v})} (167)
    =9161|𝒞2|𝒗𝒞2(12p)wH(𝒗)+7161|𝒞2|𝒗𝒞2(1)𝒗𝒆𝟏T(12p)wH(𝒗)\displaystyle=\frac{9}{16}\frac{1}{|\mathcal{C}_{2}|}\sum_{\bm{v}\in\mathcal{C}_{2}}(1-2p)^{w_{H}(\bm{v})}+\frac{7}{16}\frac{1}{|\mathcal{C}_{2}|}\sum_{\bm{v}\in\mathcal{C}_{2}}(-1)^{\bm{v}\bm{e_{1}}^{T}}(1-2p)^{w_{H}(\bm{v})} (168)
    =116(2+7(12p)4).\displaystyle=\frac{1}{16}\left(2+7(1-2p)^{4}\right). (169)

    Note that the 77 cosets corresponding to non-trivial syndromes have identical weight enumerators.

  3. (iii)

    If we observe the non-trivial syndrome 𝝁0\bm{\mu}\neq 0, we declare failure and restart. Upon observing the trivial syndrome, we decode and the output mixed state is

    ρout=1P𝝁=𝟎(pout0|AA|+pout1Z|AA|Z)\rho_{out}=\frac{1}{P_{\bm{\mu}=\bm{0}}}(p_{out}^{0}|{A}\rangle\langle{A}|+p_{out}^{1}Z|{A}\rangle\langle{A}|Z) (170)

    where

    pout0\displaystyle p_{out}^{0} =p𝝁=𝟎eP(Z-error in 𝒞1)+𝝁𝟎p𝝁eP(Z-error in 𝒞1+𝝁+𝜸 for 𝜸𝟎)\displaystyle=p^{e}_{\bm{\bm{\mu}=\bm{0}}}P(Z\text{-error in }\mathcal{C}_{1}^{\perp})+\sum_{\bm{\mu}\neq\bm{0}}p^{e}_{\bm{\bm{\mu}}}P(Z\text{-error in }\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}\text{ for }\bm{\gamma}\neq\bm{0}) (171)
    =916𝒗𝒞1(1p)nwH(𝒗)pwH(𝒗)+𝝁0116𝒗𝒞1+𝝁+𝟏(1p)nwH(𝒗)pwH(𝒗)\displaystyle=\frac{9}{16}\sum_{\bm{v}\in{\mathcal{C}_{1}^{\perp}}}(1-p)^{n-w_{H}(\bm{v})}p^{w_{H}(\bm{v})}+\sum_{\bm{\mu}\neq 0}\frac{1}{16}\sum_{\bm{v}\in{\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{1}}}(1-p)^{n-w_{H}(\bm{v})}p^{w_{H}(\bm{v})} (172)
    =132(2+7(12p)3+7(12p)4+2(12p)7).\displaystyle=\frac{1}{32}\left(2+7(1-2p)^{3}+7(1-2p)^{4}+2(1-2p)^{7}\right). (173)

    The first term captures the event that upon observing the the trivial syndrome 𝝁=𝟎\bm{\mu}=\bm{0}, the dephasing error acts as a ZZ-stabilizer (B𝝁=𝟎=34T¯B_{\bm{\mu}=\bm{0}}=\frac{3}{4}\bar{T}^{\dagger}). The second captures the event that upon observing the the non-trivial syndrome 𝝁𝟎\bm{\mu}\neq\bm{0}, the dephasing error lies in 𝒞1+𝝁+𝜸\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma} (B𝝁𝟎=14T¯Z¯B_{\bm{\mu}\neq\bm{0}}=\frac{1}{4}\bar{T}^{\dagger}\bar{Z}). In this case, the dephasing error appears as the error correction that maps back to the code space and results in a logical TT^{\dagger} gate. We now write the output error rate qq as a function of the initial error rate pp, and calculate its Taylor expansion at 0

    q(p)=1pout0P𝝁=𝟎=79p+1481p2+O(p3).q(p)=1-\frac{p_{out}^{0}}{P_{\bm{\mu}=\bm{0}}}=\frac{7}{9}p+\frac{14}{81}p^{2}+O(p^{3}). (174)

    This implies that the threshold for the initial error rate is 0.14640.1464... (the same as [34]), while that of the [[15,1,3]][\![15,1,3]\!] code is 0.1415..0.1415.. [10].

Case 2: Note that probability of success in Case 1 is upper bounded by 9/16=56.25%9/16=56.25\%. It is natural to ask whether we may introduce error correction to increase the probability of success. It follows from (102) that we can choose proper corrections based on syndromes (𝜸𝝁=Z¯\bm{\gamma_{\mu}}=\bar{Z} for 𝝁𝟎\bm{\mu}\neq\bm{0}) to obtain the logical operator TT^{\dagger} with probability 11 if the physical transversal TT is exact. The output error-rate now becomes

q(p)=1pout0=1P(Z-error in 𝒞1)=𝒗𝒞1(1p)nwH(𝒗)pwH(𝒗)=18(1+7(12p)4).\displaystyle q(p)=1-p^{0}_{out}=1-P(Z\text{-error in }\mathcal{C}_{1}^{\perp})=\sum_{\bm{v}\in{\mathcal{C}_{1}^{\perp}}}(1-p)^{n-w_{H}(\bm{v})}p^{w_{H}(\bm{v})}=\frac{1}{8}\left(1+7(1-2p)^{4}\right). (175)

The output error rate does not fall below the line y=xy=x in the positive orthant, and we say that the protocol does not converge.

Case 3: We balance Case 1 and Case 2 by implementing error correction for only one of the seven non-trivial syndromes, say 𝝁=𝒆𝟏\bm{\mu}=\bm{e_{1}}. Although the probability of success increases slightly to

PS=P𝝁=𝟎+P𝝁=𝒆𝟏=116(2+7(12p)4)+116(2(12p)4)=18(2+3(12p)4),\displaystyle P_{S}=P_{\bm{\mu}=\bm{0}}+P_{\bm{\mu}=\bm{e_{1}}}=\frac{1}{16}\left(2+7(1-2p)^{4}\right)+\frac{1}{16}\left(2-(1-2p)^{4}\right)=\frac{1}{8}\left(2+3(1-2p)^{4}\right), (176)

the prefactor of the linear term of the output error rate is greater than 1. We conclude that the protocol does not converge.

The same analysis can be performed for a code that is perfectly preserved by the transversal TT gate, such as the [[15,1,3]][\![15,1,3]\!] code. The analysis provides insight into the trade-off between the probability of success and the fidelity of the output magic states.

Appendix B Generator Coefficient Framework for Stabilizer codes

We described the generator coefficient framework for CSS code and we now extend it to arbitrary stabilizer codes. We consider a general stabilizer code generated by the matrix

G𝒮=[K00JD],\displaystyle G_{\mathcal{S}}=\left[\begin{array}[]{c c}K&0\\ \hline\cr 0&J\\ \hline\cr\lx@intercol\hfil D\hfil\lx@intercol\\ \end{array}\right], (180)

where D=(Dx,Dz)D=(D_{x},D_{z}) such that DxD_{x} is the XX-component of DD and DzD_{z} is the ZZ-component of DD. We assume that the row space of DD contains no non-zero vector 𝒄=(𝒄𝑿,𝒄𝒁)\bm{c}=(\bm{c_{X}},\bm{c_{Z}}) with 𝒄𝑿=𝟎\bm{c_{X}}=\bm{0} or 𝒄𝒁=𝟎\bm{c_{Z}}=\bm{0}. Assume the dimensions of KK, JJ, and DD are nx,nz,nxzn_{x},n_{z},n_{xz} respectively. Then, we have

Π𝒮=Π𝒮XΠ𝒮ZΠ𝒮XZ,\displaystyle\Pi_{\mathcal{S}}=\Pi_{\mathcal{S}_{X}}\Pi_{\mathcal{S}_{Z}}\Pi_{\mathcal{S}_{XZ}}, (181)

where

Π𝒮X=12nx𝒂𝒦=Kϵ(𝒂,𝟎)E(𝒂,𝟎),Π𝒮Z=12nz𝒃𝒥=Jϵ(𝟎,𝒃)E(𝟎,𝒃), and \Pi_{\mathcal{S}_{X}}=\frac{1}{2^{n_{x}}}\sum_{\bm{a}\in\mathcal{K}=\langle K\rangle}\epsilon_{(\bm{a},\bm{0})}E(\bm{a},\bm{0}),\leavevmode\nobreak\ \Pi_{\mathcal{S}_{Z}}=\frac{1}{2^{n_{z}}}\sum_{\bm{b}\in\mathcal{J}=\langle J\rangle}\epsilon_{(\bm{0},\bm{b})}E(\bm{0},\bm{b}),\text{ and } (182)
Π𝒮XZ=12nxz(𝒄,𝒅)𝒟=Dϵ(𝒄,𝒅)E(𝒄,𝒅).\Pi_{\mathcal{S}_{XZ}}=\frac{1}{2^{n_{xz}}}\sum_{(\bm{c},\bm{d})\in\mathcal{D}=\langle D\rangle}\epsilon_{(\bm{c},\bm{d})}E(\bm{c},\bm{d}). (183)

Let 𝒯K,Dx\mathcal{T}\coloneqq\langle K,D_{x}\rangle. Then, 𝒥𝒯𝔽2n\mathcal{J}\subset\mathcal{T}^{\perp}\subset\mathbb{F}_{2}^{n} as described below.

{𝟎}\{\bm{0}\}𝒞2\mathcal{C}_{2}𝒞1\mathcal{C}_{1}𝔽2n\mathbb{F}_{2}^{n}{𝟎}\{\bm{0}\}𝒞1\mathcal{C}_{1}^{\perp}𝒞2\mathcal{C}_{2}^{\perp}𝔽2n\mathbb{F}_{2}^{n}{𝟎}\{\bm{0}\}𝒦\mathcal{K}J,Dz\langle J,D_{z}\rangle^{\perp}𝔽2n\mathbb{F}_{2}^{n}{𝟎}\{\bm{0}\}𝒥\mathcal{J}𝒯=K,Dx\mathcal{T}^{\perp}=\langle K,D_{x}\rangle^{\perp}𝔽2n\mathbb{F}_{2}^{n}StabilizerCSS𝝁\bm{\mu}𝜸\bm{\gamma}𝝁\bm{\mu}𝜸\bm{\gamma}

Then (60) becomes

Π𝒮ZUZ\displaystyle\Pi_{\mathcal{S}_{Z}}U_{Z} =(12nz𝒃𝒥ϵ(𝟎,𝒃)E(𝟎,𝒃))(𝒗𝔽2nf(𝒗)E(𝟎,𝒗))\displaystyle=\left(\frac{1}{2^{n_{z}}}\sum_{\bm{b}\in\mathcal{J}}\epsilon_{(\bm{0},\bm{b})}E(\bm{0},\bm{b})\right)\left(\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}f(\bm{v})E(\bm{0},\bm{v})\right)
=12nz𝝁𝔽2n/𝒯𝜸𝒯/𝒥(𝒛𝒥+𝝁+𝜸ϵ(𝟎,𝒗)f(𝒛))𝒖𝒥+𝝁+𝜸ϵ(𝟎,𝒖)E(𝟎,𝒖),\displaystyle=\frac{1}{2^{n_{z}}}\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{T}^{\perp}}\sum_{\bm{\gamma}\in\mathcal{T}^{\perp}/\mathcal{J}}\left(\sum_{\bm{z}\in\mathcal{J}+\bm{\mu}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{v})}f(\bm{z})\right)\sum_{\bm{u}\in\mathcal{J}+\bm{\mu}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u}), (184)

and the generator coefficients of UZU_{Z} for the stabilizer code 𝒮\mathcal{S} are given by

A𝝁,𝜸𝒮𝒛𝒥+𝝁+𝜸ϵ(𝟎,𝒛)f(𝒛),A_{\bm{\mu},\bm{\gamma}}^{\mathcal{S}}\coloneqq\sum_{\bm{z}\in\mathcal{J}+\bm{\mu}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{z})}f(\bm{z}), (185)

where 𝝁𝔽2n/𝒯\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{T}^{\perp} and 𝜸𝒯/𝒥\bm{\gamma}\in\mathcal{T}^{\perp}/\mathcal{J}. These generalized generator coefficients inherit the properties described in Theorem 6, that is,

𝝁𝔽2n/𝒯𝜸𝒯/𝒥A𝝁,𝜸𝒮¯A𝝁,𝜼𝜸𝒮={1 if 𝜼=𝟎,0 if 𝜼𝟎,\displaystyle\sum_{{\bm{\mu}}\in\mathbb{F}_{2}^{n}/\mathcal{T}^{\perp}}\sum_{\bm{\gamma}\in\mathcal{T}^{\perp}/\mathcal{J}}\overline{A_{\bm{\mu},\bm{\gamma}}^{\mathcal{S}}}A_{\bm{\mu},\bm{\eta}\oplus\bm{\gamma}}^{\mathcal{S}}=\left\{\begin{array}[]{lc}1\leavevmode\nobreak\ \leavevmode\nobreak\ \text{ if }{\bm{\eta}}=\mathbf{0},\\ 0\leavevmode\nobreak\ \leavevmode\nobreak\ \text{ if }{\bm{\eta}}\neq\mathbf{0},\end{array}\right. (188)

for 𝜼𝒯/𝒥\bm{\eta}\in\mathcal{T}^{\perp}/\mathcal{J}. Grouping together the projectors Π𝒮X\Pi_{\mathcal{S}_{X}} and Π𝒮XZ\Pi_{\mathcal{S}_{XZ}}, we consider the new family of projectors

\displaystyle\mathcal{L} Π𝒮XΠ𝒮XZ\displaystyle\coloneqq\Pi_{\mathcal{S}_{X}}\Pi_{\mathcal{S}_{XZ}}
=(12nx𝒂𝒦=Kϵ(𝒂,𝟎)E(𝒂,𝟎))(12nxz(𝒄,𝒅)𝒟=Dϵ(𝒄,𝒅)E(𝒄,𝒅))\displaystyle=\left(\frac{1}{2^{n_{x}}}\sum_{\bm{a}\in\mathcal{K}=\langle K\rangle}\epsilon_{(\bm{a},\bm{0})}E(\bm{a},\bm{0})\right)\left(\frac{1}{2^{n_{xz}}}\sum_{(\bm{c},\bm{d})\in\mathcal{D}=\langle D\rangle}\epsilon_{(\bm{c},\bm{d})}E(\bm{c},\bm{d})\right)
=12nx+nxz𝒂𝒦,(𝒄,𝒅)𝒟ϵ(𝒂𝒄)ı𝒂𝒅T(1)𝒅(𝒂𝒄)TE(𝒂𝒄,𝒅).\displaystyle=\frac{1}{2^{n_{x}+n_{xz}}}\sum_{\begin{subarray}{c}\bm{a}\in\mathcal{K},\\ (\bm{c},\bm{d})\in\mathcal{D}\end{subarray}}\epsilon_{(\bm{a}\oplus\bm{c})}\imath^{-\bm{a}\bm{d}^{T}}(-1)^{\bm{d}(\bm{a}*\bm{c})^{T}}E(\bm{a}\oplus\bm{c},\bm{d}). (189)

For 𝝁𝔽2n/𝒯\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{T}^{\perp}, we write

(𝝁)(12nx𝒂𝒦=K(1)𝝁𝒂Tϵ(𝒂,𝟎)E(𝒂,𝟎))(12nxz(𝒄,𝒅)𝒟=D(1)𝝁𝒄Tϵ(𝒄,𝒅)E(𝒄,𝒅)),\displaystyle\mathcal{L}_{(\bm{\mu})}\coloneqq\left(\frac{1}{2^{n_{x}}}\sum_{\bm{a}\in\mathcal{K}=\langle K\rangle}(-1)^{\bm{\mu a}^{T}}\epsilon_{(\bm{a},\bm{0})}E(\bm{a},\bm{0})\right)\left(\frac{1}{2^{n_{xz}}}\sum_{(\bm{c},\bm{d})\in\mathcal{D}=\langle D\rangle}(-1)^{\bm{\mu c}^{T}}\epsilon_{(\bm{c},\bm{d})}E(\bm{c},\bm{d})\right), (190)

and note that {(𝝁)}𝝁𝔽2n/𝒯\{\mathcal{L}_{(\bm{\mu})}\}_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{T}^{\perp}} is a resolution of identity.

Replacing the resolution of identity {Π𝒮X(𝝁)}𝝁𝔽2n/𝒞2\{\Pi_{\mathcal{S}_{X}(\bm{\mu})}\}_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}} by {(𝝁)}𝝁𝔽2n/𝒯\{\mathcal{L}_{(\bm{\mu})}\}_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{T}^{\perp}}, we conclude that the generator coefficients {A𝝁,𝜸𝒮}𝝁𝔽2n/𝒯,𝜸𝒯/𝒥\{A_{\bm{\mu},\bm{\gamma}}^{\mathcal{S}}\}_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{T}^{\perp},\bm{\gamma}\in\mathcal{T}^{\perp}/\mathcal{J}} describe the same average logical channel as in (93) and (94) since the logical Pauli ZZ for stabilizer codes can be chosen as 𝜸𝒯/𝒥\bm{\gamma}\in\mathcal{T}^{\perp}/\mathcal{J} up to a sign. Based on the description of the average logical channel, we study the conditions for the invariance of a stabilizer code as below.

Theorem 22.

Consider a general stabilizer code defined by (180). Consider 𝒯=K,Hx\mathcal{T}=\langle K,H_{x}\rangle, and we have 𝒥𝒯𝔽2n\mathcal{J}\subset\mathcal{T}^{\perp}\subset\mathbb{F}_{2}^{n}. Then, a ZZ-unitary gate UZ=𝐯𝔽2nf(𝐯)E(𝟎,𝐯)U_{Z}=\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}f(\bm{v})E(\bm{0},\bm{v}) preserves 𝒱(𝒮)\mathcal{V}(\mathcal{S}) (i.e. UZΠ𝒮UZ=Π𝒮U_{Z}\Pi_{\mathcal{S}}U_{Z}^{\dagger}=\Pi_{\mathcal{S}}) if and only if

𝜸𝒯/𝒥|A𝟎,𝜸𝒮|2=1.\sum_{\bm{\gamma}\in\mathcal{T}^{\perp}/\mathcal{J}}|A_{\bm{0},\bm{\gamma}}^{\mathcal{S}}|^{2}=1. (191)
Proof.

\Leftarrow: We assume (191) holds and derive UZΠ𝒮=Π𝒮UZU_{Z}\Pi_{\mathcal{S}}=\Pi_{\mathcal{S}}U_{Z}. It follows from (188) that A𝝁,𝜸𝒮=0A_{\bm{\mu},\bm{\gamma}}^{\mathcal{S}}=0 when 𝝁𝟎\bm{\mu}\neq\bm{0}. Then, by (184), we have

UZΠ𝒮Z=Π𝒮ZUZ=12nk1𝜸𝒯/𝒥A𝟎,𝜸𝒮(𝒖𝒞1+𝜸ϵ(𝟎,𝒖)E(𝟎,𝒖)).U_{Z}\Pi_{\mathcal{S}_{Z}}=\Pi_{\mathcal{S}_{Z}}U_{Z}=\frac{1}{2^{n-k_{1}}}\sum_{\bm{\gamma}\in\mathcal{T}^{\perp}/\mathcal{J}}A_{\bm{0},\bm{\gamma}}^{\mathcal{S}}\left(\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u})\right). (192)

For any 𝜸𝒯/𝒥\bm{\gamma}\in\mathcal{T}^{\perp}/\mathcal{J} and 𝒖𝒞1+𝜸𝒯\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\gamma}\subset\mathcal{T}^{\perp}, we have E(𝟎,𝒖)=E(𝟎,𝒖)E(\bm{0},\bm{u})\mathcal{L}=\mathcal{L}E(\bm{0},\bm{u}), where =Π𝒮XΠ𝒮XZ\mathcal{L}=\Pi_{\mathcal{S}_{X}}\Pi_{\mathcal{S}_{XZ}}. Hence,

UZΠ𝒮\displaystyle U_{Z}\Pi_{\mathcal{S}} =UZΠ𝒮Z=UZΠ𝒮Z=Π𝒮ZUZ=Π𝒮UZ.\displaystyle=U_{Z}\Pi_{\mathcal{S}_{Z}}\mathcal{L}=\mathcal{L}U_{Z}\Pi_{\mathcal{S}_{Z}}=\mathcal{L}\Pi_{\mathcal{S}_{Z}}U_{Z}=\Pi_{\mathcal{S}}U_{Z}. (193)

\Rightarrow: We assume UZΠ𝒮=Π𝒮UZU_{Z}\Pi_{\mathcal{S}}=\Pi_{\mathcal{S}}U_{Z} and show (191). The idea is the same as in the proof of Theorem 7, and it remains to show that each term in (189) is distinct in order to use the independence of Pauli matrices. Assume (𝒂𝒄,𝒅)=(𝒂𝒄,𝒅)(\bm{a}\oplus\bm{c},\bm{d})=(\bm{a}^{\prime}\oplus\bm{c}^{\prime},\bm{d}^{\prime}) for some 𝒂,𝒂𝒦\bm{a},\bm{a}^{\prime}\in\mathcal{K} and (𝒄,𝒅),(𝒄,𝒅)𝒟(\bm{c},\bm{d}),(\bm{c}^{\prime},\bm{d}^{\prime})\in\mathcal{D}. Then, 𝒅=𝒅\bm{d}=\bm{d}^{\prime} and 𝒂𝒄=𝒂𝒄\bm{a}\oplus\bm{c}=\bm{a}^{\prime}\oplus\bm{c}^{\prime}. Note that (𝒄,𝒅)(𝒄,𝒅)=(𝒄𝒄,𝟎)𝒟(\bm{c},\bm{d})\oplus(\bm{c}^{\prime},\bm{d}^{\prime})=(\bm{c}\oplus\bm{c}^{\prime},\bm{0})\in\mathcal{D}. Since JDx={𝟎}J\cap D_{x}=\{\bm{0}\}, we have 𝒄𝒄=𝟎\bm{c}\oplus\bm{c}^{\prime}=\bm{0}, which means 𝒄=𝒄\bm{c}=\bm{c}^{\prime} and 𝒂=𝒂\bm{a}=\bm{a}^{\prime}. ∎

Theorem 23.

Consider an [[n,k,d]][\![n,k,d]\!] stabilize code generated by the matrix G𝒮=[K00JD]G_{\mathcal{S}}=\left[\begin{array}[]{c c}K&0\\ \hline\cr 0&J\\ \hline\cr\lx@intercol\hfil D\hfil\lx@intercol\\ \end{array}\right] that satisfies Theorem 22. Let 𝒥\mathcal{J} be the space defined by the generator matrix JJ. Assume the minimum weight in 𝒥\mathcal{J} is at least dd (i.e. min𝐳𝒥wH(z)d\min_{\bm{z}\in\mathcal{J}}w_{H}(z)\geq d). Then the CSS code generated by G𝒮=[K00JDx0]G_{\mathcal{S^{\prime}}}=\left[\begin{array}[]{c c}K&0\\ \hline\cr 0&J\\ \hline\cr D_{x}&0\\ \end{array}\right] satisfies Theorem 7. Moreover, the CSS code has parameters n=nn^{\prime}=n, k=kk^{\prime}=k, and the ZZ-distance dZ=min𝐳K,Dx𝒥wH(𝐳)dd^{\prime}_{Z}=\min_{\bm{z}\in\langle K,D_{x}\rangle^{\perp}\setminus\mathcal{J}}w_{H}(\bm{z})\geq d.

Proof.

From the construction of G𝒮G_{\mathcal{S^{\prime}}}, the number of physical qubits does not change (n=nn^{\prime}=n). Also, k=kk^{\prime}=k follows from the fact that DxK={𝟎}D_{x}\cap K=\{\bm{0}\}. It remains to show that the new ZZ-distance dZdd^{\prime}_{Z}\geq d.

Assume there exists (𝒔,𝒕)𝒩(𝒮)𝒮(\bm{s},\bm{t})\in\mathcal{N}(\mathcal{S^{\prime}})\setminus\mathcal{S^{\prime}} such that h(𝒔,𝒕)<dh(\bm{s},\bm{t})<d and 𝒕𝟎\bm{t}\neq\bm{0}, where hh is the Pauli weight (number of nontrivial Pauli matrices) defined by

h(𝒔,𝒕)=wH(𝒔)+wH(𝒕)wH(𝒔𝒕).h(\bm{s},\bm{t})=w_{H}(\bm{s})+w_{H}(\bm{t})-w_{H}(\bm{s}*\bm{t}). (194)

Then, h(𝟎,𝒕)<dh(\bm{0},\bm{t})<d and 𝒕MDx\bm{t}\in M^{\perp}\cap D_{x}^{\perp}, which implies that (𝟎,𝒕)𝒩(S)(\bm{0},\bm{t})\in\mathcal{N}(S). Also by definition, we have JDz={𝟎}J\cap D_{z}=\{\bm{0}\} and thus (𝟎,𝒕)𝒩(𝒮)𝒮(\bm{0},\bm{t})\in\mathcal{N}(\mathcal{S})\setminus\mathcal{S}. However, by assumption the distance of 𝒱(𝒮)\mathcal{V}(\mathcal{S}) is dd and thus 𝒩(𝒮)𝒮\mathcal{N}(\mathcal{S})\setminus\mathcal{S} has minimum weight dd, which is a contradiction. Therefore, dZdd^{\prime}_{Z}\geq d. ∎

Remark 24.

Note that the values of generator coefficients are the same for the [[n,k,d]][\![n,k,d]\!] stabilizer code and the [[n=n,k=k,dZd]][\![n^{\prime}=n,k^{\prime}=k,d^{\prime}_{Z}\geq d]\!] CSS code. The induced logical operator by UZU_{Z} remains the same. It follows from Theorem 23 that given an [[n,k,d]][\![n,k,d]\!] non-degenerate stabilizer code supporting a physical UZ=𝒗𝔽2nf(𝒗)E(𝟎,𝒗)U_{Z}=\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}f(\bm{v})E(\bm{0},\bm{v}) quantum (unitary) gate, there exists an equivalent CSS code (since the Pauli expansion of the physical gate UZU_{Z} has support only on Pauli ZZ, we only compare the distance dd of stabilizer code with the ZZ-distance of the equivalent CSS code) supporting the same operation. Note that a similar argument applies to UX=𝒗𝔽2nf(𝒗)E(𝒗,𝟎)U_{X}=\sum_{\bm{v}\in\mathbb{F}_{2}^{n}}f(\bm{v})E(\bm{v},\bm{0}).

Appendix C Proofs for All Results

C.1 Proof of Lemma 4

Setting ={𝒛𝒞1ϵ(𝟎,𝒛)=1}\mathcal{B}=\{\bm{z}\in\mathcal{C}_{1}^{\perp}\mid\epsilon_{(\bm{0},\bm{z})}=1\}, we have =𝒞1,𝒚\mathcal{B}^{\perp}=\langle\mathcal{C}_{1},\bm{y}\rangle. Setting

Sp=𝒛+𝝁+𝜸(cosθ2)nwH(𝒛)(ısinθ2)wH(𝒛),S_{p}=\sum_{\bm{z}\in\mathcal{B}+\bm{\mu}+\bm{\gamma}}\left(\cos\frac{\theta}{2}\right)^{n-w_{H}(\bm{z})}\left(-\imath\sin\frac{\theta}{2}\right)^{w_{H}(\bm{z})}, (195)

and

Sn=𝒛𝒞1+𝝁+𝜸(cosθ2)nwH(𝒛)(ısinθ2)wH(𝒛),S_{n}=\sum_{\bm{z}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}\left(\cos\frac{\theta}{2}\right)^{n-w_{H}(\bm{z})}\left(-\imath\sin\frac{\theta}{2}\right)^{w_{H}(\bm{z})}, (196)

we may rewrite (3.1) as

(1)(𝝁𝜸)𝒚TA𝝁,𝜸(θ)=2SpSn.(-1)^{(\bm{\mu}\oplus\bm{\gamma})\bm{y}^{T}}A_{\bm{\mu},\bm{\gamma}}(\theta)=2S_{p}-S_{n}. (197)

Since +𝝁+𝜸=,𝝁𝜸\mathcal{B}+\bm{\mu}+\bm{\gamma}=\langle\mathcal{B},\bm{\mu}\oplus\bm{\gamma}\rangle\setminus\mathcal{B} and 𝒞1+𝝁+𝜸=𝒞1,𝝁𝜸𝒞1\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}=\langle\mathcal{C}_{1}^{\perp},\bm{\mu}\oplus\bm{\gamma}\rangle\setminus\mathcal{C}_{1}^{\perp}, we have

(1)(𝝁𝜸)𝒚TA𝝁,𝜸(θ)=2(Pθ[,𝝁𝜸]Pθ[])(Pθ[𝒞1,𝝁𝜸]Pθ[𝒞1]).(-1)^{(\bm{\mu}\oplus\bm{\gamma})\bm{y}^{T}}A_{\bm{\mu},\bm{\gamma}}(\theta)=2(P_{\theta}[\langle\mathcal{B},\bm{\mu}\oplus\bm{\gamma}\rangle]-P_{\theta}[\mathcal{B}])-(P_{\theta}[\langle\mathcal{C}_{1}^{\perp},\bm{\mu}\oplus\bm{\gamma}\rangle]-P_{\theta}[\mathcal{C}_{1}^{\perp}]). (198)

We may apply the MacWilliams Identities to obtain

Pθ[,𝝁𝜸]\displaystyle P_{\theta}[\langle\mathcal{B},\bm{\mu}\oplus\bm{\gamma}\rangle] =1|(𝝁𝜸)|P(𝝁𝜸)(cosθ2ısinθ2,cosθ2+ısinθ2)\displaystyle=\frac{1}{|\mathcal{B}^{\perp}\cap(\bm{\mu}\oplus\bm{\gamma})^{\perp}|}P_{\mathcal{B}^{\perp}\cap(\bm{\mu}\oplus\bm{\gamma})^{\perp}}\left(\cos\frac{\theta}{2}-\imath\sin\frac{\theta}{2},\cos\frac{\theta}{2}+\imath\sin\frac{\theta}{2}\right)
=1|(𝝁𝜸)|𝒛(𝝁𝜸)(cosθ2ısinθ2)n2wH(𝒛)\displaystyle=\frac{1}{|\mathcal{B}^{\perp}\cap(\bm{\mu}\oplus\bm{\gamma})^{\perp}|}\sum_{\bm{z}\in\mathcal{B}^{\perp}\cap(\bm{\mu}\oplus\bm{\gamma})^{\perp}}\left(\cos\frac{\theta}{2}-\imath\sin\frac{\theta}{2}\right)^{n-2w_{H}(\bm{z})}
=2||𝒛(𝝁𝜸)(eıθ2)n2wH(𝒛),\displaystyle=\frac{2}{|\mathcal{B}^{\perp}|}\sum_{\bm{z}\in\mathcal{B}^{\perp}\cap(\bm{\mu}\oplus\bm{\gamma})^{\perp}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}, (199)

and similarly

Pθ[]\displaystyle P_{\theta}[\mathcal{B}] =1||𝒛(eıθ2)n2wH(𝒛).\displaystyle=\frac{1}{|\mathcal{B}^{\perp}|}\sum_{\bm{z}\in\mathcal{B}^{\perp}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}. (200)

We combine (199) and (200) to obtain

Pθ[,𝝁𝜸]Pθ[]\displaystyle P_{\theta}[\langle\mathcal{B},\bm{\mu}\oplus\bm{\gamma}\rangle]-P_{\theta}[\mathcal{B}] =2||𝒛(𝝁𝜸)(eıθ2)n2wH(𝒛)1||𝒛(eıθ2)n2wH(𝒛)\displaystyle=\frac{2}{|\mathcal{B}^{\perp}|}\sum_{\bm{z}\in\mathcal{B}^{\perp}\cap(\bm{\mu}\oplus\bm{\gamma})^{\perp}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}-\frac{1}{|\mathcal{B}^{\perp}|}\sum_{\bm{z}\in\mathcal{B}^{\perp}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}
=1||(𝒛(𝝁𝜸)(eıθ2)n2wH(𝒛)𝒛(𝝁𝜸)(eıθ2)n2wH(𝒛))\displaystyle=\frac{1}{|\mathcal{B}^{\perp}|}\left(\sum_{\bm{z}\in\mathcal{B}^{\perp}\cap(\bm{\mu}\oplus\bm{\gamma})^{\perp}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}-\sum_{\bm{z}\in\mathcal{B}^{\perp}\setminus(\bm{\mu}\oplus\bm{\gamma})^{\perp}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}\right)
=1||𝒛(1)(𝝁𝜸)𝒛T(eıθ2)n2wH(𝒛).\displaystyle=\frac{1}{|\mathcal{B}^{\perp}|}\sum_{\bm{z}\in\mathcal{B}^{\perp}}(-1)^{(\bm{\mu}\oplus\bm{\gamma})\bm{z}^{T}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}. (201)

Similarly,

Pθ[𝒞1,𝝁𝜸]Pθ[𝒞1]=1|𝒞1|𝒛𝒞1(1)(𝝁𝜸)𝒛T(eıθ2)n2wH(𝒛).P_{\theta}[\langle\mathcal{C}_{1}^{\perp},\bm{\mu}\oplus\bm{\gamma}\rangle]-P_{\theta}[\mathcal{C}_{1}^{\perp}]=\frac{1}{|\mathcal{C}_{1}|}\sum_{\bm{z}\in\mathcal{C}_{1}}(-1)^{(\bm{\mu}\oplus\bm{\gamma})\bm{z}^{T}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}. (202)

Since 𝒞1=𝒞1+𝒚\mathcal{B}^{\perp}\setminus\mathcal{C}_{1}=\mathcal{C}_{1}+\bm{y}, it follows from (198), (201), (202) that

(1)(𝝁𝜸)𝒚TA𝝁,𝜸(θ)\displaystyle(-1)^{(\bm{\mu}\oplus\bm{\gamma})\bm{y}^{T}}A_{\bm{\mu},\bm{\gamma}}(\theta) =2||𝒛(1)(𝝁𝜸)𝒛T(eıθ2)n2wH(𝒛)1|𝒞1|𝒛𝒞1(1)(𝝁𝜸)𝒛T(eıθ2)n2wH(𝒛)\displaystyle=\frac{2}{|\mathcal{B}^{\perp}|}\sum_{\bm{z}\in\mathcal{B}^{\perp}}(-1)^{(\bm{\mu}\oplus\bm{\gamma})\bm{z}^{T}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}-\frac{1}{|\mathcal{C}_{1}|}\sum_{\bm{z}\in\mathcal{C}_{1}}(-1)^{(\bm{\mu}\oplus\bm{\gamma})\bm{z}^{T}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}
=1|𝒞1|𝒛𝒞1+𝒚(1)(𝝁𝜸)𝒛T(eıθ2)n2wH(𝒛),\displaystyle=\frac{1}{|\mathcal{C}_{1}|}\sum_{\bm{z}\in\mathcal{C}_{1}+\bm{y}}(-1)^{(\bm{\mu}\oplus\bm{\gamma})\bm{z}^{T}}\left(e^{-\imath\frac{\theta}{2}}\right)^{n-2w_{H}(\bm{z})}, (203)

which completes the proof.∎

C.2 Derivation of (88)

UZΠ𝒮\displaystyle U_{Z}\Pi_{\mathcal{S}} =UZΠ𝒮ZΠ𝒮X\displaystyle=U_{Z}\Pi_{\mathcal{S}_{Z}}\Pi_{\mathcal{S}_{X}}
=12nk1+k2𝝁𝔽2n/𝒞2𝜸𝒞2/𝒞1A𝝁,𝜸(𝒖𝒞1+𝝁+𝜸ϵ(𝟎,𝒖)E(𝟎,𝒖))(𝒂𝒞2ϵ(𝒂,𝟎)E(𝒂,𝟎))\displaystyle=\frac{1}{2^{n-k_{1}+k_{2}}}\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu},\bm{\gamma}}\left(\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u})\right)\left(\sum_{\bm{a}\in\mathcal{C}_{2}}\epsilon_{(\bm{a},\bm{0})}E(\bm{a},\bm{0})\right)
=12nk1+k2𝝁𝔽2n/𝒞2𝜸𝒞2/𝒞1A𝝁,𝜸(𝒂𝒞2(1)𝒂𝝁Tϵ(𝒂,𝟎)E(𝒂,𝟎))(𝒖𝒞1+𝝁+𝜸ϵ(𝟎,𝒖)E(𝟎,𝒖))\displaystyle=\frac{1}{2^{n-k_{1}+k_{2}}}\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu},\bm{\gamma}}\left(\sum_{\bm{a}\in\mathcal{C}_{2}}(-1)^{\bm{a}\bm{\mu}^{T}}\epsilon_{(\bm{a},\bm{0})}E(\bm{a},\bm{0})\right)\left(\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u})\right)
=12nk1𝝁𝔽2n/𝒞2Π𝒮X(𝝁)(𝜸𝒞2/𝒞1A𝝁,𝜸(𝒖𝒞1+𝝁+𝜸ϵ(𝟎,𝒖)E(𝟎,𝒖))),\displaystyle=\frac{1}{2^{n-k_{1}}}\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\Pi_{\mathcal{S}_{X}(\bm{\mu})}\left(\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu},\bm{\gamma}}\left(\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u})\right)\right), (204)

where Π𝒮X(𝝁)=1|𝒞2|𝒂𝒞2(1)𝒂𝝁Tϵ(𝒂,𝟎)E(𝒂,𝟎)\Pi_{\mathcal{S}_{X}(\bm{\mu})}=\frac{1}{|\mathcal{C}_{2}|}\sum_{\bm{a}\in\mathcal{C}_{2}}(-1)^{\bm{a}\bm{\mu}^{T}}\epsilon_{(\bm{a},\bm{0})}E(\bm{a},\bm{0}). ∎

C.3 Derivation of θ(θL)\theta(\theta_{L})

Since there is only one logical qubit, 𝜸\bm{\gamma} is either zero or non-zero. It then follows from (76) and (77) that the effective physical operator corresponding to the syndrome 𝝁=𝟎\bm{\mu}=\bm{0} is

B𝝁=𝟎=A𝝁=𝟎,𝜸=𝟎E(𝟎,𝟎)+A𝝁=𝟎,𝜸𝟎E(𝟎,𝜸𝟎).\displaystyle B_{\bm{\mu}=\bm{0}}=A_{\bm{\mu}=\bm{0},\bm{\gamma}=\bm{0}}E(\bm{0},\bm{0})+A_{\bm{\mu}=\bm{0},\bm{\gamma}\neq\bm{0}}E(\bm{0},\bm{\gamma}\neq\bm{0}). (205)

Thus, if we observe the trivial syndrome, then the induced logical portion is

UZL(𝝁=𝟎)=A𝝁=𝟎,𝜸=𝟎IL+A𝝁=𝟎,𝜸𝟎ZL=[A𝟎,𝜸=𝟎+A𝟎,𝜸𝟎00A𝟎,𝜸=𝟎A𝟎,𝜸𝟎].\displaystyle U_{Z}^{L}(\bm{\mu}=\bm{0})=A_{\bm{\mu}=\bm{0},\bm{\gamma}=\bm{0}}I_{L}+A_{\bm{\mu}=\bm{0},\bm{\gamma}\neq\bm{0}}Z_{L}=\begin{bmatrix}A_{\bm{0},\bm{\gamma}=\bm{0}}+A_{\bm{0},\bm{\gamma}\neq\bm{0}}&0\\ 0&A_{\bm{0},\bm{\gamma}=\bm{0}}-A_{\bm{0},\bm{\gamma}\neq\bm{0}}\end{bmatrix}. (206)

Since we also assume that one of the pair (A𝝁=𝟎,𝜸=𝟎,A𝝁=𝟎,𝜸𝟎)(A_{\bm{\mu}=\bm{0},\bm{\gamma}=\bm{0}},A_{\bm{\mu}=\bm{0},\bm{\gamma}\neq\bm{0}}) is real and the other is pure imaginary, we can consider UZL(𝝁=𝟎)U_{Z}^{L}(\bm{\mu}=\bm{0}) as a ZZ-rotation with angle θL\theta_{L} up to some logical Pauli ZLZ_{L}:

UZL(𝝁=𝟎)={cos(θL/2)IL+ısin(θL/2)ZL=RZ(θL)if A𝝁=𝟎,𝜸=𝟎 is real ısin(θL/2)IL+cos(θL/2)ZL=ZLRZ(θL)if A𝝁=𝟎,𝜸𝟎 is real ,\displaystyle U_{Z}^{L}(\bm{\mu}=\bm{0})=\left\{\begin{array}[]{lc}\cos(\theta_{L}/2)I_{L}+\imath\sin(\theta_{L}/2)Z_{L}=R_{Z}(\theta_{L})&\text{if }A_{\bm{\mu}=\bm{0},\bm{\gamma}=\bm{0}}\text{ is real }\\ \imath\sin(\theta_{L}/2)I_{L}+\cos(\theta_{L}/2)Z_{L}=Z_{L}R_{Z}(\theta_{L})&\text{if }A_{\bm{\mu}=\bm{0},\bm{\gamma}\neq\bm{0}}\text{ is real }\end{array}\right., (209)

with θL/2=tan1(sin(θL/2)cos(θL/2))=tan1(ıA𝝁=𝟎,𝜸𝟎A𝝁=𝟎,𝜸=𝟎).\theta_{L}/2=\tan^{-1}\left(\frac{\sin(\theta_{L}/2)}{\cos(\theta_{L}/2)}\right)=\tan^{-1}\left(\frac{\imath A_{\bm{\mu}=\bm{0},\bm{\gamma}\neq\bm{0}}}{A_{\bm{\mu}=\bm{0},\bm{\gamma}=\bm{0}}}\right).

C.4 Proof of Theorem 6

It follows from (3.1) that

A𝝁,𝜸¯A𝝁,𝜼𝜸\displaystyle\overline{A_{\bm{\mu},\bm{\gamma}}}A_{\bm{\mu},\bm{\eta}\oplus\bm{\gamma}} =(𝒛𝒞1+𝝁+𝜸ϵ(𝟎,𝒛)f(𝒛))(𝒛𝒞1+𝝁+𝜼+𝜸ϵ(𝟎,𝒛)f(n,𝒛))\displaystyle=\left(\sum_{\bm{z}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{z})}f(\bm{z})\right)\left(\sum_{\bm{z^{\prime}}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\eta}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{z^{\prime}})}f(n,\bm{z^{\prime}})\right)
=𝒘𝒞1+𝜼ϵ(𝟎,𝒘)(𝒛𝒞1+𝝁+𝜸f(𝒛)f(𝒛𝒘)¯).\displaystyle=\sum_{\bm{w}\in\mathcal{C}_{1}^{\perp}+\bm{\eta}}\epsilon_{(\bm{0},\bm{w})}\left(\sum_{\bm{z}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}f(\bm{z})\overline{f(\bm{z}\oplus\bm{w})}\right). (210)

Then, we have

𝝁𝔽2n/𝒞2𝜸𝒞2/𝒞1A𝝁,𝜸¯A𝝁,𝜼𝜸\displaystyle\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\overline{A_{\bm{\mu},\bm{\gamma}}}A_{\bm{\mu},\bm{\eta}\oplus\bm{\gamma}} =𝝁𝔽2n/𝒞2𝜸𝒞2/𝒞1𝒘𝒞1+𝜼ϵ(𝟎,𝒘)(𝒛𝒞1+𝝁+𝜸f(𝒛)f(𝒛𝒘)¯)\displaystyle=\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\sum_{{\bm{\gamma}}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\sum_{\bm{w}\in\mathcal{C}_{1}^{\perp}+\bm{\eta}}\epsilon_{(\bm{0},\bm{w})}\left(\sum_{\bm{z}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}f(\bm{z})\overline{f(\bm{z}\oplus\bm{w})}\right)
=𝒘𝒞1+𝜼ϵ(𝟎,𝒘)(𝝁𝔽2n/𝒞2𝜸𝒞2/𝒞1𝒛𝒞1+𝝁+𝜸f(𝒛)f(𝒛𝒘)¯)\displaystyle=\sum_{\bm{w}\in\mathcal{C}_{1}^{\perp}+\bm{\eta}}\epsilon_{(\bm{0},\bm{w})}\left(\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\sum_{\bm{z}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}f(\bm{z})\overline{f(\bm{z}\oplus\bm{w})}\right)
=𝒘𝒞1+𝜼ϵ(𝟎,𝒘)(𝒛𝔽2nf(𝒛)f(𝒛𝒘)¯)\displaystyle=\sum_{\bm{w}\in\mathcal{C}_{1}^{\perp}+\bm{\eta}}\epsilon_{(\bm{0},\bm{w})}\left(\sum_{\bm{z}\in\mathbb{F}_{2}^{n}}f(\bm{z})\overline{f(\bm{z}\oplus\bm{w})}\right)
={ϵ(𝟎,𝟎)=1 if 𝜼=𝟎0 if 𝜼𝟎,\displaystyle=\left\{\begin{array}[]{lc}\epsilon_{(\bm{0},\bm{0})}=1&\text{ if }\bm{\eta}=\bm{0}\\ 0&\text{ if }\bm{\eta}\neq\bm{0}\end{array}\right., (211)

where the last step follows from the fact that UZU_{Z} is unitary (58). ∎

C.5 Derivation of (109)

Π𝒮X(𝝁𝟎)UZΠ𝒮Z|ϕ\displaystyle\Pi_{\mathcal{S}_{X}(\bm{\mu_{0}})}U_{Z}\Pi_{\mathcal{S}_{Z}}|{\phi}\rangle =1|𝒞2|𝒂𝒞2(1)𝒂𝝁𝟎Tϵ(𝒂,𝟎)E(𝒂,𝟎)𝝁𝔽2n/𝒞2𝜸𝒞2/𝒞1A𝝁,𝜸ϵ(𝟎,𝝁𝜸)E(𝟎,𝝁𝜸)|ϕ\displaystyle=\frac{1}{|\mathcal{C}_{2}|}\sum_{\bm{a}\in\mathcal{C}_{2}}(-1)^{\bm{a}\bm{\mu_{0}}^{T}}\epsilon_{(\bm{a},\bm{0)}}E(\bm{a},\bm{0})\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu},\bm{\gamma}}\epsilon_{(\bm{0},\bm{\mu}\oplus\bm{\gamma})}E(\bm{0},\bm{\mu}\oplus\bm{\gamma})|{\phi}\rangle
=1|𝒞2|𝝁𝜸A𝝁,𝜸ϵ(𝟎,𝝁𝜸)E(𝟎,𝝁𝜸)𝒂𝒞2(1)𝒂(𝝁+𝝁𝟎)Tϵ(𝒂,𝟎)E(𝒂,𝟎)|ϕ\displaystyle=\frac{1}{|\mathcal{C}_{2}|}\sum_{\bm{\mu}}\sum_{\bm{\gamma}}A_{\bm{\mu},\bm{\gamma}}\epsilon_{(\bm{0},\bm{\mu}\oplus\bm{\gamma})}E(\bm{0},\bm{\mu}\oplus\bm{\gamma})\sum_{\bm{a}\in\mathcal{C}_{2}}(-1)^{\bm{a}(\bm{\mu}+\bm{\mu_{0}})^{T}}\epsilon_{(\bm{a},\bm{0})}E(\bm{a},\bm{0})|{\phi}\rangle
=1|𝒞2|𝝁𝜸A𝝁,𝜸ϵ(𝟎,𝝁𝜸)E(𝟎,𝝁𝜸)𝒂𝒞2(1)𝒂(𝝁𝝁𝟎)T|ϕ,\displaystyle=\frac{1}{|\mathcal{C}_{2}|}\sum_{\bm{\mu}}\sum_{\bm{\gamma}}A_{\bm{\mu},\bm{\gamma}}\epsilon_{(\bm{0},\bm{\bm{\mu}\oplus\bm{\gamma}})}E(\bm{0},\bm{\mu}\oplus\bm{\gamma})\sum_{\bm{a}\in\mathcal{C}_{2}}(-1)^{\bm{a}(\bm{\mu}\oplus\bm{\mu_{0}})^{T}}|{\phi}\rangle, (212)

where (212) follows from the fact ϵ(𝒂,𝟎)E(𝒂,𝟎)𝒮\epsilon_{(\bm{a},\bm{0})}E(\bm{a},\bm{0})\in\mathcal{S}. ∎

C.6 Proof of Theorem 7

Recall from (60) that UZΠS𝒵=ΠS𝒵UZU_{Z}\Pi_{S_{\mathcal{Z}}}=\Pi_{S_{\mathcal{Z}}}U_{Z} simplifies to

UZΠ𝒮Z\displaystyle U_{Z}\Pi_{\mathcal{S}_{Z}} =12nk1𝝁𝔽2n/𝒞2𝜸𝒞2/𝒞1A𝝁,𝜸(𝒖𝒞1+𝝁+𝜸ϵ(𝟎,𝒖)E(𝟎,𝒖)).\displaystyle=\frac{1}{2^{n-k_{1}}}\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu},\bm{\gamma}}\left(\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\mu}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u})\right). (213)

\Leftarrow: We assume (119) holds and derive UZΠ𝒮=Π𝒮UZU_{Z}\Pi_{\mathcal{S}}=\Pi_{\mathcal{S}}U_{Z}. By Theorem 6, we have A𝝁,𝜸=0A_{\bm{\mu},\bm{\gamma}}=0 when 𝝁𝟎\bm{\mu}\neq\bm{0}. It follows from (60) that

UZΠ𝒮Z=Π𝒮ZUZ=12nk1𝜸𝒞2/𝒞1A𝟎,𝜸(𝒖𝒞1+𝜸ϵ(𝟎,𝒖)E(𝟎,𝒖)).U_{Z}\Pi_{\mathcal{S}_{Z}}=\Pi_{\mathcal{S}_{Z}}U_{Z}=\frac{1}{2^{n-k_{1}}}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{0},\bm{\gamma}}\left(\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u})\right). (214)

For any 𝜸𝒞2/𝒞1\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp} and 𝒖𝒞1+𝜸𝒞2\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\gamma}\subset\mathcal{C}_{2}^{\perp}, we have E(𝟎,𝒖)Π𝒮X=Π𝒮XE(𝟎,𝒖)E(\bm{0},\bm{u})\Pi_{\mathcal{S}_{X}}=\Pi_{\mathcal{S}_{X}}E(\bm{0},\bm{u}). Hence,

UZΠ𝒮=UZΠ𝒮ZΠ𝒮X\displaystyle U_{Z}\Pi_{\mathcal{S}}=U_{Z}\Pi_{\mathcal{S}_{Z}}\Pi_{\mathcal{S}_{X}} =12nk1𝜸𝒞2/𝒞1A𝟎,𝜸(𝒖𝒞1+𝜸ϵ(𝟎,𝒖)Π𝒮XE(𝟎,𝒖))\displaystyle=\frac{1}{2^{n-k_{1}}}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{0},\bm{\gamma}}\left(\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\gamma}}\epsilon_{(\bm{0},\bm{u})}\Pi_{\mathcal{S}_{X}}E(\bm{0},\bm{u})\right)
=Π𝒮XUZΠ𝒮Z=Π𝒮XΠ𝒮ZUZ=Π𝒮UZ.\displaystyle=\Pi_{\mathcal{S}_{X}}U_{Z}\Pi_{\mathcal{S}_{Z}}=\Pi_{\mathcal{S}_{X}}\Pi_{\mathcal{S}_{Z}}U_{Z}=\Pi_{\mathcal{S}}U_{Z}. (215)

\Rightarrow: We assume UZΠ𝒮=Π𝒮UZU_{Z}\Pi_{\mathcal{S}}=\Pi_{\mathcal{S}}U_{Z} and show (119). It follows from (88) that

UZΠ𝒮\displaystyle U_{Z}\Pi_{\mathcal{S}} =UZΠ𝒮ZΠ𝒮X\displaystyle=U_{Z}\Pi_{\mathcal{S}_{Z}}\Pi_{\mathcal{S}_{X}}
=12nk1𝝁𝔽2n/𝒞2(Π𝒮X(𝝁)𝜸𝒞2/𝒞1A𝝁,𝜸(𝒖𝒞1+𝜸+𝝁ϵ(𝟎,𝒖)E(𝟎,𝒖)))=Π𝒮UZ.\displaystyle=\frac{1}{2^{n-k_{1}}}\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\left(\Pi_{\mathcal{S}_{X}(\bm{\mu})}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu},\bm{\gamma}}\left(\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\gamma}+\bm{\mu}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u})\right)\right)=\Pi_{\mathcal{S}}U_{Z}. (216)

Pairwise orthogonality of projectors implies Π𝒮X(𝝁)Π𝒮X(𝝁)=0\Pi_{\mathcal{S}_{X}(\bm{\mu})}\Pi_{\mathcal{S}_{X}(\bm{\mu^{\prime}})}=0 when 𝝁𝝁\bm{\mu}\neq\bm{\mu^{\prime}} in 𝔽2n/𝒞2\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}. Hence, for any 𝝁𝟎𝔽2n/𝒞2{𝟎}\bm{\mu_{0}}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}\setminus\{\bm{0}\}, we have we have 0=Π𝒮X(𝝁𝟎)Π𝒮XΠ𝒮ZUZ=Π𝒮X(𝝁𝟎)(Π𝒮UZ)=Π𝒮X(𝝁𝟎)(UZΠ𝒮)0=\Pi_{\mathcal{S}_{X}(\bm{\mu_{0}})}\Pi_{\mathcal{S}_{X}}\Pi_{\mathcal{S}_{Z}}U_{Z}=\Pi_{\mathcal{S}_{X}(\bm{\mu_{0}})}(\Pi_{\mathcal{S}}U_{Z})=\Pi_{\mathcal{S}_{X}(\bm{\mu_{0}})}(U_{Z}\Pi_{\mathcal{S}}), which implies that

0\displaystyle 0 =12nk1𝝁𝔽2n/𝒞2(Π𝒮X(𝝁𝟎)Π𝒮X(𝝁)𝜸𝒞2/𝒞1A𝝁,𝜸(𝒖𝒞1+𝜸+𝝁ϵ(𝟎,𝒖)E(𝟎,𝒖)))\displaystyle=\frac{1}{2^{n-k_{1}}}\sum_{\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}}\left(\Pi_{\mathcal{S}_{X}(\bm{\mu_{0}})}\Pi_{\mathcal{S}_{X}(\bm{\mu})}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu},\bm{\gamma}}\left(\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\gamma}+\bm{\mu}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u})\right)\right)
=12nk1ΠSX(𝝁𝟎)𝜸𝒞2/𝒞1A𝝁𝟎,𝜸(𝒖𝒞1+𝜸+𝝁𝟎ϵ(𝟎,𝒖)E(𝟎,𝒖))\displaystyle=\frac{1}{2^{n-k_{1}}}\Pi_{S_{X}(\bm{\mu_{0}})}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu_{0}},\bm{\gamma}}\left(\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\gamma}+\bm{\mu_{0}}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u})\right)
=12nk1(12k2𝒂𝒞2(1)𝒂𝝁𝟎Tϵ(𝒂,𝟎)E(𝒂,𝟎))(𝜸𝒞2/𝒞1A𝝁𝟎,𝜸(𝒖𝒞1+𝜸+𝝁𝟎ϵ(𝟎,𝒖)E(𝟎,𝒖)))\displaystyle=\frac{1}{2^{n-k_{1}}}\left(\frac{1}{2^{k_{2}}}\sum_{\bm{a}\in\mathcal{C}_{2}}(-1)^{\bm{a}\bm{\mu_{0}}^{T}}\epsilon_{(\bm{a},\bm{0})}E(\bm{a},\bm{0})\right)\left(\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}A_{\bm{\mu_{0}},\bm{\gamma}}\left(\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\gamma}+\bm{\mu_{0}}}\epsilon_{(\bm{0},\bm{u})}E(\bm{0},\bm{u})\right)\right)
=12nk1+k2𝜸𝒞2/𝒞1𝒖𝒞1+𝜸+𝝁𝟎𝒂𝒞2A𝝁𝟎,𝜸(1)𝒂𝝁𝟎Tı𝒂𝝁𝟎Tϵ(𝒂,𝒖)E(𝒂,𝒖).\displaystyle=\frac{1}{2^{n-k_{1}+k_{2}}}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\sum_{\bm{u}\in\mathcal{C}_{1}^{\perp}+\bm{\gamma}+\bm{\mu_{0}}}\sum_{\bm{a}\in\mathcal{C}_{2}}A_{\bm{\mu_{0}},\bm{\gamma}}(-1)^{\bm{a}\bm{\mu_{0}}^{T}}\imath^{\bm{a}\bm{\mu_{0}}^{T}}\epsilon_{(\bm{a},\bm{u})}E(\bm{a},\bm{u}). (217)

Since Pauli matrices are linear independent, we have A𝝁𝟎,𝜸=0A_{\bm{\mu_{0}},\bm{\gamma}}=0 for all 𝝁𝔽2n/𝒞2{𝟎}\bm{\mu}\in\mathbb{F}_{2}^{n}/\mathcal{C}_{2}^{\perp}\setminus\{\bm{0}\} and all 𝜸𝒞2/𝒞1\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}, and (119)\eqref{eqn:preserved_by_Uz} holds. ∎

C.7 Proof of Lemma 11

\Rightarrow: Assume (122) holds for all 𝒗𝟏,𝒗𝟐𝒞1+𝒚\bm{v_{1}},\bm{v_{2}}\in\mathcal{C}_{1}+\bm{y} such that 𝒗𝟏𝒗𝟐𝒞2\bm{v_{1}}\oplus\bm{v_{2}}\in\mathcal{C}_{2}. Then, (126) is satisfied. Let 𝒗𝟏,𝒗𝟐(𝒞1+𝒚)/(𝒞2+𝒚)\bm{v_{1}},\bm{v_{2}}\in(\mathcal{C}_{1}+\bm{y})/(\mathcal{C}_{2}+\bm{y}) and 𝒗𝟏𝒗𝟐𝒞2\bm{v_{1}}\oplus\bm{v_{2}}\in\mathcal{C}_{2}. Then we can write 𝒗𝟏=𝒖𝟏+𝒘+𝒚\bm{v_{1}}=\bm{u_{1}}+\bm{w}+\bm{y} and 𝒗𝟐=𝒖𝟐+𝒘+𝒚\bm{v_{2}}=\bm{u_{2}}+\bm{w}+\bm{y} for 𝒖𝟏,𝒖𝟐𝒞2\bm{u_{1}},\bm{u_{2}}\in\mathcal{C}_{2} and 𝒘𝒞1/𝒞2\bm{w}\in\mathcal{C}_{1}/\mathcal{C}_{2}. We simplify (122) as

2l\displaystyle 2^{l} (𝒖𝟏+𝒘+𝒚)R(𝒖𝟏+𝒘+𝒚)T(𝒖𝟐+𝒘+𝒚)R(𝒖𝟐+𝒘+𝒚)T\displaystyle\mid(\bm{u_{1}}+\bm{w}+\bm{y})R(\bm{u_{1}}+\bm{w}+\bm{y})^{T}-(\bm{u_{2}}+\bm{w}+\bm{y})R(\bm{u_{2}}+\bm{w}+\bm{y})^{T} (218)
2l\displaystyle 2^{l} ((𝒖𝟏+𝒚)R(𝒖𝟏+𝒚)T(𝒖𝟐+𝒚)R(𝒖𝟐+𝒚)T)+2((𝒖𝟏+𝒚)R𝒘T(𝒖𝟏+𝒚)R𝒘T)\displaystyle\mid\left((\bm{u_{1}}+\bm{y})R(\bm{u_{1}}+\bm{y})^{T}-(\bm{u_{2}}+\bm{y})R(\bm{u_{2}}+\bm{y})^{T}\right)+2\left((\bm{u_{1}}+\bm{y})R\bm{w}^{T}-(\bm{u_{1}}+\bm{y})R\bm{w}^{T}\right) (219)
2l\displaystyle 2^{l} 2(𝒖𝟏𝒖𝟐)R𝒘T,\displaystyle\mid 2(\bm{u_{1}}-\bm{u_{2}})R\bm{w}^{T}, (220)

since 𝒖𝟏+𝒚,𝒖𝟐+𝒚𝒞2+𝒚\bm{u_{1}}+\bm{y},\bm{u_{2}}+\bm{y}\in\mathcal{C}_{2}+\bm{y}. Thus, (127) is also satisfied.

\Leftarrow: We simply reverse (218), (219), and (220). ∎

C.8 Proof of Theorem 12

The proof idea is the same as that of Theorem 9 We take UZ=RZ(πp)U_{Z}=R_{Z}\left(\frac{\pi}{p}\right) and simplify (4) using (119):

1\displaystyle 1 =𝜸𝒞2/𝒞1|A𝟎,𝜸(πp)|2\displaystyle=\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\left|A_{\bm{0},\bm{\gamma}}\left(\frac{\pi}{p}\right)\right|^{2}
=𝜸𝒞2/𝒞11|𝒞1|2𝒛𝟏,𝒛𝟐𝒞1+𝒚(1)𝜸(𝒛𝟏𝒛𝟐)T(eıπp)wH(𝒛𝟏)wH(𝒛𝟐).\displaystyle=\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\frac{1}{|\mathcal{C}_{1}|^{2}}\sum_{\bm{z_{1}},\bm{z_{2}}\in\mathcal{C}_{1}+\bm{y}}(-1)^{\bm{\gamma}(\bm{z_{1}}\oplus\bm{z_{2}})^{T}}\left(e^{\imath\frac{\pi}{p}}\right)^{w_{H}(\bm{z_{1}})-w_{H}(\bm{z_{2}})}. (221)

Setting 𝒘=𝒛𝟏𝒛𝟐\bm{w}=\bm{z_{1}}\oplus\bm{z_{2}} and 𝒛=𝒛𝟐\bm{z}=\bm{z_{2}}, we obtain

1\displaystyle 1 =1|𝒞1|2𝒘𝒞1𝒛𝒞1+𝒚(eıπp)wH(𝒘𝒛)wH(𝒛)𝜸𝒞2/𝒞1(1)𝜸𝒘T\displaystyle=\frac{1}{|\mathcal{C}_{1}|^{2}}\sum_{\bm{w}\in\mathcal{C}_{1}}\sum_{\bm{z}\in\mathcal{C}_{1}+\bm{y}}\left(e^{\imath\frac{\pi}{p}}\right)^{w_{H}(\bm{w}\oplus\bm{z})-w_{H}(\bm{z})}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}(-1)^{\bm{\gamma}\bm{w}^{T}}
=1|𝒞1|2|𝒞1||𝒞2|𝒘𝒞2𝒛𝒞1+𝒚(eıπp)wH(𝒘𝒛)wH(𝒛)\displaystyle=\frac{1}{|\mathcal{C}_{1}|^{2}}\frac{|\mathcal{C}_{1}|}{|\mathcal{C}_{2}|}\sum_{\bm{w}\in\mathcal{C}_{2}}\sum_{\bm{z}\in\mathcal{C}_{1}+\bm{y}}\left(e^{\imath\frac{\pi}{p}}\right)^{w_{H}(\bm{w}\oplus\bm{z})-w_{H}(\bm{z})}
=1|𝒞1||𝒞2|𝒘𝒞2𝒛𝒞1+𝒚(eıπp)wH(𝒘)2wH(𝒘𝒛),\displaystyle=\frac{1}{|\mathcal{C}_{1}||\mathcal{C}_{2}|}\sum_{\bm{w}\in\mathcal{C}_{2}}\sum_{\bm{z}\in\mathcal{C}_{1}+\bm{y}}\left(e^{\imath\frac{\pi}{p}}\right)^{w_{H}(\bm{w})-2w_{H}(\bm{w}*\bm{z})}, (222)

Note that (222) implies every term in the double sum is equal to 11, which completes the proof.

C.9 Proof of Lemma 17

It follows from (4) that

|A𝟎,𝜸(θ)|2=1|𝒞1|𝒘𝒞1(1)𝜸𝒘Ts𝒘,|A_{\bm{0},\bm{\gamma}}(\theta)|^{2}=\frac{1}{|\mathcal{C}_{1}|}\sum_{\bm{w}\in\mathcal{C}_{1}}(-1)^{\bm{\gamma}\bm{w}^{T}}s_{\bm{w}}, (223)

where

s𝒘1|𝒞1|𝒛𝒞1+𝒚(eıθ)wH(𝒘)2wH(𝒘𝒛).s_{\bm{w}}\coloneqq\frac{1}{|\mathcal{C}_{1}|}\sum_{\bm{z}\in\mathcal{C}_{1}+\bm{y}}\left(e^{\imath\theta}\right)^{w_{H}(\bm{w})-2w_{H}(\bm{w}*\bm{z})}. (224)

Then

𝜸𝒞2/𝒞1|A𝟎,𝜸(θ)|2\displaystyle\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}|A_{\bm{0},\bm{\gamma}}(\theta)|^{2} =1|𝒞1|𝜸𝒞2/𝒞1(𝒘𝒞2(1)𝜸𝒘Ts𝒘+𝒘𝒞1𝒞2(1)𝜸𝒘Ts𝒘)\displaystyle=\frac{1}{|\mathcal{C}_{1}|}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\left(\sum_{\bm{w}\in\mathcal{C}_{2}}(-1)^{\bm{\gamma}\bm{w}^{T}}s_{\bm{w}}+\sum_{\bm{w}\in\mathcal{C}_{1}\setminus\mathcal{C}_{2}}(-1)^{\bm{\gamma}\bm{w}^{T}}s_{\bm{w}}\right)
=1|𝒞1|𝜸𝒞2/𝒞1𝒘𝒞2s𝒘+1|𝒞1|𝒘𝒞1𝒞2𝜸𝒞2/𝒞1(1)𝜸𝒘Ts𝒘\displaystyle=\frac{1}{|\mathcal{C}_{1}|}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\sum_{\bm{w}\in\mathcal{C}_{2}}s_{\bm{w}}+\frac{1}{|\mathcal{C}_{1}|}\sum_{\bm{w}\in\mathcal{C}_{1}\setminus\mathcal{C}_{2}}\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}(-1)^{\bm{\gamma}\bm{w}^{T}}s_{\bm{w}}
=1|𝒞1||𝒞1||𝒞2|𝒘𝒞2s𝒘=1|𝒞2|𝒘𝒞2s𝒘,\displaystyle=\frac{1}{|\mathcal{C}_{1}|}\frac{|\mathcal{C}_{1}|}{|\mathcal{C}_{2}|}\sum_{\bm{w}\in\mathcal{C}_{2}}s_{\bm{w}}=\frac{1}{|\mathcal{C}_{2}|}\sum_{\bm{w}\in\mathcal{C}_{2}}s_{\bm{w}}, (225)

where the last step follows from the fact for any 𝒘𝒞1𝒞2\bm{w}\in\mathcal{C}_{1}\setminus\mathcal{C}_{2}, 𝜸𝒞2/𝒞1(1)𝜸𝒘T=0\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}(-1)^{\bm{\gamma}\bm{w}^{T}}=0. Thus, (225) equals 11 if and only if s𝒘=1s_{\bm{w}}=1 for all 𝒘𝒞2\bm{w}\in\mathcal{C}_{2}. Note that s𝟎=1s_{\bm{0}}=1, and for all non-zero 𝒘\bm{w}, we have

s𝒘\displaystyle s_{\bm{w}} =1|𝒞1|𝒛𝒞1(eıθ)wH(𝒘)2wH(𝒘(𝒛𝒚))\displaystyle=\frac{1}{|\mathcal{C}_{1}|}\sum_{\bm{z}\in\mathcal{C}_{1}}\left(e^{\imath\theta}\right)^{w_{H}(\bm{w})-2w_{H}(\bm{w}*(\bm{z}\oplus\bm{y}))}
=1|𝒟𝒘|𝒗𝒟𝒘(eıθ)wH(𝒘(𝒗𝒚))\displaystyle=\frac{1}{|\mathcal{D}_{\bm{w}}|}\sum_{\bm{v}\in\mathcal{D}_{\bm{w}}}\left(e^{\imath\theta}\right)^{w_{H}(\bm{w}*(\bm{v}\oplus\bm{y}))}
=1|𝒟𝒘|𝒙𝒟𝒘+𝒘𝒚(eıθ)wH(𝒘)2wH(𝒙).\displaystyle=\frac{1}{|\mathcal{D}_{\bm{w}}|}\sum_{\bm{x}\in\mathcal{D}_{\bm{w}}+\bm{w}*\bm{y}}\left(e^{\imath\theta}\right)^{w_{H}(\bm{w})-2w_{H}(\bm{x})}. (226)

Thus, 𝜸𝒞2/𝒞1|A𝟎,𝜸(θ)|2=1\sum_{\bm{\gamma}\in\mathcal{C}_{2}^{\perp}/\mathcal{C}_{1}^{\perp}}\left|A_{\bm{0},\bm{\gamma}}(\theta)\right|^{2}=1 if and only if (161) holds for all non-zero 𝒘𝒞2\bm{w}\in\mathcal{C}_{2}. ∎

C.10 Proof of Lemma 18

We first show that 𝒟𝒘+𝒘𝒚proj𝒘(𝒵~𝒘)+𝒚\mathcal{D}_{\bm{w}}+\bm{w}*\bm{y}\subseteq\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp})+\bm{y}^{\prime}. Let 𝒛𝒞1\bm{z}\in\mathcal{C}_{1}. Then, 𝒘𝒛𝒘𝒚𝒟𝒘+𝒘𝒚\bm{w}*\bm{z}\oplus\bm{w}*\bm{y}\in\mathcal{D}_{\bm{w}}+\bm{w}*\bm{y}. Let 𝒗𝒵𝒘𝒞1\bm{v}\in\mathcal{Z}_{\bm{w}}\subseteq\mathcal{C}_{1}^{\perp}. We observe

(𝒘(𝒛𝒚)𝒚)𝒗=𝒛𝒘𝒗𝒚𝒘𝒗𝒚𝒗=𝒛𝒗𝒚𝒗𝒚𝒗,\left(\bm{w}*(\bm{z}\oplus\bm{y})\oplus\bm{y}^{\prime}\right)*\bm{v}=\bm{z}*\bm{w}*\bm{v}\oplus\bm{y}*\bm{w}*\bm{v}\oplus\bm{y}^{\prime}*\bm{v}=\bm{z}*\bm{v}\oplus\bm{y}*\bm{v}\oplus\bm{y}^{\prime}*\bm{v}, (227)

where the last step follows from supp(𝒙)supp(𝒘)\mathrm{supp}(\bm{x})\subseteq\mathrm{supp}(\bm{w}). Since 𝒙𝒞1\bm{x}\in\mathcal{C}_{1}^{\perp} and 𝒛𝒞1\bm{z}\in\mathcal{C}_{1}, wH(𝒛𝒗)=0mod2w_{H}(\bm{z}*\bm{v})=0\bmod 2. We consider two cases. If 𝒗𝒘𝒵𝒘\bm{v}\in\mathcal{B}_{\bm{w}}\subseteq\mathcal{Z}_{\bm{w}}, then wH(𝒚𝒗)=0mod2w_{H}(\bm{y}*\bm{v})=0\bmod 2 and wH(𝒚𝒗)=0mod2w_{H}(\bm{y}^{\prime}*\bm{v})=0\bmod 2. Otherwise, 𝒗𝒵𝒘𝒘\bm{v}\in\mathcal{Z}_{\bm{w}}\setminus\mathcal{B}_{\bm{w}}. Then wH(𝒚𝒗)=1mod2w_{H}(\bm{y}*\bm{v})=1\bmod 2 and wH(𝒚𝒗)=1mod2w_{H}(\bm{y}^{\prime}*\bm{v})=1\bmod 2. For both cases, wH((𝒘(𝒛𝒚)𝒚)𝒗)=0mod2w_{H}(\left(\bm{w}*(\bm{z}\oplus\bm{y})\oplus\bm{y}^{\prime}\right)*\bm{v})=0\bmod 2. Thus, 𝒘(𝒛𝒚)𝒚proj𝒘(𝒵~𝒘)\bm{w}*(\bm{z}\oplus\bm{y})\oplus\bm{y}^{\prime}\in\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp}), which implies that 𝒘(𝒛𝒚)proj𝒘(𝒵~𝒘)+𝒚\bm{w}*(\bm{z}\oplus\bm{y})\in\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp})+\bm{y}^{\prime}. Then, we have 𝒟𝒘+𝒘𝒚proj𝒘(𝒵~𝒘)+𝒚\mathcal{D}_{\bm{w}}+\bm{w}*\bm{y}\subseteq\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp})+\bm{y}^{\prime}.

It remains to show that |𝒟𝒘|=|proj𝒘(𝒵~𝒘)||\mathcal{D}_{\bm{w}}|=|\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp})|. We observe that 𝒟𝒘=𝒞1|𝟏𝒘=(𝒞1|𝟏𝒘)\mathcal{D}_{\bm{w}}=\mathcal{C}_{1}\big{|}_{\bm{1}-\bm{w}}=(\mathcal{C}_{1}^{\perp}\big{|}_{\bm{1}-\bm{w}})^{\perp}. Thus, dim(𝒟𝒘)=wH(𝒘)d𝒘=dim(𝒵𝒘)=dim(proj𝒘(𝒵~𝒘)),\dim(\mathcal{D}_{\bm{w}})=w_{H}(\bm{w})-d_{\bm{w}}=\dim(\mathcal{Z}_{\bm{w}}^{\perp})=\dim(\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp})), which completes the proof. ∎

C.11 Proof of Lemma 19

We rewrite (164) as

2𝒗𝒘(ıtanθ)wH(𝒗)𝒗𝒵𝒘(ıtanθ)wH(𝒗)=(secθ)wH(𝒘),2\sum_{\bm{v}\in\mathcal{B}_{\bm{w}}}\left(\imath\tan\theta\right)^{w_{H}(\bm{v})}-\sum_{\bm{v}\in\mathcal{Z}_{\bm{w}}}\left(\imath\tan\theta\right)^{w_{H}(\bm{v})}=\left(\sec\theta\right)^{w_{H}(\bm{w})}, (228)

and rearrange to obtain

2𝒗𝒘(cosθ)wH(𝒘)wH(𝒗)(sinθ)wH(𝒗)𝒗𝒵𝒘(cosθ)wH(𝒘)wH(𝒗)(sinθ)wH(𝒗)=1.2\sum_{\bm{v}\in\mathcal{B}_{\bm{w}}}\left(\cos\theta\right)^{w_{H}(\bm{w})-w_{H}(\bm{v})}\left(\sin\theta\right)^{w_{H}(\bm{v})}-\sum_{\bm{v}\in\mathcal{Z}_{\bm{w}}}\left(\cos\theta\right)^{w_{H}(\bm{w})-w_{H}(\bm{v})}\left(\sin\theta\right)^{w_{H}(\bm{v})}=1. (229)

We apply the MacWilliams Identities to P2θ[𝒘]P_{2\theta}[\mathcal{B}_{\bm{w}}] and P2θ[𝒵𝒘]P_{2\theta}[\mathcal{Z}_{\bm{w}}] (Pθ[𝒞]P_{\theta}[\mathcal{C}] is deifned in (4) for any angle θ\theta and linear code 𝒞\mathcal{C}) to obtain

2|𝒘|𝒛𝒘(eıθ)wH(𝒘)2wH(𝒛)1|𝒵𝒘|𝒛𝒵𝒘(eıθ)wH(𝒘)2wH(𝒛)=1.\frac{2}{|\mathcal{B}_{\bm{w}}^{\perp}|}\sum_{\bm{z}\in\mathcal{B}_{\bm{w}}^{\perp}}\left(e^{\imath\theta}\right)^{w_{H}(\bm{w})-2w_{H}(\bm{z})}-\frac{1}{|\mathcal{Z}_{\bm{w}}^{\perp}|}\sum_{\bm{z}\in\mathcal{Z}_{\bm{w}}^{\perp}}\left(e^{\imath\theta}\right)^{w_{H}(\bm{w})-2w_{H}(\bm{z})}=1. (230)

Since |𝒘|=2|𝒵𝒘||\mathcal{B}_{\bm{w}}^{\perp}|=2|\mathcal{Z}_{\bm{w}}^{\perp}|, 𝒘=proj𝒘(~𝒘)\mathcal{B}_{\bm{w}}^{\perp}=\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{B}}_{\bm{w}}^{\perp}), and 𝒵𝒘=proj𝒘(𝒵~𝒘)\mathcal{Z}_{\bm{w}}^{\perp}=\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp}), we obtain

1|proj𝒘(𝒵~𝒘)|𝒗proj𝒘(𝒵~𝒘)+𝒚(eiθ)wH(𝒘)2wH(𝒗)=1,\frac{1}{\left|\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp})\right|}\sum_{\bm{v}\in\mathrm{proj}_{\bm{w}}(\tilde{\mathcal{Z}}_{\bm{w}}^{\perp})+\bm{y^{\prime}}}\left(e^{i\theta}\right)^{w_{H}(\bm{w})-2w_{H}(\bm{v})}=1, (231)

which completes the proof. ∎