arxiv:2110.11923v1 [quant-ph] 22 oct 2021

15
Climbing the Diagonal Clifford Hierarchy Jingzhen Hu *, 1 , Qingzhong Liang *, 1 , and Robert Calderbank 1,2,3 1 Department of Mathematics, Duke University 2 Department of Electrical and Computer Engineering, Duke University 3 Department of Computer Science, Duke University, Durham, NC 27708, USA E-mail: {jingzhen.hu, qingzhong.liang, robert.calderbank}@duke.edu Abstract Magic state distillation and the Shor factoring algorithm make essential use of logical diagonal gates. We introduce a method of synthesizing CSS codes that realize a target logical diagonal gate at some level l in the Clifford hierarchy. The method combines three basic operations: concatenation, removal of Z -stabilizers, and addition of X-stabilizers. It explicitly tracks the logical gate induced by a diagonal physical gate that preserves a CSS code. The first step is concatenation, where the input is a CSS code and a physical diagonal gate at level l inducing a logical diagonal gate at the same level. The output is a new code for which a physical diagonal gate at level l + 1 induces the original logical gate. The next step is judicious removal of Z -stabilizers to increase the level of the induced logical operator. We identify three ways of climbing the logical Clifford hierarchy from level l to level l +1, each built on a recursive relation on the Pauli coefficients of the induced logical operators. Removal of Z -stabilizers may reduce distance, and the purpose of the third basic operation, addition of X-stabilizers, is to compensate for such losses. For the coherent noise model, we describe how to switch between computation and storage of intermediate results in a decoherence-free subspace by simply applying Pauli X matrices. The approach to logical gate synthesis taken in prior work focuses on the code states, and results in sufficient conditions for a CSS code to be fixed by a transversal Z -rotation. 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. The power of our approach to logical gate synthesis is demonstrated by two proofs of concept: the [[2 l+1 - 2, 2, 2]] triorthogonal code family, and the [[2 m , ( m r ) , 2 min{r,m-r} ]] quantum Reed-Muller code family. 1 Introduction The challenge of quantum computing is to combine error resilience with universal computation. 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 [1] such as the T gate ( T = Z 1/4 ) . Gottesman and Chuang [2] defined the Clifford hierarchy when introducing the teleportation model of quantum computing. 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 l th level consists of unitary operators that map Pauli operators to the (l - 1) th level under conjugation. The structure of the Clif- ford hierarchy has been studied extensively [3–8]. For l 3, the operators at level l are not closed under * The first two authors contributed equally to this work. matrix multiplication. However, the diagonal gates at each level l of the hierarchy do form a group [3,6], and the gates Z 1/2 l-1 ,C (i) Z 1/2 j with i + j = l - 1 generate this group [3]. The generators at the next level l + 1 can be obtained by taking a square root Z 1/2 l-1 Z 1/2 l or adding one more layer of con- trol C (i) Z 1/2 j C (i+1) Z 1/2 j as shown in Figure 7. Quantum error-correcting codes (QECCs) encode logical qubits into physical qubits, and protect infor- mation as it is transformed by logical gates. Given a logical diagonal operator among the generators of the diagonal Clifford hierarchy, we describe a general method for synthesizing a CSS code [9, 10] preserved by a diagonal physical gate which induces the target logical operator. Logical diagonal gates play a central role in quantum algorithms. In the Shor factoring al- gorithm [11, 12], our method applies to the C (i) Z 1/2 j 1 arXiv:2110.11923v2 [quant-ph] 27 Oct 2021

Upload: others

Post on 24-Mar-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Climbing the Diagonal Clifford Hierarchy

Jingzhen Hu∗,1, Qingzhong Liang∗,1, and Robert Calderbank1,2,3

1Department of Mathematics, Duke University2Department of Electrical and Computer Engineering, Duke University

3Department of Computer Science, Duke University, Durham, NC 27708, USA

E-mail: jingzhen.hu, qingzhong.liang, [email protected]

Abstract

Magic state distillation and the Shor factoring algorithm make essential use of logical diagonal gates. Weintroduce a method of synthesizing CSS codes that realize a target logical diagonal gate at some level l in theClifford hierarchy. The method combines three basic operations: concatenation, removal of Z-stabilizers,and addition of X-stabilizers. It explicitly tracks the logical gate induced by a diagonal physical gate thatpreserves a CSS code. The first step is concatenation, where the input is a CSS code and a physical diagonalgate at level l inducing a logical diagonal gate at the same level. The output is a new code for which aphysical diagonal gate at level l + 1 induces the original logical gate. The next step is judicious removal ofZ-stabilizers to increase the level of the induced logical operator. We identify three ways of climbing thelogical Clifford hierarchy from level l to level l+1, each built on a recursive relation on the Pauli coefficientsof the induced logical operators. Removal of Z-stabilizers may reduce distance, and the purpose of the thirdbasic operation, addition of X-stabilizers, is to compensate for such losses. For the coherent noise model,we describe how to switch between computation and storage of intermediate results in a decoherence-freesubspace by simply applying Pauli X matrices. The approach to logical gate synthesis taken in prior workfocuses on the code states, and results in sufficient conditions for a CSS code to be fixed by a transversalZ-rotation. In contrast, we derive necessary and sufficient conditions by analyzing the action of a transversaldiagonal gate on the stabilizer group that determines the code. The power of our approach to logical gatesynthesis is demonstrated by two proofs of concept: the [[2l+1 − 2, 2, 2]] triorthogonal code family, and the[[2m,

(mr

), 2minr,m−r]] quantum Reed-Muller code family.

1 Introduction

The challenge of quantum computing is to combineerror resilience with universal computation. Thereare many finite sets of gates that are universal, anda standard choice is to augment the set of Cliffordgates by a non-Clifford unitary [1] such as the T gate(T = Z1/4

). Gottesman and Chuang [2] defined the

Clifford hierarchy when introducing the teleportationmodel of quantum computing. The first level is thePauli group. The second level is the Clifford group,which consists of unitary operators that normalizethe Pauli group. The lth level consists of unitaryoperators that map Pauli operators to the (l − 1)th

level under conjugation. The structure of the Clif-ford hierarchy has been studied extensively [3–8]. Forl ≥ 3, the operators at level l are not closed under

∗The first two authors contributed equally to this work.

matrix multiplication. However, the diagonal gatesat each level l of the hierarchy do form a group [3,6],

and the gates Z1/2l−1, C(i)Z1/2j with i + j = l − 1

generate this group [3]. The generators at the nextlevel l + 1 can be obtained by taking a square root(Z1/2l−1 → Z1/2l

)or adding one more layer of con-

trol(

C(i)Z1/2j → C(i+1)Z1/2j)

as shown in Figure 7.

Quantum error-correcting codes (QECCs) encodelogical qubits into physical qubits, and protect infor-mation as it is transformed by logical gates. Givena logical diagonal operator among the generators ofthe diagonal Clifford hierarchy, we describe a generalmethod for synthesizing a CSS code [9,10] preservedby a diagonal physical gate which induces the targetlogical operator. Logical diagonal gates play a centralrole in quantum algorithms. In the Shor factoring al-gorithm [11,12], our method applies to the C(i)Z1/2j

1

arX

iv:2

110.

1192

3v2

[qu

ant-

ph]

27

Oct

202

1

diagonal gates which play an essential role in periodfinding. In magic state distillation (MSD) [13–22],the effectiveness of the protocol depends on engi-neering the interaction of a diagonal physical gatewith the code states of a stabilizer code [23,24]. Ourmethod transforms a CSS code supporting a lowerlevel logical operator to a CSS code supporting ahigher level logical operator. The coefficients in thePauli expansion of a diagonal gate satisfy a recur-sion that makes it possible to work backwards froma target logical gate.

Throughout the paper, we make use of an explicitrepresentation of the logical channel induced by a di-agonal physical gate. We prepare an initial state, ap-ply a physical gate, then measure a code syndromeµ, and finally apply a correction based on µ. Foreach syndrome, we expand the induced logical oper-ator in the Pauli basis to obtain the generator coeffi-cients [25] that capture state evolution. Intuitively,the diagonal physical gate preserves the code space ifand only if the induced logical operator correspond-ing to the trivial syndrome is unitary. To support theobjective of fault tolerance, we emphasize transversalgates [23], which are tensor products of unitaries onindividual code blocks. The approach taken in priorwork is to focus on the code states, and to derivesufficient conditions for a stabilizer code to be fixedby a transversal Z-rotation [13–15, 17–20, 22, 26]. Incontrast we derive necessary and sufficient conditionsby analyzing the action of a transversal diagonal gateon the stabilizer group that determines the code. Anadvantage of our approach is that we keep track ofthe induced logical operator.

The action of a diagonal physical operator UZon code states depends very strongly on the signsof Z-stabilizers [25, 27, 28] and our generator coef-ficient framework captures how these signs changethe logical operators induced by UZ . For the coher-ent noise model, a judicious choice of signs creates adecoherence-free subspace, that enables data storage.We can switch between computation and storage byapplying a Pauli matrix as described in Remark 3.

Haah [26] used divisibility properties of classi-cal codes to construct CSS codes with parame-ters [[O(dl−1),Ω(d), d]] that realize a transversal log-

ical Z1/2l−1. Modulo Clifford gates, his construc-

tion includes the [[2l, 1, 3]] punctured quantum Reed-Muller (QRM) codes [18] that support a single logi-

cal Z1/2l−2gate, and the family of [[6k+ 8, 2k, 2]] tri-

orthogonal code [15] that support a logical transver-sal T gate. In contrast we introduce three basic oper-ations - concatenation, removal of Z-stabilizers, and

addition of X-stabilizers - that can be combined tosynthesize an arbitrary logical diagonal gate. Wepresent the [[2m,

(mr

), 2minr,m−r]] QRM code fam-

ily [25,29] as a proof of concept.

physical level

logicallevel

Concatenation

Removing Z-stabilizers

Adding X-stabilizers

Example:

[[4,2,2]] [[64,2,2]]

[[64,15,4]]

+

Figure 1: Three basic operations that can be com-bined to synthesize a CSS code with higher distance,preserved by a diagonal physical gate which inducesa prescribed logical diagonal gate.

Figure 1 shows how the three basic operations com-bine to provide CSS codes where both distance andthe level of the induced logical operator are increas-ing. We now examine the three basic operations inmore detail.

1. Concatenation. Figure 1 shows that the levelof the induced logical operator is bounded bythat of the physical operator. Concatenation isdepicted in Figure 3 and described in Section3. We double the number of physical qubits toincrease the level of the physical diagonal gateand to make room for increasing the level of theinduced logical operator. Theorem 1 character-ize the family of physical diagonal gates act-ing on the new code to induce the same logi-cal gate. For example, the [[7, 1, 3]] Steane code[30] is preserved by a transversal Phase gate,

P⊗7 =(Z1/2

)⊗7, which induces a logical P †

gate. By concatenating once, we obtain the[[14, 1, 3]] CSS code that supports the logical P †

gate through a family of physical gates includingthe I⊗72 ⊗ P⊗7 physical gate at level 2 and thetransversal T gate (T⊗14) at level 3. The higherlevel gate creates the opportunity to use the sec-ond basic operation to increase the level of theinduced logical operator.

2. Removal of Z-stabilizers. This is depictedin Figure 4 and described in Section 4. We in-crease the code rate by removing a non-trivial Z-stabilizer to introduce a new logical qubit. Eachgenerator coefficient in the expansion of the orig-inal logical operator splits into two new genera-

2

tor coefficients. We provide necessary and suffi-cient conditions for the new code to be preservedby the original physical diagonal gate. In thiscase we say that the removal/split is admissible.We describe three types of admissible split thatincrease the level of the induced logical operator,each built on a recursive relation on the genera-tor coefficients. The two splits described in Fig-ure 5 apply trigonometric identities. When thephysical gate is a transversal Z1/2l , Theorem 5specifies the Z-stabilizer that is to be removed.For example, removing the all-one Z-stabilizerfrom the [[14, 1, 3]] code gives the [[14, 2, 2]] tri-orthogonal code, and the induced logical oper-ator becomes a transversal T †. Distance maydecrease after removing a Z-stabilizer, and thepurpose of the third basic operation is to com-pensate this loss.

3. Addition of X-stabilizers. This is depictedin Figure 8 and described in Section 5. We de-rive necessary and sufficient conditions for thenew code after addition to be preserved by theoriginal physical diagonal gate, and we say thatthe addition is admissible in this case. Ourconditions require that half the generator co-efficients associated with the trivial syndromemust vanish. For an admissible addition, weshow that the level of the induced logical opera-tor is unchanged. We may need to concatenateseveral times and to remove several independentZ-stabilizers in order to create sufficiently manyzeros to enable an admissible addition. For ex-ample, consider the [[4, 2, 2]] CSS code definedby the stabilizer group S = 〈X⊗4, Z⊗4〉. Up tosome logcial Pauli Z, the code realizes a logi-cal CZ by a transversal Phase gate. We firstconcatenate 4 times to obtain the [[64, 2, 2]] CSScode with the same logical operator, but inducedby a physical transversal T gate. Then, we re-move 19 independent Z-stabilizers to producethe [[64, 21, 2]] code that realizes 15 logical CCZgates (up to logical Pauli Z) induced by a phys-ical transversal T gate. Finally, we add 6 in-dependent X-stabilizers to increase the distanceand arrive the [[64, 15, 4]] QRM code supportingthe same physical and logical gates.

The next Section introduces notation and providesnecessary background. Section 3, 4, and 5 introduceconcatenation, removal of Z-stabilizers, and additionof X-stabilizers respectively.

2 Preliminaries and Notation

2.1 The Pauli Group

Let ı :=√−1 be the imaginary unit. Any 2× 2 Her-

mitian matrix can be uniquely expressed as a reallinear combination of the four single qubit Pauli ma-trices/operators

I2 :=

[1 00 1

], X :=

[0 11 0

], Z :=

[1 00 −1

], (1)

and Y := ıXZ. The operators satisfy X2 = Y 2 =Z2 = I2, XY = −Y X, XZ = −ZX, and Y Z =−ZY.

Let F2 = 0, 1 denote the binary field. Letn ≥ 1 and N = 2n. Let A ⊗ B denote the Kro-necker product (tensor product) of two matrices Aand B. Given binary vectors a = [a1, a2, . . . , an] andb = [b1, b2, . . . , bn] with ai, bj = 0 or 1, we define theoperators

D(a, b) := Xa1Zb1 ⊗ · · · ⊗XanZbn , (2)

E(a, b) := ıabT mod 4D(a, b). (3)

We often abuse notation and write a, b ∈ Fn2 ,though entries of vectors are sometimes interpretedin Z4 = 0, 1, 2, 3. Note that D(a, b) can have

order 1, 2 or 4, but E(a, b)2 = ı2abTD(a, b)2 =

ı2abT

(ı2abTIN ) = IN . The n-qubit Pauli group is de-

fined as

HWN := ıκD(a, b) : a, b ∈ Fn2 , κ ∈ Z4, (4)

where Z2l = 0, 1, . . . , 2l − 1. The n-qubit Paulimatrices form an orthonormal basis for the vectorspace of N ×N complex matrices (CN×N ) under thenormalized Hilbert-Schmidt inner product 〈A,B〉 :=Tr(A†B)/N [23].

We use the Dirac notation, |·〉 to represent thebasis states of a single qubit in C2. For any v =[v1, v2, · · · , vn] ∈ Fn2 , we define |v〉 = |v1〉 ⊗ |v2〉 ⊗· · · ⊗ |vn〉, the standard basis vector in CN with 1in the position indexed by v and 0 elsewhere. Wewrite the Hermitian transpose of |v〉 as 〈v| = |v〉†.We may write an arbitrary n-qubit quantum stateas |ψ〉 =

∑v∈Fn2

αv|v〉 ∈ CN , where αv ∈ C and∑v∈Fn2

|α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〉.

The symplectic inner product is 〈[a, b], [c,d]〉S =adT + bcT mod 2. Since XZ = −ZX, we have

E(a, b)E(c,d) = (−1)〈[a,b],[c,d]〉SE(c,d)E(a, b).(5)

3

2.2 The Clifford Hierarchy

The Clifford hierarchy of unitary operators was intro-duced in [2]. The first level of the hierarchy is definedto be the Pauli group C(1) = HWN . For l ≥ 2, thelevels l are defined recursively as

C(l) := U ∈ UN : UHWNU† ⊂ C(l−1), (6)

where UN is the group of N × N unitary matrices.The second level is the Clifford Group, C(2), whichcan be generated (up to overall phases) using the “el-ementary” unitaries Hadamard, Phase, and either ofControlled-NOT (CX) or Controlled-Z (CZ) definedrespectively as

H :=

[1 11 −1

], P :=

[1 00 ı

], (7)

CZab := |0〉〈0|a ⊗ (I2)b + |1〉〈1|a ⊗ Zb, (8)

CXa→b := |0〉〈0|a ⊗ (I2)b + |1〉〈1|a ⊗Xb. (9)

Note that Clifford unitaries in combination withany unitary from a higher level can be used to ap-proximate any unitary operator arbitrarily well [1].Hence, they form a universal set for quantum com-putation. A widely used choice for the non-Cliffordunitary is the T gate in the third level defined by

T :=

[1 0

0 eıπ4

]=√P = Z

14 ≡

[e−

ıπ8 0

0 eıπ8

]= e−

ıπ8Z .

(10)

Let DN be the N ×N diagonal matrices, and C(l)d :=C(l) ∩ DN . While C(l) for l ≥ 3 do not form agroup any more, the diagonal gates in each level

of the hierarchy, C(l)d , form a group. Note that

C(l)d can be generated using the “elementary” uni-

taries C(0)Z1

2l , C(1)Z1

2l−1 , . . . ,C(l−2)Z12 , C(l−1)Z [3],

where C(i)Z1

2j :=∑u∈Fi+1

2|u〉〈u| + e

ı π2j |1〉〈1| and

here 1 ∈ Fi+12 is the vector consists of all ones.

2.3 Stabilizer Codes

We define a stabilizer group S to be a commuta-tive subgroup of the Pauli group HWN , where ev-ery group element is Hermitian and no group ele-ment is −IN . We say S has dimension r if it canbe generated by r independent elements as S =〈νiE(ci,di) : i = 1, 2, . . . , r〉, where νi ∈ ±1 andci,di ∈ Fn2 . Since S is commutative, we must have〈[ci,di], [cj ,dj ]〉S = cid

Tj + dic

Tj = 0 mod 2.

Given a stabilizer group S, the corresponding sta-bilizer code is the fixed subspace V(S) := |ψ〉 ∈

CN : g|ψ〉 = |ψ〉 for all g ∈ S. We refer to thesubspace V(S) as an [[n, k, d]] stabilizer code becauseit encodes k := n − r logical qubits into n physicalqubits. The minimum distance d is defined to be theminimum weight of any operator in NHWN

(S) \ S.Here, the weight of a Pauli operator is the numberof qubits on which it acts non-trivially (i.e., as X, Yor Z), and NHWN

(S) denotes the normalizer of S inHWN .

For any Hermitian Pauli matrix E (c,d) and ν ∈±1, the operator IN+νE(c,d)

2 projects onto the ν-eigenspace of E (c,d). Thus, the projector onto thecodespace V(S) of the stabilizer code defined by S =〈νiE (ci,di) : i = 1, 2, . . . , r〉 is

ΠS =

r∏i=1

(IN + νiE (ci,di))

2=

1

2r

2r∑j=1

εjE (aj , bj) ,

(11)where εj ∈ ±1 is a character of the groupS, and is determined by the signs of the gen-erators that produce E(aj , bj): εjE (aj , bj) =∏t∈J⊂1,2,...,r νtE (ct,dt) for a unique J .A CSS (Calderbank-Shor-Steane) code is a par-

ticular type of stabilizer code with generators thatcan be separated into strictly X-type and strictly Z-type operators. Consider two classical binary codesC1, C2 such that C2 ⊂ C1, and let C⊥1 , C⊥2 denotethe dual codes. Note that C⊥1 ⊂ C⊥2 . Supposethat C2 = 〈c1, c2, . . . , ck2〉 is an [n, k2] code andC⊥1 = 〈d1,d2 . . . ,dn−k1〉 is an [n, n−k1] code. Then,the corresponding CSS code has the stabilizer group

S = 〈ν(ci,0)E (ci,0) , ν(0,dj)E (0,dj)〉i=k2; j=n−k1i=1; j=1

= ε(a,0)ε(0,b)E (a,0)E (0, b) : a ∈ C2, b ∈ C⊥1 ,

where ν(ci,0), ν(0,dj), ε(a,0), ε(0,b) ∈ ±1. Wecapture sign information through character vec-tors y ∈ Fn2/C1, r ∈ Fn2/C⊥2 such that for anyε(a,0)ε(0,b)E (a,0)E (0, b) ∈ S, we have ε(a,0) =

(−1)arT

and ε(0,b) = (−1)byT

. If C1 and C⊥2 can cor-rect up to t errors, then S defines an [[n, k1 − k2, d]]CSS code with d ≥ 2t + 1, which we will representas CSS(X, C2, r;Z, C⊥1 ,y). If G2 and G⊥1 are the gen-erator matrices for C2 and C⊥1 respectively, then the(n− k1 + k2)× (2n) matrix

GS =

[G2

G⊥1

](12)

generates S.Since we consider diagonal gates, the signs of X-

stabilizers do not matter. We then assume r = 0 inthe rest of this paper.

4

0

C2

C1

Fn2

k2

k1

0

C⊥1

C⊥2

Fn2µ

γ

2n−k1

way

sto

ass

ign

the

sign

sofZ

-sta

bil

izer

s

2k2 different syndromes µ ∈ Fn2/C⊥2 of X-stabilizers

......

...

· · ·

· · ·

· · ·ρ1

ρ2

ρ3

ρ4

UZ

P (syndrome = µ)

correction

syndrome µ

Z-logicals γ ∈ C⊥2 /C⊥1

Figure 2: The 2n−k1 rows of the array are indexed by the [[n, k1−k2, d]] CSS codes corresponding to all possiblesigns of the Z-stabilizer group. The 2k2 columns of the array are indexed by all possible X-syndromes µ.The logical operator Bµ is induced by (1) preparing any code state ρ1; (2) applying a diagonal physical gateUZ to obtain ρ2; (3) using X-stabilizers to measure ρ2, obtaining the syndrome µ with probability pµ, andthe post-measurement state ρ3; (4) applying a Pauli correction to ρ3, obtaining ρ4. Graph from [25].

2.4 Generator Coefficient Framework

The Generator Coefficient Framework was intro-duced in [25] to describe the evolution of stabi-lizer code states under a physical diagonal gateUZ =

∑u∈Fn2

du|u〉〈u|. Note that |u〉〈u| =12n∑v∈Fn2

(−1)uvTE(0,v). Then we may expand UZ

in the Pauli basis

UZ =∑v∈Fn2

f(v)E(0,v), (13)

where

f(v) =1

2n

∑u∈Fn2

(−1)uvTdu. (14)

Note that we can connect the coefficients in standardbasis and Pauli basis as

[f(v)]v∈Fn2 = [du]u∈Fn2H2n , (15)

where H2n = H ⊗ H2n−1 = H⊗n is the Walsh-Hadamard matrix.

We consider the average logical channel inducedby UZ of an [[n, k, d]] CSS(X, C2;Z, C⊥1 ,y) code as de-scribed in Figure 2. Let Bµ be the induced logical

operator corresponding to the syndrome µ. Then theevolution of code states can be described as

ρ4 =∑

µ∈Fn2 /C⊥2

Bµρ1B†µ. (16)

The generator coefficients Aµ,γ are obtained by ex-panding the logical operator Bµ in terms of Z-logicalPauli operators ε(0,γ)E(0,γ),

Bµ = ε(0,γµ)E(0,γµ)∑

γ∈C⊥2 /C⊥1

Aµ,γ ε(0,γ)E(0,γ),

(17)

where ε(0,γµ)E(0,γµ) models the Z-logical Pauli op-erator introduced by a decoder. For each pair of aX-syndrome µ ∈ Fn2/C⊥2 and a Z-logical γ ∈ C⊥2 /C⊥1 ,the generator coefficient Aµ,γ corresponding to UZ is

Aµ,γ :=∑

z∈C⊥1 +µ+γ

ε(0,z)f(z), (18)

where ε(0,z) = (−1)zyT

is the sign of the Z-stabilizerE(0, z). Based on the structure of CSS codes, gen-erator coefficients group the Pauli coefficients of UZ

5

0

C2

C1

Fn2

0

C⊥1

C⊥2

Fn2µ

γ

0

C′2 = [1, 1]⊗ C2

C′1 = [1, 1]⊗ C1

F2n2

0

(C′1)⊥ = [α,β] : α⊕ β ∈ C⊥1

(C′2)⊥ = [α,β] : α⊕ β ∈ C⊥2

F2n2

[[2n, k, d′ ≥ d]][[n, k, d]] y′ = [1, 1]⊗ y

µ′ = [µ,0]

γ ′ = [γ,0]→physical level

Figure 3: Concatenation transforms an [[n, k, d]] CSS code preserved by a diagonal gate UZ at level l to a[[2n, k, d′]] CSS code preserved by a family of diagonal gates U ′Z , some of which are at level l+ 1. The logicaloperator induced by U ′Z coincides with the logical operator induced by UZ .

together, and tune them by the signs of Z-stabilizer.We use (14) to simplify (18) as

Aµ,γ =1

2n

∑u∈Fn2

∑z∈C⊥1 +µ+γ

(−1)zyT

(−1)zuTdu

=1

|C1|∑

u∈C1+y(−1)(µ⊕γ)(y⊕u)

Tdu. (19)

The diagonal physical gate UZ preserves aCSS(X, C2;Z, C⊥1 ,y) codespace if and only if Bµ=0

is a unitary [25], which is equivalent to requiring∑γ∈C⊥2 /C⊥1

|A0,γ |2 = 1. (20)

Note that (20) is also equivalent to Aµ 6=0,γ = 0 forall γ ∈ C⊥2 /C⊥1 . The induced logical operator is

ULZ =∑α∈Fk2

A0,g(α)E(0,α), (21)

where g : Fk2 → C⊥2 /C⊥1 is a bijective map defined byg(α) = αGC⊥2 /C⊥1

, and GC⊥2 /C⊥1is a generator matrix

of the Z-logicals C⊥2 /C⊥1 .

3 Climbing the Physical Hierarchy

We need to climb the physical Clifford hierarchy be-cause the level of the physical operator bounds thatof the induced logical operator. Consider a physicaldiagonal gate

UZ =∑u∈Fn2

du|u〉〈u|, (22)

that preserves an [[n, k, d]] CSS(X, C2;Z, C⊥1 ,y) codewith X-distance

dX := minx∈C1\C2

wH(x), (23)

and Z-distance

dZ := minz∈C⊥2 \C⊥1

wH(z). (24)

We denote the logical operator induced by UZ as ULZ .The concatenation process described in Figure 3 pro-duces a [[2n, k, d′]] CSS(X, C′2;Z, (C′1)⊥,y′) code. Con-catenation does not change the number of Z-logicalsor the number of X-syndromes, and so the numberof generator coefficients remains the same. We nowshow this code is preserved by an ensemble of phys-ical gates, all inducing the same logical operator asULZ .

Theorem 1. The [[2n, k, d′]] CSS(X, C′2;Z, (C′1)⊥,y′)code is preserved by any diagonal physical gate

U ′Z =∑u′∈F2n

2

d′u′ |u′〉〈u′|, (25)

for which d′[u,u] = du for all u ∈ Fn2 .

The minimum distance d′ ≥ d and the induced logicaloperator (U ′Z)L is equal to ULZ .

Proof. Let d′X , d′Z be the X- and Z-distances for the

CSS(X, C′2;Z, (C′1)⊥,y′) code. Given x′ ∈ C′1 \ C′2,there exists x ∈ C1 \ C2 such that x′ = [1, 1]⊗x, andso d′X = 2dX . Given [α,β] ∈ (C′2)⊥ \ (C′1)⊥, we have

wH([α,β]) = wH(α) + wH(β) ≥ wH(α⊕ β), (26)

and so d′Z ≥ dZ . Concatenation doubles X-distancewhile maintaining Z-distance.

We now prove that (U ′Z)L = ULZ by showing the

6

generator coefficients remain the same:

A′µ′,γ′(U′Z) =

1

|C′1|∑

u′∈C′1+y′(−1)(µ

′⊕γ′)(y′⊕u′)T d′u′

=1

|C1|∑

u∈C1+y(−1)[µ⊕γ,0][y⊕u,y⊕u]

Td′[u,u]

=1

|C1|∑

u∈C1+y(−1)(µ⊕γ)(y⊕u)

Tdu

= Aµ,γ(UZ). (27)

Hence, concatenation brings more freedom of physi-cal operators to realize the same logical operator.

We may partition U ′Z into 2n blocks, where theblock indexed by u ∈ Fn2 is a 2n×2n diagonal matrixdiag[d′[u,v]]. Theorem 1 specifies a single diagonal

entry d′[u,u] in each block. The remaining 22n − 2n

entries can be freely chosen to design the unitary U ′Z .

When UZ (on n qubits) is a transversal C(i)Z1/2j

gate at level i + j in the clifford hierarchy, we canchoose U ′Z to be the transversal C(i)Z1/2j+1

gate (on2n qubits) at level i+ j + 1.

Remark 2 (Quadratic Form Diagonal (QFD) gates).We now describe how to raise the level of a QFD gate

τ(l)R ∈ C

(l)d at level l in the Clifford hierarchy. Here

τ(l)R =

∑v∈Fn2

ξvRvT mod 2l

l |v〉〈v|, (28)

where ξl = eı π

2l−1 , and R is an n×n symmetric matrixwith entries in Z2l , the ring of integers modulo 2l.Note that the exponent vRvT ∈ Z2l . Rengaswamy etal. [7] proved that QFD gates include all 1-local and2-local diagonal gates in the Clifford hierarchy. We

choose U ′Z = τ(l+1)I2⊗R ∈ C

(l+1)d , and observe

d′u,u = ξ2uRuT

l+1 = ξuRuT

l = du. (29)

Example 1 (Climbing from P⊗7 acting onthe [[7, 1, 3]] Steane code to T⊗14 acting on the[[14, 1, 3]] CSS code). The Steane code [30] is aCSS(X, C2;Z, C⊥1 ,y = 0) code with generator matrix

GS =

[H

H

], (30)

where H is the parity-check matrix of the Hammingcode:

H =

1 1 1 1 0 0 01 1 0 0 1 1 01 0 1 0 1 0 1

. (31)

The only nontrivial Z-logical corresponds to the allone vector 1. After concatenation described in Figure3, we obtain a [[14, 1, 3]] CSS code. When R = In,

τ(2)R = P⊗n and τ

(3)I2⊗R = T⊗2n. Let Aµ,γ

(π2

)and

A′µ′,γ′(π4

)be the generator coefficients corresponding

to P⊗7 and T⊗14 acts on the [[7, 1, 3]] and [[14, 1, 3]]code respectively. Then, we have

Aµ=0,γ=0

(π2

)= A′[0,0],[1,0]

(π4

)= cos

(π4

),

Aµ=0,γ=1

(π2

)= A′[0,0],[1,0]

(π4

)= ı sin

(π4

), (32)

which implies that the invariance of [[7, 1, 3]] underP⊗7 and that of [[14, 1, 3]] under T⊗14. It then followsfrom the expression of the induced logical operator in(21) that both of the codes implement a logical P †.

Example 2 (Climbing from CZ⊗2 acting on the[[4, 2, 2]] CSS code to CP⊗4 acting on the [[8, 2, 2]]CSS code). Consider the [[4, 2, 2]] CSS(X, C2;Z, C⊥1 )code with C2 = C⊥1 = 0,1. We may choose thegenerators of Z-logicals to be γ1 = [0, 0, 1, 1] andγ2 = [0, 1, 1, 0]. Their generator coefficients coincide:

Aµ=0,γ=0(CZ⊗2) = A′[0,0],[0,0](CP⊗4) =

1

2,

Aµ=0,γ=γ1(CZ⊗2) = A′[0,0],[γ1,0](CP⊗4) = −1

2,

Aµ=0,γ=γ2(CZ⊗2) = A′[0,0],[γ2,0](CP⊗4) =

1

2,

Aµ=0,γ=γ1⊕γ2(CZ⊗2) = A′[0,0],[γ1⊕γ2,0](CP⊗4) =

1

2.

(33)

Both cases realize a logical Z1CZ := (Z ⊗ I)CZ.

Remark 3 (Switching between Computation andStorage). It is the choice of character vector thatdistinguishes the method of concatenation depictedin Figure 3 from the method of constructing adecoherence-free subspaces (DFS) described in [27].Consider the graph where the vertices are the qubitsinvolved in the support of some X-stabilizer, andwhere two vertices are joined by an edge if there ex-ists a weight 2 Z-stabilizer involving these two qubits.Instead of choosing y′ = [1, 1] ⊗ y, Liang, Hu etal. [27] balance the signs of Z-stabilizers by requir-ing that the support of y′′ include half the qubits inevery connected component of the graph. The sta-bilizer group determines a resolution of the identity.To change the signs of Z-stabilizers, we simply applysome physical Pauli X to transform from one part ofthe resolution to the other part (see [25, Example 3]for more details). To determine the specific position

7

(a) Removing a non-trivial Z-stabilizer

0

C2

C1

Fn2

w0

0

C⊥1

C⊥2

Fn2

γ0

γ ∈ C⊥2 /C⊥1

µAµ,γ

γ ′ ∈ 〈C⊥2 /C⊥1 ,γ0〉

µ′ = µ

A′µ,γ′=γ A′µ,γ′=γ⊕γ0

(b) Aµ,γ = A′µ,γ +A′µ,γ⊕γ0

remove add

Figure 4: (a) Removing a Z-stabilizer γ0 creates a new Z-logical, and transforms an old Z-syndrome w0 intoa new X-logical. (b) Removing/adding a Z-stabilizer induces splitting/grouping of generator coefficients.

to add these extra Pauli X, we consider the generalencoding map ge : |α〉L ∈ Fk2 → |α〉 ∈ V(S) of aCSS(X, C2, r;Z, C⊥1 ,y) code [25],

|α〉 :=1√|C2|

∑x∈C2

(−1)xrT |αGC1/C2 ⊕ x⊕ y〉, (34)

where r,y are the character vectors for X- and Z-stabilizers, and GC1/C2 is a generator matrix of theX-logicals C1/C2. The positions of these Pauli Xcorrespond to the support of the difference of twocharacter vectors y′ − y′′. Hence it is simple toswitch between computation and storage. Given acode that realizes a specific diagonal logical opera-tor induced by the physical gate UZ , we first applythe concatenation described in Figure 3. After con-catenation, we choose U ′Z = IN ⊗ UZ , at the samelevel as UZ , to realize the same specific logical opera-tor. We then apply some physical Pauli X to changesigns of Z-stabilizers and embed the logical informa-tion in a DFS. To continue the computation, we re-cover the stored results by applying the same PauliX. Note that concatenation doubles the X-distance,which improves protection when we change the signsof Z-stabilizers.

For example, suppose our goal is to first implementa logical P † and to wait for a while before calculatingthe next step. We can apply the physical U ′Z = I⊗72 ⊗P⊗7 to the [[14, 1, 3]] CSS code in Example 1 to realizethe logical P †. Note that y′ = 0 ∈ F14

2 and one choiceof y′′ is [1, 0]⊗17 ∈ F14

2 . Then we can apply Pauli Xalternatively to map the computed result in a DFS.

To achieve more advanced computation, we needdiagonal logical operators from higher levels. Raising

the level of a physical operator prepares the groundfor climbing the logical hierarchy.

4 Climbing the Logical Hierarchy

In this Section, we describe how to increase the levelof an induced logical operator by judiciously remov-ing Z-stabilizers from a CSS code. We start by con-sidering a physical diagonal gate

UZ =∑v∈Fn2

f(v)E(0,v) (35)

that preserves an [[n, k, d]] CSS(X, C2;Z, C⊥1 ,y) code.The induced logical channels are described by gen-erator coefficients Aµ,γ where µ ∈ Fn2/C⊥2 and γ ∈C⊥2 /C⊥1 . Let γ0 ∈ C⊥1 be a nontrivial Z-stabilizer.Set C⊥1 = 〈(C′1)⊥,γ0〉, and set C′1 = 〈C1,w0〉, wherew0 ∈ Fn2/C1. If we remove γ0 from C⊥1 , thenγ0 becomes a Z-logical for the [[n, k + 1, d′ ≤ d]]CSS(X, C2;Z, (C′1)⊥,y) code, as shown in Figure 4(a).Removing the Z-logical γ0 doubles the number of Z-logicals. Each generator coefficient Aµ,γ associatedwith the original CSS code splits into two generatorcoefficients A′µ,γ′=γ and A′µ,γ′=γ⊕γ0 associated withthe new code. We have

Aµ,γ =∑

z∈〈(C′1)⊥,γ0〉+µ+γ

ε(0,z)f(z)

=∑

z∈(C′1)⊥+µ+γ

ε(0,z)f(z)

+∑

z∈(C′1)⊥+µ+γ+γ0

ε(0,z)f(z)

= A′µ,γ′=γ +A′µ,γ′=γ⊕γ0 . (36)

8

(a)

(b)

I Z

cl sl

II IZ ZI ZZ

c2l+1cl+1sl+1 cl+1sl+1 s2l+1

Z1/2l−1

(Z1/2l

)⊗2

Double-Angle

Formulas

xl = eıπ/2l

cl = cos π2l, sl = −ı sin π

2l

Z1/2l−1=

1+xl−1

2 I +1−xl−1

2 Z

= xl(clI + slZ)

≡ clI + slZ

I Z

xlcl xlsl

II IZ ZI ZZ

xl+1clcl+1 −xl+1clsl+1 xl+1slcl+1 −xl+1slsl+1

Z1/2l−1

Z1/2l−1

⊗(Z1/2l

)†

Z1/2l−1

⊗(Z1/2l

)†⊗ · · · ⊗

(Z1/2l−1+j

)†...

Euler’s

Formula

Figure 5: Admissible Splits of Z-rotations: (a) One step for uniform rotations from Z1/2l−1to Z1/2l⊗Z1/2l ;

(b) Multi-step for non-uniform rotations Z → Z ⊗ P † → Z ⊗ P † ⊗ T † → · · · .

Adding a Z-stabilizer simply reverses this process asshown in Figure 4(b).

Definition 4 (Admissible Splits). A split isadmissible if the physical diagonal gate UZ preservesthe CSS(X, C2;Z, (C′1)⊥,y) code obtained by remov-ing the non-trivial Z-stabilizer γ0.

Since UZ preserves the original CSS code, we have∑γ∈C⊥2 /C⊥1

|A0,γ |2 = 1. (37)

The condition∑γ′∈〈C⊥2 /C⊥1 ,γ0〉

|A′0,γ′ |2 =∑

γ∈C⊥2 /C⊥1

|A′0,γ |2 + |A′0,γ⊕γ0 |2

= 1. (38)

is both necessary and sufficient for admissibility.Note that the induced logical operator (21) corre-sponding to the trivial syndrome remains a diagonalunitary after splitting.

It is natural to ask how many Z-stabilizers areneeded to determine a stabilizer code fixed by a givenfamily of diagonal physical operators UZ . Liang,Hu et al. [27] derived necessary and sufficient con-ditions for all transversal Z-rotations to preserve thecodespace of a stabilizer code. The conditions requirethe weight 2 Z-stabilizers to cover all the qubits thatare in the support of the X-component of some sta-bilizer. Rengaswamy et al. [29] derived less restric-tive necessary and sufficient conditions for a singletransversal T gate.

The difference A′0,γ −A′0,γ⊕γ0 depends on the new

X-logical w0. For γ ∈ C⊥2 /C⊥1 , let

sγ(w0) :=1

|C1|∑

u∈C1+w0

(−1)γuTdu⊕y. (39)

It then follows from (19) that

A′0,γ =1

2|C1|∑

u∈〈C1,w0〉

(−1)γuTdu⊕y

=1

2(A0,γ + sγ(w0)) , (40)

and follows from (36) that

A′0,γ⊕γ0 =1

2(A0,γ − sγ(w0))) . (41)

The quantity sγ(w0) determines whether or not asplit is admissible.

We design extensible splittings by expanding di-agonal operators in the Pauli basis, and we illus-trate our approach by constructing Z1/2l⊗Z1/2l fromZ1/2l−1

. We write

Z1/2l−1 ≡ clI + slZ, (42)

where cl := cosπ/2l and sl := −ı sinπ/2l. Figure5(a) shows how we construct(

Z1/2l)⊗2≡ c2l+1I ⊗ I + cl+1sl+1(I ⊗ Z + Z ⊗ I)

+ s2l+1Z ⊗ Z, (43)

by making use of the double angle formulas

9

I Z

c1(0) = 1+xl−1

2 c1(1) = 1−xl−1

2

II IZ ZI ZZ

c2(00) = c1(0)+12 c2(01) = c1(1)

2 c2(10) = c1(0)−12 c2(11) = c1(1)

2

III IIZ IZI IZZ ZII ZIZ ZZI ZZZ

c2(00)+12

c2(01)2

c2(10)2

c2(11)2

c2(01)2

c2(11)2

c2(00)−12

c2(10)2

Z1/2l−1

CZ1/2l−1

CCZ1/2l−1

C(j)Z1/2l−1

...

j is odd

j is even

Hadamard

Construction

Figure 6: Admissible Splits from C(j−1)Z1/2l−1to C(j)Z1/2l−1

for any fixed l ≥ 1.

cl = c2l+1 + s2l+1 and sl = 2cl+1sl+1. (44)

Recall that generator coefficients coincide with Paulicoefficients of the induced logical operator as de-scribed in (21). The splitting rule determines the val-ues sγ(w0) needed to satisfy in (40) and (41). Herewe require

sγ(w0) =

1, if γ = 0,0, if γ 6= 0,

(45)

since we can write double-angle formulas as

c2l+1 =1

2(cl + 1) , s2l+1 =

1

2(cl − 1) , (46)

and sl+1cl+1 =1

2(sl + 0) . (47)

Note that this design only connects a single level inthe Clifford hierarchy to the next level, that it doesnot extend indefinitely. In Figure 5(b), we generalizethe design to make it extend indefinitely. We includethe global phase xl := eıπ/2

lthis time, and decompose

part of xl using the Euler’s formula

xl = xl+1xl+1 = xl+1(cl+1 − sl+1). (48)

Note that Z1/2l−1= xl(clI + slZ) and

(Z1/2l

)†=

xl+1

xl(cl+1I − sl+1Z). Then after splitting, we obtain

the gate in one level higher

Z1/2l−1 ⊗(Z1/2l

)†=xl+1(clcl+1I ⊗ I − clsl+1I ⊗ Z

+ slcl+1Z ⊗ I − slsl+1Z ⊗ Z).(49)

The decomposition in (48) holds for any l, and we canuse induction to prove that after splitting j times, weobtain the gate

Z1/2l−1 ⊗(Z1/2l

)†⊗ · · · ⊗

(Z1/2l−1+j

)†. (50)

Because of the non-uniform rotations, the valuessγ(w0) needed to satisfy vary from step to step. Wenow introduce a splitting that is indefinitely extensi-ble with simple requirement for sγ(w0).

The diagonal operator C(j−1)Z1/2l−1= diag[dj ] for

dj = [12j−1 ,12j−1−1, xl−1]T , (51)

where 1m is the all-one vector with length m. Lete1, . . . , e2j be the standard basis of F2j

2 .We expand

C(j−1)Z1/2l−1in the Pauli basis using the Walsh-

Hadamard matrix H2j ,

C(j−1)Z1/2l−1=∑v∈Fj2

cj(v)E(0, v), (52)

where cj := [cj(v)]v∈Fj2

is given by

cj = H2jdj = H2j (12j + (xl − 1) e2j )

= e1 +

(xl − 1

2j

)[(−1)wH(v)]T

v∈Fj2. (53)

The recursive construction for the Walsh-Hadamardmatrix leads to a recursion for the coefficients cj(v),

cj+1 =1

2

[H2j−1 H2j−1

H2j−1 −H2j−1

] [12j

dj

](54)

so that

cj+1([0,v]) = (e1)v +

(xl − 1

2j+1

)(−1)wH(v), (55)

and

cj+1([1,v]) = −(xl − 1

2j+1

)(−1)wH(v). (56)

Here e1 = [(e1)v]v∈F2j

2. Note that wH(v) + wH(1j ⊕

v) = j. If j is odd, then (−1)wH(v) = −(−1)wH(1j⊕v)

and

cj(v) = cj+1([0,v]) + cj+1([1,1j ⊕ v]). (57)

10

Let t = [0, . . . , 0, 1] ∈ Fj2. If j is even, then(−1)wH(v) = −(−1)wH(1j⊕v⊕t) and

cj(v) = cj+1([0,v]) + cj+1([1,1j ⊕ v ⊕ t]). (58)

Figure 6 describes the splitting process of the casesj = 1, 2.

It then follows from (53), (55) and (56) that therequirement for sγ(w0) is the same as in (45). Al-though they share the same splitting rule, the globalphase xl they differ becomes a local phase after split-ting since sγ=0 = 1 6= 0.

lth: Z1

2l−1 , CZ1

2l−2 , . . . , C(l−1)Z

3rd: T = Z14 , CP , CCZ

2nd: P =√Z, CZ

1st: Z

Figure 7: Admissible Splits among the ElementaryOperators in the Diagonal Clifford Hierarchy.

Note that the admissible splits we describe includeall the elementary operators in the diagonal Cliffordhierarchy as shown in Figure 7. Figure 5 correspondsto the vertical line in Figure 7, and Figure 6 corre-sponds to the oblique line in Figure 7.

We now describe how to choose the new X-logicalw0 to lift the level of the induced logical operator.For l ≥ 1 we suppose that the physical transver-sal Z-rotation

(exp (−ı π

2l)Z)⊗n

preserves an [[n, k, d]]

CSS(X, C2;Z, C⊥1 ,y = 0) code, inducing a single

Z1/2l−1or C(j)Z1/2l−1

.

Theorem 5. Suppose that after concatenation, theremoval of Z-stabilizers introduces the new X-logicalw0 = [1n,0n].

Then, the logical operator lifts to(Z1/2l

)⊗2or

C(j)Z1/2l−1.

Proof. Concatenation transforms the physical oper-ator

UZ =(

exp(−ı π

2lZ))⊗n

≡(Z1/2l−1

)⊗n(59)

into

U ′Z =(

exp(−ı π

2l+1Z))⊗2n

≡(Z1/2l

)⊗2n. (60)

The physical operator U ′Z preserves the [[2n, k, d′ ≥d]] CSS(X, C′2;Z, (C′1)⊥,y′ = [0n,0n]) codespace, as

shown in Figure 3 and Theorem 1. After concate-nation, every element in C′1 takes the form [u,u] forsome u ∈ C1. Since w0 = [1n,0n] /∈ C′1, we canintroduce w0 as a new X-logical (C′′1 = 〈C′1,w0〉).Concatenation does not change the generator coeffi-cients, and it follows from [25, Lemma 4] that

d[u,u] =(e−ı π

2l+1

)2n−2wH([u,u])(61)

for [u,u] ∈ C′1. Let γ ∈ C⊥2 /C⊥1 . Then [γ,0] ∈(C′2)⊥/(C′1)⊥, and it follows form (39) that

s[γ,0]([1,0])

=1

|C′1|∑

[1⊕u,u]∈C′1+[1,0]

(−1)[γ,0][1⊕u,u]Td[1⊕u,u]⊕[0,0]

=1

|C1|∑u∈C1

(−1)γ(1⊕u)T(e−ı π

2l+1

)2n−2wH([1⊕u,u]).

(62)

Since wH([1⊕ u,u]) = n for all u ∈ C1, we have

s[γ,0]([1,0]) = (−1)γ1T 1

|C1|∑u∈C1

(−1)γuT

=

1, if γ = 0,0, if γ 6= 0,

(63)

and the theorem now follows from (45).

Example 1 (Continued: from [[14, 1, 3]] to [[14, 2, 2]];Logical P † → (T †)⊗2 ). The [[14, 1, 3]] code is ob-tained by concatenating the [[7, 1, 3]] Steane code. Weintroduce the new X-logical w0 = [1,0] ∈ F2n

2 byremoving the Z-stabilizer γ0 = [1,1] ∈ (C′1)⊥ toproduce the [[14, 2, 2]] code. The generator coeffi-cients A′′

0,γ′′(π4

)of the [[14, 2, 2]] code for γ ′′ ∈ 〈γ1 =

[1,0],γ0〉 under the physical T⊗14 gate are

A′′0,γ′′=0

(π4

)=

1

2

(cos

π

4+ 1)

=(

cosπ

8

)2,

A′′0,γ′′=γ1

(π4

)=

1

2ı sin

π

4= ı sin

π

8cos

π

8. (64)

Splitting gives

A′′0,γ′′=γ0

= A′0,0 −A′′

0,γ′′=0=(ı sin

π

8

)2,

A′′0,γ′′=γ1⊕γ0

= A′0,γ1 −A′′0,γ′′=γ1

= ı sinπ

8cos

π

8.

(65)

It follows from (21) that the logical operator in-

duced by T⊗14 on the [[14, 2, 2]] codespace is(T †)⊗2

.Note that the [[14, 2, 2]] code is a member of the tri-orthogonal code family introduced by Bravyi and

11

Haah [15]. The operations described above can trans-form the [[15, 1, 3]] triorthogonal code [13,18,31,32] tothe [[30, 2, 2]] code for which the physical transver-

sal√T induces a logical

√T†. The same opera-

tions work for the whole punctured Reed-Muller fam-ily [[2l+1 − 1, 1, 3]] [18] that realize the single logical

Z1/2l−1 ∈ C(l)d and results in the [[2l+2 − 2, 2, 2]] tri-orthogonal code family realizing the logical transver-

sal Z1/2l ∈ C(l+1)d .

Example 2 (Continued: the [[2l, l, 2]] code family re-alizes C(l−1)Z). Starting from the [[4, 2, 2]] code, wefirst concatenate to obtain the [[8, 2, 2]] code, and thenremove the Z-stabilizer associated with adding thenew X-logical w0 = [1,0] to produce the [[8, 3, 2]]code. The [[4, 2, 2]] code realizes C(1)Z =CZ up tosome logical Pauli Z by either physical transversalPhase gate P⊗4 or transversal Control-Z gate CZ⊗2.The [[8, 3, 2]] code realizes C(2)Z =CCZ up to somelogical Pauli Z by either physical transversal T gateT⊗8 or transversal Control-Phase gate CP⊗4. Re-peated concatenation and removal of Z-stabilizersyields the [[2l, l, 2]] code family that supports the log-ical C(l−1)Z gate up to some logical Pauli Z. Whenthe physical gate is a transversal Z-rotation, thegenerator coefficients of the [[2l, l, 2]] code family arelisted below.

Table 1: The Splitting of Generator Coefficients forthe induced logical C(l−1)Z (up to some logical PauliZ). The [[2l, l, 2]] CSS codes are preserved by physical

transversal Z-rotations(exp

(−ı π

2l−1Z))⊗2l

.

ULZ up to ZL Generator Coefficients A0,γ

2 C(1)Z 12 −

12 −

12 −

12

3 C(2)Z 34 −

14 −

14 · · · −

14 −

14

l C(l−1)Z 2l−1−12l−1 − 1

2l−1 − 12l−1 · · · − 1

2l−1

Since removing Z-stabilizers may decrease codedistance, we introduce a third elementary operationin the next Section with the aim of increasing thedistance.

5 Increase Distance

Our focus on diagonal gates UZ that preserveCSS(X, C2;Z, C⊥1 ,y) codes implies that the effectivedistance is the Z-distance, dZ = minz∈C⊥2 \C⊥1

wH(z).Concatenation, described in Figure 3, does notchange dZ . Removal of Z-stabilizers increases the

number of Z-logicals in C⊥2 \ C⊥1 , and this may de-crease dZ . After removing Z-stabilizers we may needto increase effective distance by introducing new X-stabilizers. We now examine how generator coeffi-cients evolve when we add or remove X-stabilizers.

Adding a new X-stabilizer x0 ∈ C1 \ C2 transformsa CSS(X, C2; Z, C⊥1 , y) code to a CSS(X, 〈C2,x0〉;Z, C⊥1 ,y) code. A Z-logical µ0 in the original codebecomes an X-syndrome in the new code. Note thatµ0 ∈ C⊥2 \ C⊥1 and µ0 /∈ 〈C2,x0〉⊥ \ C⊥1 . The num-ber of Z-logicals is halved, while the number of X-syndromes is doubled, so the number of generatorcoefficients remains constant. Let UZ be a fixed di-agonal physical gate. The generator coefficients Aµ,γfor the old code determine the generator coefficientsA′µ′,γ′ for the new code as follows:

A′µ′,γ′ =∑

z∈C⊥1 +µ′+γ′

ε(0,z)f(z)

=

Aµ′,γ′ , if µ′ ∈ Fn2/C⊥2 ,Aµ′⊕µ0,γ′⊕µ0 , if µ′ ⊕ µ0 ∈ Fn2/C⊥2 .

(66)

Note that the new Z-logical γ ′ ∈ 〈C2,x0〉⊥/C⊥1 . If µ′

coincides with an old syndrome, then A′µ′,γ′ = Aµ′,γ′ .

Otherwise µ′ ⊕ µ0 ∈ Fn2/C⊥2 and γ ′ ⊕ µ0 ∈ C⊥2 /C⊥1 .Figure 8 captures the process of adding and removingX-stabilizers. Note that (66) is reversed when an X-stabilizer is removed.

If we remove an X-stabilizer from a CSS code thatis preserved by a diagonal gate UZ , then the newcode is still preserved by UZ . If instead, we add anX-stabilizer, then the new code may fail to be preservedby UZ . We say that addition of an X-stabilizer isadmissible if the new code is preserved by UZ . Wenow characterize admissible additions in terms of thenew X-syndrome µ0.

Let C⊥2 /C⊥1 = 〈D,µ0〉. The old is preserved by UZif and only if ∑

γ∈〈D,µ0〉

|A0,γ |2 = 1, (67)

and the new code is preserved by UZ if and only if∑γ∈D|A0,γ |2 = 1. (68)

Addition of x0 is admissible if and only if

A0,γ = 0 for all γ ∈ D + µ0. (69)

We require that half the generator coefficients A0,γ

vanish. The non-vanishing coefficients appear in the

12

(a) Adding an X-stabilizer

0

C2

C1

Fn2

x0

0

C⊥1

C⊥2

Fn2

µ0

γ ∈ C⊥2 /C⊥1

µA0,γ′⊕µ0

A′µ0,γ′= A0,γ′⊕µ0

γ ′ ∈ 〈C2,x0〉⊥/C⊥1

µ

µ+ µ0

(b) Transforming the table of generator coefficients

remove

add

Figure 8: (a) Adding the old X-logical x0 as a new X-stabilizer transforms the old Z-logical µ0 to a newX-syndrome. (b) Introducing a new X-stabilizer x0 doubles the number of X-syndromes and halves thenumber of Z-logicals. The blue rectangle shifts as the generator coefficients evolve.

green rectangle shown in Figure 8(b). Then, it fol-lows from (21) that the logical operator stays at thesame level after an admissible addition. It also fol-lows from (40) and (41) that an addition is admissibleif and only if

sγ(w0) = ±A0,γ for all γ ∈ C⊥2 /C⊥1 . (70)

We may need to concatenate several times andremove several independent Z-stabilizers to createenough zeros among the generator coefficients.

We now combine concatenation, removal of Z-stabilizers, and addition of X-stabilizers to constructa CSS code family with growing distance that is pre-served by diagonal operators with increasing logicallevel in the Clifford hierarchy.

Example 3 (Quantum Reed-Muller (QRM) CodeFamily). Introduced in [25, Theorem 14] and [29,Theorem 19], this is a family of [[2m,

(mr

), 2minr,m−r]]

CSS codes preserved by physical transversal Z-

rotations(Z1/2(m/r−1)

)⊗2mwhen r | m. We now de-

scribe how these codes are constructed by concatena-tion followed by removal of Z-stabilizers and additionof X-stabilizers.

Let r ≥ 1 be fixed. Note that m/r increases by1 when m increases by r, and that the new codeis preserved by a physical gate that is one levelhigher in the Clifford hierarchy. We start from a[[2m,

(mr

), 2minr,m−r]] CSS code determined by C1 =

RM(r,m) and C2 = RM(r−1,m). The recursive con-struction of classical Reed-Muller codes [33] is given

by

RM(r,m+ 1) = (u,u⊕ v) |u ∈ RM(r,m),

v ∈ RM(r − 1,m).(71)

Let 12r denotes the vector of length 2r with everyentry equals to 1. We concatenate our CSS code rtimes to construct the [[2m+r,

(mr

), 2minr,m−r]] CSS

code determined by C′1 = 12r ⊗ RM(r,m) and C′2 =12r ⊗ RM(r − 1,m). Note that C′1 ⊆ RM(r,m + r)and C′2 ⊆ RM(r − 1,m + r). We now remove theZ-stabilizers and add the X-stabilizers to make C′1 =RM(r,m + r), C′2 = RM(r − 1,m + r). We obtainthe [[2m+r,

(m+rr

), 2minr,m]] CSS code which is the

next member of the QRM code family. The level ofthe new induced logical operator equals that of thenew physical transversal Z-rotations [29, Theorme19], which is one level higher than that of the oldinduced logical operator. For fixed r, the operationsdescribed above just maintain the distance.

To achieve the growing distance, we can increaser by 1, and increase m by h := r + m

r + 1 so thatmr + 1 = m+h

r+1 . When r | m, it follows from (71) that

we can obtain the [[2m+h,(m+hr+1

), 2min r+1,m+h−r−1]]

CSS code from a [[2m,(mr

), 2minr,m−r]] CSS code

by first concatenating h times, then removing((m+hr+1

)+(m+hr

)−(mr

))Z-stabilizers, and adding(

m+hr

)X-stabilizers. The logical operator induced

by the new code is one level higher than that of theold code, and the distance doubles for the new code.Figure 1 illustrates the case when m = 2 and r = 1.

13

6 Conclusion

Given a CSS code that realizes a diagonal gate atthe lth level, we have introduced three basic opera-tions that can be combined to construct a new CSScode that realizes a diagonal gate at the (l+1)th levelin the Clifford hierarchy. The three basic operationsare concatenation (to increase the physical level), re-moval of Z-stabilizers (to increase the logical leveland increase code rate), and addition of X-stabilizers(to increase the distance). We have derived necessaryand sufficient conditions for admissibility, that is forthe new code to be preserved by the target phys-ical operator. We have described these conditionsusing the mathematical framework of generator co-efficients. Concatenation is always admissible, whilethe other two basic operations may not be admissi-ble. We have demonstrated the power of combiningthe three basic operations to synthesize a target di-agonal operator by climbing the Clifford hierarchy toconstruct the QRM code family.

In future work, we expect to explore how best tobalance removal of Z-stabilizers and addition of X-stabilizers. We will also investigate the existence ofcode families corresponding to Figure 5(b).

Acknowledgement

The work of the authors was supported in part byNSF under grant CCF1908730.

References

[1] P. O. Boykin, T. Mor, M. Pulver, V. Roychowd-hury, and F. Vatan, “On universal and fault-tolerant quantum computing,” arXiv preprintquant-ph/9906054, 1999.

[2] D. Gottesman and I. L. Chuang, “Demonstrat-ing the viability of universal quantum computa-tion using teleportation and single-qubit opera-tions,” Nature, vol. 402, no. 6760, pp. 390–393,1999.

[3] B. Zeng, X. Chen, and I. L. Chuang, “Semi-Clifford operations, structure of Ck hierarchy,and gate complexity for fault-tolerant quantumcomputation,” Physical Review A, vol. 77, no. 4,p. 042313, 2008.

[4] S. Beigi and P. W. Shor, “C3, semi-Cliffordand generalized semi-Clifford operations,” arXivpreprint arXiv:0810.5108, 2008.

[5] I. Bengtsson, K. Blanchfield, E. Campbell, andM. Howard, “Order 3 symmetry in the Cliffordhierarchy,” Journal of Physics A: Mathematicaland Theoretical, vol. 47, no. 45, p. 455302, 2014.

[6] S. X. Cui, D. Gottesman, and A. Krishna, “Di-agonal gates in the Clifford hierarchy,” PhysicalReview A, vol. 95, no. 1, p. 012329, 2017.

[7] N. Rengaswamy, R. Calderbank, and H. D. Pfis-ter, “Unifying the Clifford hierarchy via sym-metric matrices over rings,” Physical Review A,vol. 100, no. 2, p. 022304, 2019.

[8] T. Pllaha, N. Rengaswamy, O. Tirkkonen, andR. Calderbank, “Un-weyl-ing the Clifford hier-archy,” Quantum, vol. 4, p. 370, 2020.

[9] A. R. Calderbank and P. W. Shor, “Good quan-tum error-correcting codes exist,” Phys. Rev. A,vol. 54, pp. 1098–1105, Aug 1996.

[10] A. M. Steane, “Simple quantum error-correctingcodes,” Phys. Rev. A, vol. 54, no. 6, pp. 4741–4751, 1996.

[11] P. W. Shor, “Algorithms for quantum computa-tion: discrete logarithms and factoring,” in Pro-ceedings 35th annual symposium on foundationsof computer science. Ieee, 1994, pp. 124–134.

[12] ——, “Polynomial-time algorithms for primefactorization and discrete logarithms on a quan-tum computer,” SIAM review, vol. 41, no. 2, pp.303–332, 1999.

[13] S. Bravyi and A. Kitaev, “Universal quantumcomputation with ideal Clifford gates and noisyancillas,” Physical Review A, vol. 71, no. 2, p.022316, 2005.

[14] B. W. Reichardt, “Quantum universality frommagic states distillation applied to css codes,”Quantum Information Processing, vol. 4, no. 3,pp. 251–264, 2005.

[15] S. Bravyi and J. Haah, “Magic-state distillationwith low overhead,” Physical Review A, vol. 86,no. 5, p. 052329, 2012.

[16] H. Anwar, E. T. Campbell, and D. E. Browne,“Qutrit magic state distillation,” New Journalof Physics, vol. 14, no. 6, p. 063006, 2012.

[17] E. T. Campbell, H. Anwar, and D. E. Browne,“Magic-state distillation in all prime dimensionsusing quantum Reed-Muller codes,” PhysicalReview X, vol. 2, no. 4, p. 041021, 2012.

14

[18] A. J. Landahl and C. Cesare, “Complex instruc-tion set computing architecture for performingaccurate quantum z rotations with less magic,”arXiv preprint arXiv:1302.3240, 2013.

[19] E. T. Campbell and M. Howard, “Unified frame-work for magic state distillation and multi-qubit gate synthesis with reduced resource cost,”Physical Review A, vol. 95, no. 2, p. 022316,2017.

[20] J. Haah and M. B. Hastings, “Codes and pro-tocols for distilling t, controlled-s, and toffoligates,” Quantum, vol. 2, p. 71, 2018.

[21] A. Krishna and J.-P. Tillich, “Towards low over-head magic state distillation,” Physical reviewletters, vol. 123, no. 7, p. 070507, 2019.

[22] C. Vuillot and N. P. Breuckmann, “Quantumpin codes,” arXiv preprint arXiv:1906.11394,2019.

[23] D. Gottesman, Stabilizer codes and quantum er-ror correction. California Institute of Technol-ogy, 1997.

[24] A. R. Calderbank, E. M. Rains, P. Shor, andN. J. Sloane, “Quantum error correction viacodes over GF(4),” IEEE Transactions on In-formation Theory, vol. 44, no. 4, pp. 1369–1387,1998.

[25] J. Hu, Q. Liang, and R. Calderbank, “Design-ing the quantum channels induced by diagonalgates,” arXiv preprint arXiv:2109.13481, 2021.

[26] J. Haah, “Towers of generalized divisible quan-tum codes,” Physical Review A, vol. 97, no. 4,p. 042327, 2018.

[27] J. Hu, Q. Liang, N. Rengaswamy, and R. Calder-bank, “Mitigating coherent noise by balanc-ing weight-2 Z-stabilizers,” arXiv preprintarXiv:2011.00197, 2020.

[28] D. M. Debroy, L. Egan, C. Noel, A. Risinger,D. Zhu, D. Biswas, M. Cetina, C. Monroe,and K. R. Brown, “Optimizing stabilizer pari-ties for improved logical qubit memories,” arXivpreprint arXiv:2105.05068, 2021.

[29] N. Rengaswamy, R. Calderbank, M. Newman,and H. D. Pfister, “On optimality of CSS codesfor transversal T ,” IEEE Journal on SelectedAreas in Information Theory, vol. 1, no. 2, pp.499–514, 2020.

[30] A. Steane, “Multiple-particle interference andquantum error correction,” Proceedings of theRoyal Society of London. Series A: Mathemati-cal, Physical and Engineering Sciences, vol. 452,no. 1954, pp. 2551–2577, 1996.

[31] E. Knill, R. Laflamme, and W. Zurek, “Ac-curacy threshold for quantum computation,”arXiv quant-ph/9610011, 1996.

[32] J. T. Anderson, G. Duclos-Cianci, andD. Poulin, “Fault-tolerant conversion betweenthe steane and Reed-Muller quantum codes,”Physical review letters, vol. 113, no. 8, p. 080501,2014.

[33] F. J. MacWilliams and N. J. A. Sloane, The the-ory of error correcting codes. Elsevier, 1977,vol. 16.

15