<<

View metadata,citationandsimilarpapersatcore.ac.uk arXiv:1904.07842v1 [cs.IT] 16 Apr 2019 by over logical uis ial,w lodvlpagrtm o optimizing for ancill algorithms require not develop unitary does also of synthesis process we the simplifies Finally, and which qubits. circ gates, to new Clifford translation the only is significantly. straightforward, is circuits codes design to the (20 from classical translation al. and to et description Cleve its connection by the discovered originally but was here described opoieeprclgt opeiisfru to up for complexities gate empirical provide to whi https://github.com/nrenga/symplectic-arxiv18a, at h tblzrsae oform to states stabilizer the We . classical Pauli the this of use (MCS) al formi are matrices commutative Hermitian states maximal commuting These of unitaries. eigenvectors Clifford common only using obtained esreGehl oe,Ga a,saiie tts mut states, stabilizer unitary bases, map, unbiased Gray c codes, Kerdock geometry, Delsarte-Goethals , Clifford computing, sioopi otepoetv pca iergopPSL( group linear special projective subgr the this to matrices, isomorphic symplectic their Cliffo as is the permute represented of code When a Kerdock group. forming the thereby MCS, of corresponding that prove hradSon n yGtemn ECprotects QECC A Gottesman. the by Rai and and Calderbank, Sloane [5], by and [4], [7] Shor [6], of Steane codes development and stabilizer the Shor of [3], development Calderbank, Shor by by codes QECC CSS first the of discovery eGa mgso eti xeddcci oe flength of codes cyclic extended certain of images Gray be aoia278 S.Eal nrynnrnawm,rober {narayanan.rengaswamy, D Email: University, Duke USA. henry.pfister}@duke.edu Engineering, 27708, Computer Carolina and Electrical of ot aoia278 S.Eal [email protected] Email: Univer Duke USA. , 27708, was of work Carolina Department this North the of with Most was he USA. while 91125, CA Pasadena, Technology, of h al arcs hc mle htteesml is ensemble on the transitively that acts implies group which matrices, mixing this Pauli that the show We oia uisb medn hmi ytmcomprising system a in them embedding by qubits logical employ reliabil Since likely ensure computation. to most of of [2]. (QECCs) will codes programmable out they error-correcting noisy, quantum moving generally are becoming are computers quantum and devices classical constant- lab these over even Today advantage the that an [1]. established provide computation been circuits quantum has depth It problems. tain Q .Rnawm,R adrakadH .Pse r ihteDep the with are Pfister D. H. and Calderbank R. Rengaswamy, N. .Cni urnl ihteDprmn fMteais Cali Mathematics, of Department the with currently is Can T. ∗ ne Terms Index Abstract hs w uhr otiue qal oti work. this to equally contributed authors two These ı , Z peusoe h etcasclsproptr ncer- in supercomputers classical best the over computational speedups enormous promise computers UANTUM 4 unitary √ n ec om unitary a forms hence and eso htepnnitn these exponentiating that show We . edc oe eemn ntr 2-Designs Unitary Determine Codes Kerdock egtdsrbto fKrokcds et eorganize we Next, codes. Kerdock of distribution weight quantum − Tennlna iayKrokcdsaekonto known are codes Kerdock binary non-linear —The 1 rdcssaiie tts htaeqatmstates quantum are that states, stabilizer produces Hiebr-elgop al ru,quantum group, Pauli group, —Heisenberg-Weyl 2 dsgs otaeipeettosaeavailable are implementations Software -designs. Classical ecito osmlf h eiaino the of derivation the simplify to description rn Can Trung 2 dsgso noe uis .. oconstruct to i.e., qubits, encoded on -designs .I I. t -designs NTRODUCTION ro-orcigcdsisie the inspired codes error-correcting N 1 + ∗ aaaa Rengaswamy Narayanan , 2 uulyubae ae and bases unbiased mutually dsg.The -design. Z 4 vle codewords -valued 16 Kerdock onaInstitute fornia qubits. ra,North urham, iy Durham, sity, t.calderbank, hw use we ch Sampling conducted N isuses uits m artment design othe so 2 2 = Pauli odes, ually N , − oup 16), ary the ns, ity ng rd m ∗ k ). oetClebn,adHnyD Pfister D. Henry and Calderbank, Robert , ae esmldfo nesml fuiaista form that unitaries of ensemble an from a sampled be gates siae h dlt ftelgcloeain oereliab more operations logical the the of to fidelity extended the been estimates recently benchmarking has randomized n procedure logical the might the of translation reliable, this quality be Since fidelity the computer. the into quantum corrected translated so be computer, to the logical works need in then protocol operations nois estimates This physical actual the assumptions). the of on additional fidelity some proce the twirling estimates (under this binary of indeed invariant the an protocol be of Sinc the to theory. shown analogue is communication fidelity quantum classical the the in channel as chan symmetric interpreted depolarizing be The o fidelity channel. can the depolarizing calculating resulting and gates the of sequence randomized a rxmtsteHa itiuino h ntr ru pto up group unitary the that on distribution, distribution the Haar probability the a proximates with bestowed unitaries, iermp called maps linear arcsta rsretegopsrcueof structure group the preserve that matrices sawl-salse ceeta siae h dlt ft of fidelity by the system estimates the in that the noise scheme of well-established fidelity a the is of The system. terms the in benchmarking on quality, executed its operations for quantum assessed be to representati binary beneficia the mutually HW via prove especially purposes, still other worlds for beyond quantum that between and is interactions paper QECCs, classical of this construction in the theme inspiring central A mapping. binary mlmne sapyia prto nthe on operation physical a as implemented oteHa esr,btsc apigi nesbe hence infeasible, is sampling such but respe measure, with Haar matrices the unitary the to sample coincide unitary randomly maps that a linear protocols is two ensemble the When finite ensemble. finite the r tblzrQCs htaedrvdfo commutative from QECCs derived common group are Heisenberg-Weyl most the that of The subgroups QECCs, space. stabilizer code are the preserves that the on operation m a eefiinl ersne as represented efficiently be can hogotti ae.TeCifr ru normalizes that group Note Clifford The definitions). are paper. formal circuits this for Cliffthroughout quantum group III Clifford simplest Section the the from (see operators and unitary of group), composed Pauli the as ersne sbnr length- binary as represented Since conjugation. under oec lmn fCliff of element each so admzdbnhakn eursta h euneof sequence the that requires benchmarking Randomized ro ornigapiain,aqatmcmue needs computer quantum a applications, running to Prior unitary hsclqbt.I al-oeatcmuain n desir any computation, fault-tolerant In qubits. physical t N t oet eto Imksti rcs ydiscussing by precise this makes VI Section moment. -th n Cliff and prtos(ntepoetdqbt)fra error- an for qubits) protected the (on operations 2 -design rtcl nrdcdb mro ta.[] [9], [8], al. et Emerson by introduced protocol, N . m unitary A . twirls − twirling N k vrtefl ntr nebeand ensemble unitary full the over oia poetd uisms be must qubits (protected) logical nue natmrhs of automorphism an induces HW t 2 dsg.I ses oanalyze to easy is It -design. h neligcanlthrough channel underlying the N m t 2 dsg sa nebeof ensemble an is -design lmnscnb efficiently be can elements m etr,Cifr operators Clifford vectors, rtcl[0 htdirectly that [10] protocol × 2 m HW m binary HW N hsclqubits physical as known (also N randomized brought toyouby symplectic N provided byCaltechAuthors ne the under HW HW 2 = n of ons ly. ap- the nel ss, N he ed ot N m N ct e e 1 f l , CORE 2 the interest in finite ensembles of unitary matrices that approx- distribution) given in [23] significantly. In order to demonstrate imate the Haar distribution. CliffN is known to be a unitary this simplicity, we provide the proof of the weight distribution 3-design [11], and the proof by Webb involves the concepts here. For most parts of the proof, we only need a brief of Pauli mixing and Pauli 2-mixing, which we introduce in description of the Kerdock set, Kerdock code, and the Gray 2 Section VI. However, Cliff has size 2m +2m m (4j 1) map. See Section IV for formal definitions, constructions, and N j=1 − (up to scalars e2πıθ,θ R) which is much larger than the results used in the following proof. 4m ∈ Q lower bound of 2 for any unitary 2-design, established by In [26], the Kerdock set PK(m) is defined to be a collection Gross, Audenaert≈ and Eisert [12], and by Roy and Scott [13]. of N binary m m symmetric matrices that is characterized × They also discuss the existence of Clifford ensembles that by the following properties: it is closed under binary addition, saturate this bound. Although random circuits are known to and if P,Q PK(m) are distinct, then P + Q is non-singular. ∈ be exact or approximate unitary 2-designs [14], [15], deter- The codewords of the length-N Z4-linear Kerdock code K(m) ministic constructions of such ensembles facilitate practical can be expressed as [xP xT + 2wxT + κ] (mod 4), where Fm realizations. Cleve et al. [16] have recently found an explicit x 2 chooses the symbol index in a codeword, and the ∈ m subgroup of Cliff that is a unitary 2-design. The central codeword is determined by the choice of w F , P PK(m) N ∈ 2 ∈ contribution of this paper is to use the classical Kerdock codes and κ Z = 0, 1, 2, 3 . One can obtain complex vectors ∈ 4 { } to simplify the construction of this quantum unitary 2-design of quaternary phases 1, ı, 1, ı by raising ı = √ 1 to { − − } − and its translation to circuits (see Section VI). the integer powers in the (Z4-valued) codeword vector. We There are many other applications of unitary 2-designs. will refer to this operation as exponentiating the codeword The first is quantum data hiding (the LOCC model described by ı. The Gray map is an isometry from (length-N vectors Z2N in [17]), where the objective is to hide classical information of quaternary phases, Euclidean metric) to ( 2 , Hamming from two parties who each share part of the data but are only metric) defined by g(1) , 00, g(ı) , 01, g( 1) , 11, and − allowed to perform local operations and classical communica- g( ı) , 10. Note that the domain of the map can equivalently − tion. The data hiding protocol can be implemented by sam- be taken as Z4 in which case the metric is the Lee metric pling randomly from the full but it is sufficient to (defined in Section IV-B). The codewords of the binary non- sample randomly from a unitary 2-design. Other applications linear Kerdock code of length 2m+1 are obtained as Gray of unitary 2-designs are the fidelity estimation of quantum images of the Z4-valued codewords described above. channels [18], quantum state and process tomography [19], Theorem 1: Let m be odd. The weight distribution Ai,i = and more recently minimax quantum state estimation [20]. In 0,..., 2m+1 of the classical binary Kerdock code of length quantum information theory, they have been used extensively 2m+1 is as follows. in the analysis of decoupling [13], [15], [21], [22]. i 0 2m − 2(m−1)/2 2m 2m + 2(m−1)/2 2m+1 The next section discusses the flow of ideas in the rest of 2m+1 m+1 m+2 2m+1 m+1 the paper, and points to related work and applications. Ai 1 2 − 2 2 − 2 2 − 2 1

Proof: II. MAIN IDEAS AND DISCUSSION We explicitly use Lemma 10 and Corollary 16 to calculate the weight distribution. Fix a vector v of quaternary The first result in the paper is to use the (quantum) commu- phases obtained by exponentiating a codeword tative subgroups of HWN to simplify the derivation of weight T T v Fm distributions for the (classical) Kerdock codes. c = [xP2x +2w2x + κ2]x 2 ∈ Recall that Hermitian matrices that commute can be simul- in the Z4-linear Kerdock code. Consider any vector u of qua- taneously diagonalized. The Kerdock and Delsarte-Goethals ternary phases obtained by exponentiating a second codeword binary codes are unions of cosets of the first order Reed-Muller T T (RM) code RM(1,m), the cosets are in one-to-one correspon- cu = [xP1x +2w1x + κ1]x Fm . ∈ 2 dence with symplectic forms, and the weight distribution of (Lemmas 11 and 15 consider κ = κ = 0 so that the a coset is determined by the rank of the symplectic form 1 2 eigenvalues are 1 (and not in 1, ı ), but we account (see [23, Chapter 15] for more details). Section IV-A reviews for these factors± here.) {± ± } the Z description of these codes given in [24]. Section IV-B 4 Let n be the number of indices x Fm for which shows that when we exponentiate codewords in these cosets j ∈ 2 (cu) (cv) = j, for j Z . Since the Gray map preserves of RM(1,m) we obtain a of common eigenvectors for a x x 4 the Lee− metric, the Hamming∈ distance between the Gray maximal commutative subgroup of Hermitian . images of u and v is g u g v . The operators that project onto individual lines in a given c c dH ( (c ), (c )) = n1 +2n2 + n3 Since m we simply have to relate eigenbasis are invariants of the corresponding subgroup [25], n0 + n1 + n2 + n3 = 2 and to obtain g u g v . Observe that u v and the distance distribution of the code is determined by the n0 n2 dH ( (c ), (c )) , = (n n ) + (n n )ı. Lemma 10 implies h i inner product of pairs of such eigenvectors (see [Section IV, 0 − 2 1 − 3 m+1 Lemma 10]). When calculating weight distributions, this prop- 2 2Re[ u, v ]=2dH (g(cu), g(cv)) erty makes it possible to avoid using Dickson’s Theorem [23, − h i m d (g(cu), g(cv))=2 (n n ). (1) Chapter 15] to choose an appropriate representation of the ⇒ H − 0 − 2 symplectic form. The correspondence between classical and Now we observe three distinct cases for the codeword cu cv. quantum worlds simplifies the calculation (of the weight Note that there are 22m+2 codewords in K(m). − 3

1 (i) P1 = P2, w1 = w2: If κ1 κ2 = 0 then we have the u, v in different eigenbases satisfy u, v = N − 2 , and hence all-zeros codeword, and if −κ κ = 2 then we have each eigenbasis looks like noise to|h the otheri| eigenbases. The 1 − 2 the all-ones codeword. However, if κ1 κ2 1, 3 then Kerdock ensemble of N(N + 1) complex lines is extremal; n n =0 and this determines two codewords− ∈{ of weight} Calderbank et al. [33] have shown that any collection of 0 − 2 2m (more precisely, at distance 2m from cv). vectors for which pairwise inner products have 1 2 (ii) P = P , w = w : From Corollary 16, irrespective of 0 or N − 2 has size at most N + N, and that any extremal 1 2 1 6 2 κ1,κ2, we have u, v = 0, which implies n0 n2 = 0 example must be a union of eigenbases. The group of Clifford and hence the distanceh i is 2m. This determines− another symmetries of this ensemble, represented as binary symplectic (2m 1)22 =2m+2 4 codewords of weight 2m. matrices, is shown to be isomorphic to the projective special − − 2 m (iii) P1 = P2: From Corollary 16 we have u, v = 2 , PSL(2,N), and hence its size is (N + 1)N(N which6 implies (n n )2 +(n n )2 =2|hm. Sincei| m is 1) = 23m 2m. We note that the Kerdock ensemble also− 0 − 2 1 − 3 − odd, and nj are non-negative integers, direct calculation appears in the work of Tirkkonen et al. [34]. 2 2 m 1 shows that this means (n0 n2) = (n1 n3) =2 − Section VI defines a graph HN whose vertices are labeled −(m 1)/2 − and therefore n0 n2 = 2 − . More formally, since by (scalar multiples of) all non-identity (Hermitian) Pauli the Gaussian integers− Z[±ı] are a unique factorization do- matrices, where two matrices (vertices) are joined (by an (m 1)/2 main, we have (n0 n2)+(n1 n3)ı = ( 1 ı)2 − edge) if and only if they commute. This graph is shown − m − (m 1)/2± ± and this gives weights 2 2 − . Thus, we have to be strongly regular; every vertex has the same degree, 22m+2 2m+2 codewords± remaining and it is easy to and the number of vertices joined to two given vertices see that− the signs occur equally often. Hence there are depends only on whether the two vertices are joined or not 22m+1 2m+1 codewords of each weight. joined. The of this graph is the group − of binary symplectic matrices Sp(2m, F2). A subgroup of Lemma 11 shows that the (normalized) length-N vectors CliffN containing HWN is proven to be Pauli mixing if it of quaternary phases obtained by exponentiating Kerdock, acts transitively on vertices, and Pauli 2-mixing if it acts or more generally Delsarte-Goethals, codewords are common transitively on edges and on non-edges. These properties imply eigenvectors of maximal commutative subgroups of HWN . that Pauli mixing ensembles are unitary 2-designs and Pauli These eigenvectors are called stabilizer states in the quantum 2-mixing ensembles are unitary 3-designs [11]. The Clifford information literature [27] (also see end of Section III). symmetries of the Kerdock ensemble (of stabilizer states), They can equivalently be described as those quantum states again represented as symplectic matrices, are shown to be obtainable by applying Clifford unitaries to the basis state transitive on the vertices of HN and hence a unitary 2-design. m T 0 ⊗ = e e = [1, 0, 0,..., 0] [28]. Clifford | i 0 ⊗ ···⊗ 0 Since the Clifford symmetries include all Hermitian Paulis, elements act by conjugation on HWN , permuting the maximal in addition to PSL(2,N), the size of the Kerdock unitary 2- commutative subgroups, and fixing the ensemble of stabilizer design is N 5 N 3 25m, which almost saturates the bound by states (see Section V). The Clifford group is highly symmetric, Gross et al. [12]− discussed≈ above. The next step is to translate and it approximates the full unitary group in a way that can these symmetry elements into circuits for, say, randomized be made precise by comparing irreducible representations [25], benchmarking. [29]. Kueng and Gross [30] have shown that the ensemble of T. Can has developed an algorithm [35] that factors a stabilizer states is a complex projective 3-design; given a poly- 2m 2m binary symplectic into a product of at most 6 nomial of degree at most 3, the integral over the N-sphere can elementary× symplectic matrices of the type shown in Table I. be calculated by evaluating the polynomial at stabilizer states, The target symplectic matrix maps the (Hadamard) dual basis and taking a finite sum. Stabilizer states also find application XN = E([Im 0]),ZN = E([0 Im]) (see Section III for as measurements in the important classical problem of phase | | notation) to a dual basis X′ ,Z′ . Then, row and column retrieval, where an unknown vector is to be recovered from N N operations by the elementary matrices return X′ ,Z′ to the the magnitudes of the measurements (see Kueng, Zhu and N N original pair XN ,ZN thereby producing a decomposition of Gross [31]). A third application is unsourced multiple access, the target symplectic matrix. where there is a large number of devices (messages) each of Section VI uses this decomposition to simplify the trans- which transmits (is transmitted) infrequently. This provides a lation of the Kerdock unitary 2-design into circuits. The model for machine-to-machine communication in the Internet- elementary symplectic matrices appearing in the product can of-Things (IoT), including the special case of radio-frequency be related to the Bruhat decomposition of the symplectic identification (RFID), as well as neighbor discovery in ad-hoc group Sp(2m, F2) (see [36]). When the algorithm is run in wireless networks. Here, Thompson and Calderbank [32] have reverse it produces a random Clifford matrix that can serve shown that stabilizer states associated with Delsarte-Goethals as an approximation to a random . This is an codes support a fast algorithm for unsourced multiple access instance of the subgroup algorithm [37] for generating uniform 100 that scales to 2 devices (arbitrary 100-bit messages). random variables. The algorithm has complexity O(m3) and Section V constructs the N +1 eigenbases (of N stabilizer uses O(m2) random bits, which is order optimal given the states each) determined by the Kerdock code of length N over order of the symplectic group Sp(2m, F2) (cf. [38]). We note Z4, and shows that the corresponding maximal commutative that the problem of selecting a unitary matrix uniformly at subgroups partition the non-identity Hermitian Pauli matrices. random finds application in machine learning (see [39] and The eigenbases are mutually unbiased, so that unit vectors the references therein). The algorithm developed by Can is 4 similar to that developed by Jones, Osipov and Rokhlin [40] We also provide software implementations of all algorithms, in that it alternates (partial) Hadamard matrices and diagonal at https://github.com/nrenga/symplectic-arxiv18a. Using this matrices; the difference is that the unitary 3-design property utility, we provide empirical estimates of the gate complexity of the Clifford group [11] provides randomness guarantees. for circuits obtained from the Kerdock design. We believe Finally, Section VII constructs logical unitary 2-designs this paves the way for employing this design in several that can be applied in the logical randomized benchmarking applications, specifically in randomized benchmarking [9], protocol of Combes et al. [10]. In prior work [41], we [51]. have developed a mathematical framework for synthesizing all physical circuits that implement a logical Clifford op- III. THE HEISENBERG-WEYL AND CLIFFORD GROUPS erator (on the encoded qubits) for stabilizer codes (up to Quantum error-correcting codes serve to protect qubits equivalence classes and ignoring stabilizer freedom). Circuit involved in quantum computation, and this section summarizes synthesis is enabled by representing the desired physical the mathematical framework introduced in [4], [6], [7], [52], Clifford operator as a 2m 2m binary symplectic matrix. For and described more completely in [53] and [41]. In this an [[m,m k]] stabilizer code,× every logical Clifford operator framework for fault-tolerant quantum computation, Clifford is shown− to have 2k(k+1)/2 symplectic solutions, and these operators on the -dimensional complex space afforded by are enumerated efficiently using symplectic transvections, thus N m qubits are represented as binary symplectic matrices. enabling optimization with respect to a suitable metric. See 2m 2m This is an exponential reduction× in size, and the symplectic https://github.com/nrenga/symplectic-arxiv18a for implemen- matrices serve as a binary control plane for the quantum tations. computer. It is now well-known that different codes yield efficient Remark 2: Throughout the paper, we adopt the convention (e.g., low-depth) implementations of different logical opera- that all binary vectors are row vectors, and Z -, real- or tors. However, computing environments can change dynami- 4 complex-valued vectors are column vectors, where Z is the cally so that qubits or qubit links might have varying fidelity, 4 of integers modulo 4. The values ıκ, where ı , √ 1,κ and thus low-depth alone might not be desirable. Under such Z , are called quaternary phases. − ∈ circumstances it is necessary to leverage all degrees of freedom 4 A single qubit is a 2-dimensional Hilbert space, and in implementing a logical operator, and a compiler might a quantum state v is a superposition of the two states use the above framework for this purpose. More generally, e , [1, 0]T ,e , [0, 1]T which form the computational basis. a compiler might usefully switch between several codes [42] 0 1 Thus v = αe + βe , where α, β C satisfy α 2 + β2 =1 dynamically, depending on the state of the system. Then this 0 1 as per the Born rule [54, Chapter∈ 3]. The Pauli| |matrices| | are algorithm enables the compiler to be able to determine logical operators for a code quickly depending on the user-input 0 1 1 0 0 ı I , X , ,Z , , Y , ıXZ = , circuit (on the protected qubits). 2 1 0 0 1 ı −0    −    Section VII provides a proof of concept implementation of (2) the Kerdock unitary 2-design on the protected (logical) qubits , √ of the CSS code using the above logical Clifford where ı 1 and I2 is the 2 2 [55, Chapter [[6, 4, 2]] − × v synthesis algorithm. The logical randomized benchmarking 10]. We may express an arbitrary pure quantum state as protocol requires a unitary 2-design on the logical qubits, and v = (α0I2 + α1X + ıα2Z + α3Y ) e0, where αi R. (3) Combes et al. use the full Clifford group for this purpose, ∈ which is much larger than the Kerdock design as shown above. We describe m-qubit states by (linear combinations of) m- In summary, the purpose of this paper is to emphasize that fold Kronecker products of computational basis states, or interactions between the classical and quantum domains still equivalently by m-fold Kronecker products of Pauli matrices. Fm prove mutually beneficial, as much as they helped inspire the Given row vectors a,b 2 define the m-fold Kronecker ∈ first QECC more than two decades back. Specifically, we make product four main theoretical contributions: a1 b1 am bm m D(a,b) , X Z X Z UN , N , 2 , (4) 1) Use of quantum concepts to simplify the calculation of ⊗···⊗ ∈ where U denotes the group of all N N unitary operators. classical weight distributions of several families of non- N × linear binary codes [23], [43]–[49]. The Heisenberg- HWN (also called the m-qubit κ 2) Elementary description of symmetries of the Kerdock Pauli group) consists of all operators ı D(a,b), where κ Z , 2 ∈ code, and the N 2 + N stabilizer states determined by 4 0, 1, 2, 3 . The order is HWN =4N and the { } , | | this code [26], [32], [34], [50]. of this group is ıIN IN , ıIN , IN , ıIN , where IN is the N N identityh matrix.i { Multiplication− − in HW} satisfies 3) Demonstration that the symmetry group of the Kerdock × N code is a unitary 2-design and that sampling from it is the identity ′ ′ straightforward. Introduction of elementary methods for a bT +b aT D(a,b)D(a′,b′) = ( 1) D(a′,b′)D(a,b). (5) translation to circuits without using ancillary qubits. − F2m 4) Provide a proof of concept construction for unitary 2- The standard symplectic inner product in 2 is defined as designs on the logical qubits of a stabilizer code [10], T T T [a,b], [a′,b′] s , a′b + b′a = [a,b]Ω[a′,b′] , (6) [41]. h i 5

0 I where the symplectic form Ω , m (see [6], [41]). TABLE I I 0 A GENERATING SET OF SYMPLECTIC MATRICES AND THEIR  m  Therefore, two operators D(a,b) and D(a′,b′) commute if CORRESPONDING UNITARY OPERATORS. The number of 1s in Q and P directly relates to number of gates involved and only if [a,b], [a′,b′] s =0. h i in the circuit realizing the respective unitary operators (see [41, Appendix The homomorphism F2m defined by ∈ Fm γ : HWN 2 I]). The N coordinates are indexed by binary vectors v 2 , and ev → denotes the standard basis vector in CN with an entry 1 in position v and κ , Z γ(ı D(a,b)) [a,b] κ 4 (7) all other entries 0. Here H2t denotes the Walsh- of size ∀ ∈ t 2 , Ut = diag (It, 0m−t) and Lm−t = diag (0t,Im−t). has ıIN and allows us to represent elements of HWN (up to multiplicationh i by scalars) as binary vectors. Symplectic Matrix Fg Clifford Operator g

The Clifford group CliffN consists of all unitary matrices 0 Im ⊗m N N Ω= HN = H g C × for which gD(a,b)g† HW for all D(a,b) Im 0  2 ∈ ∈ N ∈ HWN , where g† is the Hermitian of g [53]. CliffN Q 0 is the normalizer of HW in the unitary group U . The LQ = −T ℓQ : ev 7→ evQ N N  0 Q  Clifford group contains HWN and its size is CliffN = m2+2m m j 2πıθ | | 2 (4 1) (up to scalars e ,θ R) [6]. We Im P T vP vT mod 4 j=1 TP = ; P = P tP = diag ı − ∈  0 Im regard operators in CliffN as physical operators acting on   quantumQ states in CN , to be implemented by quantum circuits. Lm−t Ut Gt = gt = H2t ⊗ I2m−t Every operator g CliffN induces an automorphism of HWN  Ut Lm−t by conjugation. Note∈ that the inner automorphisms induced by matrices in HWN preserve every conjugacy class D(a,b) {± } HWN generated by commuting Hermitian matrices of the and ıD(a,b) , because (5) implies that elements in HWN either{± commute} or anti-commute. Matrices are sym- form E(a,b), with the additional property that if E(a,b) S D(a,b) ± IN E(∈a,b) T then E(a,b) / S [55, Chapter 10]. The operators ± metric or anti-symmetric according as ab = 0 or 1, hence − ∈ 2 the matrix project onto the 1 eigenspaces of E(a,b), respectively. Remark 3: Since± all elements of S are unitary, Hermitian T E(a,b) , ıab D(a,b) (8) and commute with each other, they can be diagonalized simultaneously with respect to a common orthonormal basis, is Hermitian. Note that E(a,b)2 = I . The automorphism N and their eigenvalues are 1 with algebraic multiplicity N/2. induced by a Clifford element g satisfies We refer to such a basis as± the common eigenbasis or simply Ag Bg eigenspace of the subgroup S, and to the subspace of eigen- gE(a,b)g† = E ([a,b]Fg) , where Fg = (9) ± Cg Dg vectors with eigenvalue +1 as the +1 eigenspace of S.   is a 2m 2m binary matrix that preserves symplectic inner If the subgroup S is generated by E(ai,bi),i = 1,...,k, × then the operator products: [a,b]Fg, [a′,b′]Fg s = [a,b], [a′,b′] s. Hence Fg is h i h i k called a binary symplectic matrix and the symplectic property 1 T reduces to F ΩF =Ω, or equivalently (IN + E(ai,bi)) (12) g g 2k i=1 A BT = B AT , C DT = D CT , A DT + B CT = I . Y g g g g g g g g g g g g m projects onto the m k-dimensional subspace fixed (10) 2 − V (S) pointwise by S, i.e., the +1 eigenspace of S. The subspace (See [56] for an extensive discussion on general symplectic V (S) is the stabilizer code determined by S. We use the geometry and quantum mechanics.) The symplectic property notation [[m,m k]] code to represent that V (S) encodes m k encodes the fact that the automorphism induced by g must logical qubits into− m physical qubits. − respect commutativity in . Let Sp F denote the F2m HWN (2m, 2) Let γ(S) denote the subspace of 2 formed by the binary group of symplectic 2m 2m matrices over F2. The map representations of the elements of S using the homomorphism × φ: CliffN Sp(2m, F2) defined by γ in (7). A for γ(S) is → , k 2m T φ(g) Fg (11) G , [a ,b ] F × s.t. G Ω G =0, (13) S i i i=1,...,k ∈ 2 S S is a homomorphism with kernel HWN , and every Clifford op- where 0 is the k k matrix with all entries zero. × erator projects onto a symplectic matrix Fg. Thus, HWN is a Given a stabilizer S with generators E(ai,bi),i =1,...,k, F k normal subgroup of CliffN and CliffN /HWN = Sp(2m, 2). we can define 2 subgroups Sǫ ǫ where the index (ǫ1 ǫk) 2∼ 1 k F m m j ··· ··· This implies that the size is Sp(2m, 2) =2 j=1(4 1) represents that Sǫ1 ǫk is generated by ǫiE(ai,bi), for ǫi | | − ··· (also see [6]). Table I lists elementary symplectic trans- 1 . Note that the operator ∈ Q {± } formations Fg, that generate the binary symplectic group k 1 Sp(2m, F2), and the corresponding unitary automorphisms , Πǫ1 ǫ (IN + ǫiE(ai,bi)) (14) Cliff , which together with generate Cliff . ··· k 2k g N HWN N i=1 (See∈ [41, Appendix I] for a discussion on the Clifford gates Y projects onto V (Sǫ1 ǫ ), and that and circuits corresponding to these transformations.) ··· k We use commutative subgroups of HWN to define res- Πǫ1 ǫ = IN . (15) ··· k olutions of the identity. A stabilizer is a subgroup S of k (ǫ1,...,ǫ ) 1 Xk ∈{± } 6

F m F m , Hence the subspaces V (Sǫ1 ǫk ), or equivalently the subgroups The Frobenius map f : 2 2 is defined by f(x) ··· 2 → F m F Sǫ1 ǫ , provide a resolution of the identity, and elements x , and the trace map Tr: 2 2 is defined by ··· k → (errors) in HW simply permute these subspaces (under −1 N , 2 2m conjugation). Tr(x) x + x + ... + x . (16) Given an [[m,m k]] stabilizer code, it is possible to 2 2 2 Since (x+y) = x +y for all x, y F2m , the trace is linear perform encoded quantum− computation in any of the subspaces ∈ over F2. The trace inner product x, y tr = Tr(xy) defines a V (Sǫ1 ǫ ) by synthesizing appropriate logical Clifford oper- h i ··· k symmetric , so there exists a binary symmetric ators (see [41] for algorithms). If we think of these subspaces matrix W for which Tr(xy)= xW yT . In fact as threads, then a computation starts in one thread and jumps i j to another when an error (from HWN ) occurs. Quantum error- Wij = Tr α α , i,j =0, 1,...,m 1. (17) correcting codes enable error control by identifying the jump − that the computation has made. Identification makes it possible The matrix W is non-singular  since the trace inner product is non-degenerate (if Tr(xz)=0 for all z F m then x = 0). to modify the computation in flight instead of returning to the ∈ 2 initial subspace and restarting the computation. The idea of Observe that W is a , since if i+j = h+k then i j h k tracing these threads is called as Pauli frame tracking in the Tr(α α ) = Tr(α α ). The matrix W can be interpreted as F literature (see [57] and references therein). the primal-to-dual-basis conversion matrix for 2m , with the 2 m 1 A stabilizer group defined by generators is primal basis being 1, α, α ,...,α − (see [16]). S k = m { 2 } The Frobenius map f(x) = x is linear over F2, so there called a maximal commutative subgroup of HWN and γ(S) F2m exists a binary matrix R for which f(x) xR. Since is called a maximal isotropic subspace of 2 . The generator ≡ matrix G has rank m and can be row-reduced to [0 I ] m 1 S m f(x0 + x1α + ... + xm 1α − ) , Fm | − if S = ZN E(0,b): b 2 , or to the form [Im P ] 2 2(m 1) { ∈ } | = x0 + x1α + ... + xm 1α − , (18) if S is disjoint from ZN . We will denote these subgroups − as E([0 Im]) and E([Im P ]), respectively. The condition the rows of R are the vectors representing the field elements T | | T GSΩGS = 0 implies P = P , and any element of γ(S) α2i,i = 0,...,m 1. Note that square roots exist for all can be expressed in the form [a,aP ] for some a Fm. − 2 elements of F2m since R is invertible. Note that E([I 0]) = X , E(a, 0): a Fm ∈. Since m N 2 We write multiplication by z F m as a linear transforma- m |m { ∈ } 2 dim V (S)=2 − = 1, the subgroup S fixes exactly one ∈ i tion xz xAz. For z =0, A0 =0, and for z = α the matrix vector. The N eigenvectors in an orthonormal eigenbasis for ≡i m Az = A for i = 0, 1,..., 2 2, where A is the matrix S are defined up to an overall phase and called stabilizer that represents multiplication by− the primitive element α. The states [27], [28]. The number of non-zero entries in a stabilizer matrix A is the of the primitive irreducible state is determined by the intersection of S with ZN [58]. m 1 m polynomial p(x) = p0 + p1x + ... + pm 1x − + x over the binary field. Thus − IV. WEIGHT DISTRIBUTIONS OF KERDOCK CODES 0 1 0 0 ··· Kerdock codes were first constructed as non-linear binary 0 0 1 0  ···  codes [44], as was the Goethals code [46] and the Delsarte- , . . . A . .. . , (19) Goethals codes [48]. In this section, we describe the Kerdock    0 0 0 1  and Delsarte-Goethals codes as linear codes over Z4, the ring  ···  p0 p1 p2 pm 1 of integers modulo 4. These Z4-linear codes were constructed  ··· −    by Hammons et al. [24] as Hensel lifts of binary cyclic codes, and we have chosen A rather than AT as the companion matrix and this description requires Galois rings. The description since we are representing field elements in F2m by row vectors given in Section IV-A requires finite field arithmetic, but is (rather than column vectors). entirely binary and follows [26]. Our construction of unitary Lemma 4: The matrices A , W , and Ri, for i [m], satisfy: z ∈ 2-designs in Section VI uses the matrices that are defined in (a) A A = A A = A ; Section IV-A. In Section IV-B, we make a connection be- z x x z xz (b) Ax + Az = Ax+z; tween the Kerdock and Delsarte-Goethals codes and maximal T (c) AzW = W A ; z − commutative subgroups of HWN via stabilizer states, use this i 2i i i 2 21 i i i 2 (d) R Ax = AxR , R Ax = Ax R , and R− Ax− = relation to compute inner products between stabilizer states, 21+i i A−x R− ; and hence calculate weight distributions of Kerdock codes. i i T 1 i i T (e) R W = W (R− ) and W − R− W = (R ) . Proof: Identities (a) through (d) follow directly from the A. Kerdock and Delsarte-Goethals Sets [26] arithmetic of F2m . Specifically, for (c), observe that

The finite field F2m is obtained from the binary field F2 by T T (xAz)Wy = Tr((xz)y)= Tr(x(yz)) = xW (yAz) , adjoining a root α of a primitive irreducible polynomial p(x) of degree m [59]. The elements of F2m are polynomials in α and (d) can be proven similarly. To prove part (e) we observe 2 of degree at most m 1, with coefficients in F2, and we will Tr(x)= Tr(x ) and verify that for all x, y F2m , − m 1 ∈ identify the polynomial z + z α + ... + z α with the i −i 0 1 m 1 − i T 2 2 i T T − (xR )Wy = Tr(x y)= Tr(xy )= xW (R− ) y . binary (row) vector [z0,z1,...,zm 1]. − 7

Definition 5: For 0 r (m 1)/2 and for z = the Delsarte-Geothals sets PDG(m, r). While this question Fr+1 ≤ ≤ − , (z0,z1,...,zr) 2m define the bilinear form βz,r(x, y) is straightforward for PK(m), it remains open for general 2∈ 2 2r 2r Tr[z0xy + z1(x y + xy )+ ... + zr(x y + xy )]. Note that PDG(m, r) and will be investigated in future work. βz,r(x, y) is represented by the binary Definition 8: The Z4-linear Delsarte-Goethals code is given r by i T i T Pz,r , Az W + [Az W (R ) + R W A ]. (20) T T 0 i zi DG(m, r) , [xP x +2wx + κ]x Fm : P PDG(m, r), { ∈ 2 ∈ i=1 Fm Z X w 2 ,κ 4 . (21) The Delsarte-Goethals set PDG(m, r) consists of all such ∈ ∈ } m(r+1)+m+2 m+1 mr matrices Pz,r. The Kerdock set PK(m) , PDG(m, 0) consists This code has size 2 and is of type 4 2 [49, , of all matrices Pz , Pz,0, where z = (z),z F2m . Section 12.1]. The Kerdock code K(m) DG(m, 0). T T ∈ Here the notation Fm represents a Lemma 6: The Delsarte-Goethals set PDG(m, r) is an m(r+ [xP x +2wx + κ]x 2 Z ∈ T T 1)-dimensional of symmetric matrices. If z = 0 4-valued column vector with each entry xP x +2wx + 6 Fm then rank(Pz,r) m 2r. Matrices in the Kerdock set PK(m) κ (mod 4) indexed by the vector x 2 . ≥ − ZN ∈ are non-singular. Definition 9: For u, v 4 the Lee weight of u is defined , ∈ Proof: Closure under addition follows from part (b) of as wL(u) n1(u)+2n2(u)+ n3(u), where nκ(u) denotes Lemma 4. Observe Tr(x) = Tr(x2) = = Tr(x1/2). If x the number of entries of u with value κ, and the Lee distance ··· , is in the nullspace of P , i.e., using its vector representation (between u and v) is defined as dL(u, v) wL(u v). z,r − xPz,r =0, then βz,r(x, y)=0 for all y F2m and we obtain Figure 1 defines the Gray map which assigns integers ∈ modulo 4 (or quaternary phases) to binary pairs (see Remark 2 2 2 2r 2r 0= Tr[z0xy + z1(x y + xy )+ ... + zr(x y + xy )] for details). For a vector, the map is applied to each entry and − 2r 2r 2r 2r+1 2r 2r 1 2r concatenated row-wise to return a row vector, thereby adhering = Tr[(z0x) y + (z1 x y + (z1x) y )+ ... 2r 22r 2r 2r to our convention for binary vectors (see Remark 2). The ... + (zr x y + (zrx)y )] shortest distance around the circle defines the Lee metric on − 2r 2r 2r 2r+1 2r 1 ZN ZN = Tr[y ((z0x) + (z1 x + (z1x) )+ ... 4 and Gray encoding is an isometry from ( 4 , Lee metric) r 2r to (Z2N , Hamming metric). However, since g(1+3) = g(1)+ ... + (z2 x2 + z x))]. 2 r r g(3), the Gray map is non-linear. Hence the binary6 Kerdock − 2r 2r 2r+1 2r 1 and Delsarte-Goethals codes obtained by Gray-mapping the This holds for all y, so (z0x) + (z1 x + (z1x) )+ 2r 22r codewords in K(m) and DG(m, r), respectively, are non-linear ... + (zr x + zrx) must be identically 0, i.e., x is a root of the polynomial. Since the polynomial has at most 22r roots, (see [49, Chapter 12]). the nullspace of Pz,r has at most 2r, which implies that rank(Pz,r) m 2r. g(1/ı)=01 Remark 7: Note≥ that− since the dimension of the vector space of all binary m m symmetric matrices is m(m + 1)/2, × the set PDG(m, (m 1)/2) contains all possible symmetric − matrices. For the remainder of this paper we represent a g(2/ 1) = 11 g(0/1) = 00 general symmetric matrix as simply P , thereby dropping the − subscripts z, r unless necessary. We will continue to represent Kerdock matrices as Pz. g(3/ ı)=10 B. Delsarte-Goethals Codes and Weight Distributions − Hammons et al. [24] showed that the classical nonlinear Fig. 1. The Gray map assigning integers modulo 4 or quaternary phases to Kerdock and Delsarte-Goethals codes, defined by quadratic binary pairs (that are length-2 row vectors). forms in [44], [47], are images of linear codes over Z4 under the Gray map. In this section, we begin by reviewing this The Gray map is also a scaled isometry from (length-N construction using the Kerdock and Delsarte-Goethals sets vectors of quaternary phases, squared Euclidean metric) to Z Z2N of matrices, and demonstrate that exponentiating these 4- ( 2 , Hamming metric). Note that for this set of quaternary valued codewords entry-wise by ı produces stabilizer states. phases, squared Euclidean distance is indeed a metric. This is formalized in the following lemma. For stabilizer states of E([Im Pz1,r]) and E([Im Pz2,r]), we calculate their Hermitian inner| products using| the trace Lemma 10: Let u, v CN be two length-N vectors of of certain projection operators, and show that the distribution quaternary phases. Then ∈ of inner products depends only on rank(Pz1,r + Pz2,r). Then, u v, u v =2dH (g(u), g(v)), (22) since rank(Pz) 0,m for all Pz PK(m), we compute h − − i ∈ { } ∈ the weight distribution of Kerdock codes by relating these where dH denotes the Hamming distance. Hermitian inner products to the histogram of values in the Next, we prove a lemma establishing the relation between difference between two Z4-valued codewords. In order to DG(m, r) and the common eigenspace of E([Im P ]) deter- calculate the weight distribution of Delsarte-Goethals codes, mined by a binary symmetric matrix P (see Remark| 7). Note we would need to determine the distribution of ranks in that we denote the maximal commutative subgroup determined 8

by the rows of [I P ] as E([I P ]), and that we do not one of the N +1 subgroups determined by all P PK(m) m | m | z ∈ normalize eigenvectors (stabilizer states) in this section, since and ZN . the Gray map needs to be applied to quaternary phases. Therefore, stabilizer states connect the classical world of Lemma 11: Given a binary symmetric matrix P , the (col- Kerdock and Delsarte-Goethals codes and the quantum world xPxT +2wxT umn) vectors [ı ]x Fm are common eigenvectors of maximal commutative subgroups of HWN . This synergy ∈ 2 of the maximal commutative subgroup E([Im P ]). Each has proven successful in several applications [26], [30]–[32], eigenvector has Euclidean length √N =2m/2. | [34], [50] and our construction of a unitary 2-design here, from Proof: It is possible to prove this result by direct cal- stabilizer states, is yet another instance. xPxT +2wxT culation, i.e., by calculating E(a,aP ) [ı ]x Fm Remark 14: Note that in Lemma 11 we only considered · ∈ 2 for some a Fm, but the following argument uses the κ = 0 while exponentiating codewords cu DG(m, r). This 2 ∈ mathematical∈ framework described in Section III. Note that is to ensure that the resulting eigenvector corresponds to a 1 eigenvalue (and not a value in 1, ı ). However, Theorem± 1 xPxT +2wxT xPxT +2wxT [ı ]x Fm = ı ex, (23) Z {± ± } ∈ 2 considers all κ 4 while calculating the weight distribution. x Fm ∈ X∈ 2 Given P PDG(m, r), we scale the common eigenvectors of ∈ by √ to obtain a set of length- where e denotes the standard basis vector in CN with a 1 in E([Im P ]) N V (P ) x vectors| of quaternary phases. (Note the similarity to the the position x and 0 elsewhere. N 2wxT wxT notation V (S) used in Section III, and observe that here we The columns [ı ]x Fm = [( 1) ]x Fm of the Walsh- ∈ 2 ∈ 2 consider all eigenvectors, albeit unnormalized, and not just the Hadamard matrix H , where w −Fm indexes the column, are N 2 +1 eigenspace.) Therefore, if we can compute the Hermitian common eigenvectors of the maximal∈ commutative subgroup T inner products between these unnormalized stabilizer states X = E([I 0]). The Clifford operator t = diag ıxPx N m | P then we can use Lemma 10 to calculate the weight distribution Im P  of Kerdock and Delsarte-Goethals codes. Note that despite corresponds to the binary symplectic matrix TP = 0 Im being non-linear codes the weight and distance distributions (see Table I). Hence conjugation by t maps E([I 0]) P m | of these codes coincide, as shown in [23, Chapter 15] (which to E([I P ]), i.e., t E(a, 0)t† = E(a,aP ), and so the Z m | P P follows from 4-linearity and Gray isometry). common eigenvectors of E([Im P ]) are Lemma 15: Let P1, P2 PDG(m, r) be distinct. Fix v | u ∈ ∈ 2wxT xPxT +2wxT V (P2) and let run through V (P1). If rank(P1 + P2) = k tP [ı ]x Fm = [ı ]x Fm . · ∈ 2 ∈ 2 then Fm 2m k k It is easily verified that for any a 2 , 2 for 2 eigenvectors u, ∈ u, v 2 = − (25) T T T m k u 2wx xPx +2wx |h i| (0 for 2 2 eigenvectors . tP E(a, 0)t† tP [ı ]x Fm = [ı ]x Fm . − P · ∈ 2 ± ∈ 2   Proof: Let Q = [Im P1] [Im P2] represent a basis for the subspace formed by| intersecting∩ | the spaces generated Now we have the following important observation. Given by [Im P1] and [Im P2]. Then dim(Q) = m k. Let v CN , define | | − [a1,b1],..., [am k,bm k] be a basis for Q, and complete to ∈ − − , v v C bases for P1 and P2 by adding vectors [cj , dj ], j = m k + Sv g HWN : g = α , where α and α =1 . − { ∈ ∈ | | } 1,...,m and [c′ , d′ ], j = m k+1,...,m respectively. Since (24) j j − v is fixed, using (14), there are fixed fi,tj 1 such that Lemma 12: ∈ {± } 1 1 v v† (a) Sv is commutative. √ √  N   N  (b) There is a 1-N correspondence between maximal com- m k m − (I + f E(a ,b )) (IN + tj E(c′ , d′ )) mutative subgroups of HWN and stabilizer states. = N i i i j j , 2 2 Proof: i=1 j=m k+1 Y Y− (a) If E(a,b), E(a′,b′) Sv then u ∈ and since the only constraint for is to be from V (P1), E(a,b)E(a′,b′)v = αα′v = α′αv = E(a′,b′)E(a,b)v. 1 1 u u† √N √N v v     (b) If is a stabilizer state then S is a maximal commuta- m k m − (I + e E(a ,b )) (I + s E(c , d )) tive subgroup of HWN . = N i i i N j j j , 2 2 Remark 13: Any stabilizer state of a maximal commutative i=1 j=m k+1 Y Y− subgroup of HWN disjoint from ZN can be obtained by expo- 2 where e ,s 1 are variable. Since u, v = Tr(uu†vv†) nentiating Delsarte-Goethals codewords, and multiplying the i i ∈ {± } |h i| 1 it only remains to calculate Tr(uu†vv†). If ei = fi i, then quaternary phase vector by N − 2 . The maximal commutative ∀ subgroups E([Im Pz]) determined by the Kerdock matrices (IN + eiE(ai,bi))(IN + fiE(ai,bi)) = 2(IN + eiE(ai,bi)) intersect trivially.| Together with , they Pz ZN = E([0 Im]) so that partition all (N 2 1) non-identity Hermitian Pauli| matrices. m k − − Hence, given a non-identity Hermitian Pauli matrix E(a,b), it m k Tr(uu†vv†)=2 − Tr (I + e E(a ,b )) follows that there is a sign ǫ 1 such that ǫE(a,b) is in N i i i i=1 ∈ {± }  Y 9

m (I + s E(c , d )) A. The Kerdock MUBs × N j j j j=m k+1 Recollect from Section IV-A that the Kerdock matrices − Y m are Pz = AzW , where W is a symmetric Hankel matrix (I + t E(c′ , d′ )) . T × N j j j with binary entries that satisfies Tr(xy) = xW y and Az j=m k+1  F m Y− represents multiplication by z, both in 2 . Using the result Expanding the right hand side, the only term with nonzero of Lemma 11, define N mutually unbiased bases trace is the identity with trace 2m. Hence in this case T xPzx uu vv 2m k , F m Tr( † †) =2 − . The k eigenvalues sj can be freely Mz tPz HN = diag ı HN , z 2 , (28) k ∈ chosen, so there are 2 eigenvectors in this case.   1 xyT m If ei = fi for some i, then where [H ] , ( 1) , for x, y F , is the 6 N x,y √N − ∈ 2 Walsh-Hadamard matrix of order N. Note that M = H (IN + eiE(ai,bi))(IN + fiE(ai,bi))=0 0 N and that all columns of M have Euclidean length 1 . m k z √N and Tr(uu†vv†)=0. There are 2 2 such eigenvectors. − m Complete the MUBs by appending the matrix M , IN . Finally, if k = m then Tr(uu†vv†)= Tr(I )=2 u. ∞ N ∀ The common eigenspaces of the maximal commutative sub- Corollary 16: For P1, P2 PK(m), since rank(P1 + P2) ∈ ∈ group E([I P ]) are the columns of M and the common 0,m the inner products are m | z z { } eigenspaces of E([0 Im]) are the standard unit coordinate u v | 0 if P1 = P2 and = vectors. Hence the set of Kerdock MUBs 6 u, v 2 = 2m if P = P , (26)  1 2 , F |h i| 2m 6 K(m) IN ,Mz : z 2m (29) 2 if (P1 = P2 and) u = v. B { ∈ } This result is the primary tool that allowed us to simplify is a maximal collection of mutually unbiased bases [33].  the derivation of the weight distribution of Kerdock codes in Theorem 1. Note that Theorem 1 is the only result in this section that is restricted to Kerdock codes but not general B. Symmetries of Kerdock MUBs Delsarte-Goethals codes (and requires m to be odd). Let M be the N N(N + 1) matrix given by × V. MUTUALLY UNBIASED BASES FROM P (m) K M , [ M M0 Mz ] . (30) ∞ | | · · · | | · · · In this section, we will organize the columns of IN (i.e., the Note that M = IN and M0 = HN . common eigenbasis of ZN ) and all stabilizer states determined ∞ by Pz PK(m) into a matrix to form mutually unbiased Definition 19: A symmetry of M is a pair (U, G) such that bases, and∈ analyze its symmetries. This symmetry group will UMG = M, where U is an N N unitary matrix, and G is × eventually lead to the construction of the unitary 2-design. We a generalized , i.e., G = ΠD where Π is a first state a result that holds for stabilizer states determined by permutation matrix and D is a of quaternary matrices from general Delsarte-Goethals sets. phases. Definition 17: Given a collection M of unit vectors in CN Observe that for any such symmetry, G can undo the action (Grassmannian lines) the chordal distance chor(S) is given by of U if and only if U induces a (generalized) permutation on the columns of M. Moreover, since U is unitary it has chor(M) , min 1 u, v 2. (27) (u,v) M − |h i| to preserve inner products, so Corollary 16 implies that U ∈ It follows from Lemma 15p that the Delsarte-Goethals can only permute the bases Mz and permute columns within m(r+2) each basis, or equivalently permute the corresponding maximal set PDG(m, r) determines 2 complex lines (stabilizer CN (m 2r) commutative subgroups and permute elements within each states) in with chordal distance √1 2− − (cf. [60]). Definition 18: Two N N unitary matrices− U and V are said subgroup, respectively, by conjugation. × 1 to be mutually unbiased if u, v = N − 2 for all columns u Lemma 20: For any symmetry (U, G) of M, the unitary |h i| of U, and all columns v of V . Each matrix is interpreted as an matrix U is an element of the Clifford group CliffN . orthonormal basis and collections of such unitary matrices that Proof: A Pauli matrix E(a,b) E([Im Pz]) that fixes ∈ vv | are pairwise mutually unbiased are called mutually unbiased Mz can be written as E(a,b)= v M ǫv †, where ǫv = 1 ∈ z ± bases (MUBs). Vectors in each orthonormal basis look like for all v. Since U permutes the eigenbases Mz, it follows that P noise to the other bases (due to the small inner product). Uv Mz′ , for some z′ F2m , is fixed by UE(a,b)U † ∈ ∈ ∪{∞} Corollary 16, when applied to normalized eigenvectors, which must again be a Pauli matrix. Hence U is a Clifford shows that the N eigenbases determined by the Kerdock element. set PK(m) are mutually unbiased (also see Remark 13). We first observe the symmetries induced by elements of Let K(m) denote the collection of these N eigenbases (of HWN . B E([Im P ]) for all P PK(m)) along with the eigenbasis 1) Pauli Matrices E(a, 0) and E(0,b): The group I of E| ([0 I ]). This∈ is a set of N +1 mutually unbiased E([I 0]) of Pauli matrices E(a, 0) fixes each column of N | m m | bases and they determine an ensemble of N(N + 1) complex M0 = HN and acts transitively on the columns of each of lines (stabilizer states) that is extremal [33]. In this section, we the other N blocks. The group E([0 I ]) of Pauli matrices | m provide an elementary description of their group of Clifford E(0,b) fixes each column of M = IN and acts transitively symmetries. on the columns of each of the remaining∞ blocks. 10

− , 2 i 2 2 Definition 21: The projective (iv) z z′ z becomes [Im AzW ] [Im Az′ W ]: m 7→ | 7→ | PSL(2, 2 ) is the group of all transformations i 2 R− 0 i 2 i T [I A W ] = [R− A W (R ) ] az + b m | z 0 (Ri)T | z f(z)= , where a,b,c,d F2m , ad + bc =1, (31)   i 2 i cz + d ∈ = [R− A R− W ] | z acting on the F m . The transformation 2 2 [Im Az′ W ]. (37) ∪ {∞} a b ≡ | f is associated with the action of the 2 2 matrix on × c d Let PK,m be the group of symplectic transformations gen-   1-dimensional spaces, since erated by (i), (ii) and (iii) above, and let PK∗ ,m be the group PK,m enlarged by the generators (iv). Thus, using notation in z az + b 1 az+b f : or cz+d . Table I, we have 1 7→ cz + d ≡ 0 1         , − − m PK,m TA2 W ,L 1 , ΩLW 1 ; x F2m = PSL(2, 2 ), m h x Ax ∈ i ∼ The projective linear group PΓL(2, 2 ) is the group of all (38) transformations m , 2 −1 −1 F m −i PK∗ TA W ,L −i , ΩLW ; x 2 = PΓL(2, 2 ). 2 ,m h x R Ax ∈ i ∼ az + b (39) f(z)= − , where a,b,c,d F m , ad + bc =1, 2 i 2 cz + d ∈ 2 2 (32) Although TW = I2m, in the unitary group we have tW = E(0, dW ). Therefore the corresponding Clifford elements will and i 0, 1,...,m 1 . The orders are m m ∈{ − } generate a group larger than PSL(2, 2 ) and PΓL(2, 2 ). PSL(2, 2m) = (N + 1)N(N 1)=23m 2m, Each symplectic matrix in the above groups can be trans- | | − − formed into a quantum circuit (or simply a unitary matrix) PΓL(2, 2m) = (N + 1)N(N 1)m. (33) | | − by expressing it as a product of standard symplectic matrices Now we analyze the symmetries induced by elements of the from Table I (see [41, Section II]). binary symplectic group Sp(2m, F2). Remark 22: Note that Ω / PK,m but ΩLW −1 PK,m, m ∈ ∈ 2) Clifford Symmetries of M: The group PSL(2, 2 ) is which means HN does not permute columns of M but generated by the transformations z z + x, z zx, and HN ℓW −1 does. Hence, for example, to map [0,a] to [a, 0] m 7→ m 7→ z 1/z. The group PΓL(2, 2 ) is PSL(2, 2 ) enlarged by one sequence would be (ΩLW −1 ) L −1 , where b satisfies − Ab 7→ 2 i i 1 1 · 1 the Frobenius automorphisms z z zR− discussed in aW A− = a. This does not force A− = W . 7→ ≡ − b b Section IV-A. We realize each of these transformations as a Lemma 23: Any element of PK,m can be described as T 2 symmetry of M. We recall that AzW Az = AzW from part a product of at most 4 basis symplectic matrices given in (c) of Lemma 4, and for convenience we work with maximal Section V-B2. 2 commutative subgroups E([Im AzW ]), i.e., the Kerdock Proof: Using the results in this Section, a general block 2 | 2 2 matrices are Pz = AzW . Note that every field element permutation [Im AzW ] [Im A az+b W ] is realized as | 7→ | cz+d β F2m is a square, so this is equivalent to Pz = AzW . ∈ 2 2 (i) z z + x becomes [I A2W ] [I A2 W ]: 2 Ad Ab W 2 2 m z m x+z [Im AzW ] 1 2 2 T = [Acz+d Aaz+bW ] 7→ | 7→ | | W − Ac (Aa) | 2   2 Im AxW 2 2 2 [Im AzW ] = [Im (Az + Ax)W ] Im A az+b W . | 0 Im | cz+d   ≡ | 2 h i [Im (Ax+z)W ]. (34) It can be verified that the above is a valid symplectic matrix ≡ | and satisfies all conditions in (10). We now show that this (ii) z xz becomes [I A2W ] [I A2 W ]: 7→ m | z 7→ m | xz matrix can be decomposed as a product of 4 basis matrices. 1 2 Ax− 0 1 2 T We use the results in Lemma 4 and observe the following: [Im A W ] = [A− A W A ] | z 0 AT x | z x 2 T 2  x  Ax− 0 0 W 0 Ax− W 1 2 2 T 1 = 1 2 ; = [A− A A W ] 0 (A ) W − 0 W − A 0 x | x z  x    x  [I A2 W ]. (35) m xz 2 2 2 2 ≡ | Im AyW 0 Ax− W Axy Ax− W 2 2 1 2 = 1 2 ; (iii) z 1/z becomes [Im AzW ] [Im A −1 W ]: 0 I W − A 0 W A 0 7→ | 7→ | z  m  x   − x  1 2 0 Im W − 0 2 2 2 2 2 [Im AzW ] T Axy Ax− W Im AwW Axy Awxy+x−1 W | Im 0 0 W = . W 1A2 0 0 I 1 2 2 T    1 − x m W − Ax (Awx) 2 W − 0      = [AzW Im] , , a , d 1 | 0 W Hence we set x c, w c ,y c so that wxy + x− =   ad+1 2 = b and the resultant matrix matches the general = [Az W ] c | 2 symplectic matrix given above. [Im A −1 W ]. (36) F ≡ | z Corollary 24: Let a,b,c,d 2m be such that ad + bc =1. ∈m The isomorphism τ : PSL(2, 2 ) PK can be defined as Note that if we start with z = 0, i.e., the subgroup → ,m E([Im 0]), then since W is invertible the final a b , − − | τ TA2 W L 2 ΩLW 1 TA2 W . (40) subgroup is E([0 Im]), interpreted as z = . c d d/c · Ac · · a/c | ∞   11

Observe that this provides a systematic procedure to sample Lemma 29: The Heisenberg-Weyl graph HN is strongly from the group PK . By choosing α,β,δ F m uniformly regular with parameters ,m ∈ 2 at random, a symmetry element can be constructed as N 2 N 2 N 2 n = N 2 1, t = 2, λ = 3, µ = 1. F , T L (ΩL −1 T ). (41) − 2 − 4 − 4 − α,β,δ AαW · Aβ · W · AδW (44) The first two factors provide transitivity on the Hermitian Proof: A vertex [c, d] joined to a given vertex [a,b] is a T matrices of all maximal commutative subgroups except ZN = solution to [a,b]Ω[c, d] = 0 (due to (5)). This is a linear E([0 Im]), and the last factor enables exchanging any system with a single constraint, and after eliminating the | N 2 subgroup E([Im Pz]) with E([0 Im]) (see Lemma 31). solutions [0, 0] and [a,b] we are left with t = 2 distinct | | 2 We complete this section by observing that the symmetry vertices [c, d] joined to [a,b]. − group can be enlarged by including the Frobenius automor- Given vertices [a,b], [c, d] a vertex [e,f] joined to both [a,b] phisms R from Section IV-A. and [c, d] is a solution to a linear system with two independent

Lemma 25: An arbitrary element from PK∗ ,m specified by constraints. When [a,b] is not joined to [c, d], we only need a,b,c,d F2m and i 0,...,m 1 takes the form to eliminate the solution [0, 0]. When [a,b] is joined to [c, d] ∈ ∈{ − } we need to eliminate [0, 0], [a,b] and [c, d]. i 2 i 2 2 R− Ad R− Ab W Remark 30: The number of edges in H is (N 2 1)( N F = 1 i 2 i T 2 T , (42) N 2 W − R− A (R ) (A ) − −  c a  2). The number of type-1 edges is (N + 1)(N 1)(N 2)/2 2 N−2 − with ad + bc =1, and realizes the block permutation and the number of type-2 edges is (N 1)( 2 N)/2. Lemma 31: − − − 2 2 2 i (a) The symplectic group Sp F acts transitively on ′ , (2m, 2) [Im A W ] Im A az +b W , z′ z . (43) z ′ | 7−→ | cz +d vertices, on edges, and on non-edges of H .   N (b) The groups P and P act transitively on vertices Proof: See Appendix A. K,m K∗ ,m of HN . Proof: Part (a) is well-known in symplectic geometry, VI. UNITARY 2-DESIGNSFROMTHE KERDOCK MUBS and can also be proven by direct calculation using symplectic matrices. In this section, we show that the unitary transformations (b) Since PK,m acts transitively on maximal commutative determined by PK,m, along with Pauli matrices D(a,b) subgroups E([0 I ]), E([I P ]),z F m (see (34) , form a unitary -design. We first define a graph on∈ m m z 2 HWN 2 and (36)), we need| only show that| P ∈is transitive on a Pauli matrices, where Clifford elements act as graph automor- K,m particular subgroup, say E([I 0]). If a,b F m then there phisms. We then show that a group of automorphisms that acts m | ∈ 2 exists c F m such that b = ac, and it follows from (35) that transitively on vertices forms a unitary 2-design. Finally we ∈ 2 Ac 0 show that a group of automorphisms that acts transitively on the symplectic matrix T maps [a, 0] to [b, 0]. 0 A −1 vertices, on edges, and on non-edges forms a unitary -design.  c  3 Remark 32: The groups PK,m and PK∗ ,m are not transitive 2 Definition 26: The Heisenberg-Weyl graph HN has N 1 on edges of H because they cannot mix type-1 and type-2 − N vertices, labeled by pairs E(a,b) with [a,b] = [0, 0] where edges. ± 6 vertices labeled E(a,b) and E(c, d) are joined if E(a,b) Definition 33 ([11] [62, Chap. 7]): Let k be a positive ± ± commutes with E(c, d). We use [a,b] to represent the vertex integer. An ensemble = p ,U n , where the unitary E { i i}i=1 labeled E(a,b) and [a,b] — [c, d] to represent an edge matrix Ui is selected with probability pi, is said to be a unitary ± N k between two vertices. k-design if for all linear operators X (C )⊗ Remark 27: Elements of the Clifford group act by con- ∈ k k k k jugation on HWN , inducing automorphisms of the graph p U ⊗ X(U †)⊗ = dη(U) U ⊗ X(U †)⊗ , (45) U H . We shall distinguish two types of edges in H . Type 1 (p,U) Z N N N X∈E edges connect vertices from the same maximal commutative where η( ) denotes the Haar measure on the unitary group UN . subgroup E([I P ]),z F m , or from E([0 I ]). Type · m | z ∈ 2 | m The linear transformations determined by each side of (45) 2 edges connect vertices from different maximal commutative are called k-fold twirls. A unitary k-design is defined by the subgroups. property that the ensemble twirl coincides with the full unitary H F To see that Aut( N )= Sp(2m, 2), determine a symplectic twirl. matrix to reduce an arbitrary graph automorphism to an We define the Kerdock twirl to be the linear transformation automorphism that fixes , then N 2 π [ei, 0], [0,ei],i = 1,...,m of (C )⊗ determined by the uniformly weighted ensemble show that fixes every vertex. This essentially amounts to 1 π consisting of φ− (PK,m) along with Pauli matrices D(a,b), solving for a symplectic matrix satisfying a linear system. where φ: CliffN /HWN Sp(2m, F2) (from Section III). Definition 28 ([61, Def. 2.4]): A strongly regular graph with Similarly, we define the 2-fold→ action (in (45)) of the ensemble parameters (n,t,λ,µ) is a graph with n vertices, where each determined by PK∗ ,m as the enlarged Kerdock twirl. vertex has degree t, and where the number of vertices joined Definition 34: An ensemble = p ,U n of Clifford E { i i}i=1 to a pair of distinct vertices x, y is λ or µ according as x, y elements Ui is Pauli mixing if for every vertex [a,b] the are joined or not joined respectively. distribution p ,U E(a,b)U † is uniform over vertices of H . { i i i } N 12

The ensemble is Pauli 2-mixing if it is Pauli mixing and 140 if for every edgeE (resp. non-edge) ([a,b], [c, d]) the distribu- TAαW worst-case over all α 120 tion p , (U E(a,b)U †,U E(c, d)U †) is uniform over edges m log2(m) log2(log2(m)) { i i i i i } (resp. non-edges) of HN . Theorem 35: Let G be a subgroup of the Clifford group 100 1 containing all D(a,b) HWN , and let = G ,U U G be the ensemble defined∈ by the uniform distribution.E { | | If} G∈ acts 80 transitively on vertices of HN then is a unitary 2-design, and if G acts transitively on vertices,E edges and non-edges 60 then is a unitary 3-design. Proof:E Transitivity means a single orbit so that ran- 40 dom sampling from G results in the uniform distribution on vertices, edges, or non-edges. Hence transitivity on vertices 20 implies is Pauli mixing and transitivity on vertices, edges E 0 and non-edges implies is Pauli 2-mixing. It now follows 0 2 4 6 8 10 12 14 16 from [11] or [16] thatE Pauli mixing (resp. Pauli 2-mixing) Fig. 2. The gate complexities for the element T in (41) for varying m. implies is a unitary 2-design (resp. unitary 3-design). AαW CorollaryE 36: Random sampling from the Clifford group gives a unitary 3-design and random sampling from the groups 200 P , P followed by a random Pauli matrix D(a,b) gives K,m K∗ ,m LA worst-case over all β 180 β unitary 2-designs. m log2(m) log2(log2(m)) 1.5m log (m) log (log (m)) Puchała and Miszczak have developed a useful 160 2 2 2 R Mathematica package IntU [63] for symbolic integration 140 with respect to the Haar measure on unitaries. For small m, we used this utility to verify the equality in (45) explicitly 120 for the Kerdock 2-design. 100 Sampling uniformly from the groups PK,m can be achieved using the systematic procedure shown in (41). The resultant 80 symplectic matrix can be transformed into a quantum circuit 60 (or simply a unitary matrix) by expressing it as a prod- 40 uct of standard symplectic matrices from Table I (see [41, Section II]). Although our unitary 2-design is equivalent to 20 that discovered by Cleve et al. [16], the methods we use to 0 translate design elements to circuits are very different and 0 2 4 6 8 10 12 14 16 much simpler. While they use sophisticated methods from Fig. 3. The gate complexities for the element LA in (41) for varying m. finite fields to propose a circuit translation that is tailored β for the design, our algorithm from [35] (whose details are discussed in [41, Appendix II]) is a general purpose procedure that can be used to translate arbitrary symplectic matrices to grow faster than O(m log m log log m) is LAβ , and we are cur- circuits. They have been able to show Clifford-gate-complexity rently investigating methods to calculate this gate complexity O(m log m log log m) assuming the extended Riemann hy- via analytical arguments that leverage results in the classical pothesis is true, or O(m log2 m log log m) unconditionally, computation literature. A curious data point is m = 15 in both of which are near-linear when compared to the O(m2) Fig. 4, where the matrix W has zeros everywhere except the gate-complexity for general Clifford elements. Our open- anti-diagonal, which translates to a single permutation of the source implementation1 allows one to construct the design qubits. Since the decomposition in (41) involves a constant for a specified number of qubits, and we use this utility to number of factors, the overall complexity is that of the factor calculate worst-case gate complexities on up to 16 qubits. with largest order term. We will also investigate if our circuits In our sampling procedure (41) we have three elementary can always be organized to give a depth of O(log m) just as Cleve et al. forms TAαW ,LAβ , and Ω, which translate to phase and controlled-Z gates, permutations and controlled-NOT gates, Hence, we have provided an alternative perspective to and Hadamard gates on all qubits, respectively (see [41, the quantum unitary 2-design discovered by Cleve et al. by − establishing a connection to classical Kerdock codes, and Appendix I]). Note that LW 1 has the same elementary form simplified the description of the design as well as its translation as LAβ , although W is fixed for a given m. The Hadamard gates add only O(m) complexity. Figures 2, 3, and 4 plot the to circuits. Since we also appear to achieve competetive

−1 Clifford-gate-complexities, and provide implementations for worst-case complexities of the gates TAαW ,LAβ , and LW obtained using our procedure. The only form that seems to our methods, we believe this paves the way for employing this 2-design in several applications, specifically in randomized 1Implementations online: https://github.com/nrenga/symplectic-arxiv18a benchmarking [9], [51]. 13

140 7 α , d = 0), or equivalently (a,b,c,d,i = 0) in PK∗ ,4. In this

LW −1 case the matrices defined in Section IV-A are 120 m log2(m) log2(log2(m)) 0 00 1 1 0 0 1 100 0 01 0 0 0 1 0 W = , W 1 = , 0 10 0 − 0 1 0 0 80 1 00 1 1 0 0 0     1 00 0 01 0 0 60 0 01 0 00 1 0 R = , A = . (48) 1 10 0 00 0 1 40 0 01 1 11 0 0         20 Then, using the isomorphism in Corollary 24 and the direct

0 form in Lemma 23, we can express the element in PK,4 as 0 2 4 6 8 10 12 14 16

Fig. 4. The gate complexities for the element L −1 in (41) for varying m. F = T 2 L −2 ΩL −1 T 2 W abcd A0W A W A 11 W · α7 · · α = I L 7 −2 ΩL −1 T 11 2 (49) 8 · (A ) · W · (A ) W 2 0 Aα8 W VII. LOGICAL UNITARY 2-DESIGNS = 1 2 2 T W − A 7 (A 3 )  α α  0 A16W In this section, we apply our synthesis algorithm [41] to log- = 1 14 6 T (50) W − A (A ) ical randomized benchmarking, which was recently proposed   by Combes et al. [10] as a more precise protocol to reliably 0 0 0 0 0 0 1 0 estimate performance metrics for an error correction imple- 0 0 0 0 0 1 0 0   mentation, as compared to the standard approach of physical 0 0 0 0 1 0 0 1  0 0 0 0 0 0 1 1  randomized benchmarking. Using this procedure, they are able =   . (51)  1 0 1 1 0 1 1 0  to quantify the effects of imperfect logical gates, crosstalk, and    0 1 0 0 0 1 0 1  correlated errors, which are typically ignored. They use the full    1 0 0 0 1 0 1 0  logical Clifford group to perform benchmarking as this group    1 0 0 1 1 1 0 1  forms a (logical) unitary 2-design (as well as 3-design). Our   construction can be used to implement their protocol with a   much smaller 2-design (PK,m) and our synthesis algorithm Using the explicit decomposition in (49), we map the ele- can be used to realize the design at the logical level. mentary symplectic matrices to standard Clifford gates (as Here we show by example that we can efficiently translate discussed in [41]) and get the following circuit (CKT1).2 any unitary 2-design of Clifford elements into a logical unitary 2-design, i.e., for a given [[m,m k]] stabilizer code, produce ‘Permute’ [4,1,2,3] m-qubit physical Clifford circuits− that form a unitary 2-design ‘CNOT’ [1,2] on the m k protected qubits. As a proof of concept, we ‘Permute’ [4,3,2,1] − ‘CNOT’ [1,4] translate the Kerdock design PK,m k on the m k =4 logical qubits of the [[6, 4, 2]] CSS code [52],− [64] into− their physical ‘H’ [1,2,3,4] 6-qubit implementations. The stabilizers of this code are ‘P’ [1,2,3,4] ‘CZ’ [1,3] 6 6 ‘CZ’ [2,4] S , X⊗ ,Z⊗ h i ‘CZ’ [3,4] = E(111111, 000000), E(000000, 111111) . (46) h i Here the indices corresponding to ‘Permute’ imply the cycle The logical Pauli operators are permutation (1432), i.e., the first qubit has been replaced by the fourth, the fourth by the third, the third by the second, and the second by the first. (Note that we do not simplify X¯1 , E(110000, 000000) Z¯1 , E(000000, 010001) circuits to their optimal form here but simply report the results X¯2 , E(101000, 000000) Z¯2 , E(000000, 001001) . of our synthesis algorithm.) An alternative procedure is to X¯3 , E(100100, 000000) Z¯3 , E(000000, 000101) directly input the final symplectic matrix (51) to the symplectic X¯4 , E(100010, 000000) Z¯4 , E(000000, 000011) (47) decomposition algorithm in [35] (also see [41, Section II]), yielding the following circuit (CKT2).

Consider F16 constructed by adjoining to F2 a root α of the 4 primitive polynomial p(x)= x +x+1. Consider the element 2We list circuits instead of giving their circuit representation to align with 3 8 R Fabcd in PK,4 identified by the tuple (a = α ,b = α ,c = the MATLAB cell array format we adopt in our implementations. 14

‘Permute’ [3,2,1,4] ‘CZ’ [5,6] ‘CNOT’ [4,3] ‘H’ [1,2] ‘CNOT’ [1,4] ‘CNOT’ [2,3] ‘H’ [1,2,3,4] ‘CNOT’ [2,4] ‘P’ [1,2,3,4] ‘CNOT’ [2,5] ‘CZ’ [1,3] ‘CNOT’ [2,6] ‘CZ’ [2,4] ‘Z’ [2,6] ‘CZ’ [3,4] We used the same procedure to translate all 4080 elements The difference in depth of the two circuits is very small in this of PK,4 into their (smallest depth) physical implementations case, but we found that for about half of the elements in PK,4 for the [[6, 4, 2]] code, and the synthesis took about 25 minutes the explicit form in Corollary 24 had smaller depth, while for on a laptop running the Windows 10 operating system (64- TM R those remaining, the direct decomposition was better. bit) with an Intel Core i7-5500U @ 2.40GHz processor Next we translate this logical circuit into its physical imple- and 8GB RAM. Note that for this case each element of k(k+1)/2 mentation for the [[6, 4, 2]] CSS code. We apply our synthesis PK,4 translates to 2 = 8 symplectic solutions during algorithm [41], which can be summarized as follows. the above procedure, and we need to compare depth after 1) Compute the action of either of the above circuits on calculating circuits for all solutions. In future work, we will try the Pauli matrices Xi,Zi, for i = 1, 2, 3, 4, under con- to optimize directly for depth without computing all solutions jugation, i.e., compute gE(ei, 0)g†, gE(0,ei)g† where g as this procedure is expensive for codes with large redundancy represents the circuit. (k). However, since this translation needs to be done only once 2) Translate these into logical constraints on the desired for a given set PK,m k and an [[m,m k]] stabilizer code, the − − physical circuit g¯ Cliff 6 by interpreting X ,Z above circuits can be precomputed and stored in memory. ∈ 2 i i as their logical equivalents X¯ , Z¯ HW 6 . i i ∈ 2 3) Rewrite the above conditions as linear constraints on the VIII. CONCLUSION desired symplectic matrix F using (9). Add constraints g¯ In this paper, we provided a simpler calculation of the to normalize (or just centralize) the stabilizer S. Hamming weight distribution of the classical binary non-linear 4) Solve for all symplectic solutions, compute their corre- Kerdock codes by appealing to the connection with maximal sponding circuits and identify the best solution in terms commutative subgroups of the Heisenberg-Weyl group from of smallest depth, with respect to the decomposition the quantum domain. Using this connection, we also described in [35] (also discussed in [41, Section II]). the group of Clifford symmetries of the mutually unbiased 5) Verify the constraints imposed in step 2 and check for bases determined by the Kerdock sets of symmetric matrices. any sign violations (due to signs in (9)). In case of We then used this result in the classical domain to construct violations, identify a Pauli matrix to fix the signs. small unitary 2-designs. Finally, we demonstrated an efficient Using this algorithm, we computed the circuit with smallest procedure for translating any unitary 2-design consisting of depth (relative to other solutions decomposed using the same Clifford elements into a logical unitary 2-design for a given CKT3 algorithm) and obtained the following solution ( ). stabilizer code. This work demonstrates yet again that inter- ‘Permute’ [1,6,3,5,4,2] actions between the classical and quantum domains are still ‘CNOT’ [3,1] mutually beneficial, both theoretically and practically. ‘CNOT’ [4,1] ‘CNOT’ [5,1] REFERENCES ‘CNOT’ [6,1] ‘CNOT’ [6,4] [1] S. Bravyi, D. Gosset, and R. König, “Quantum advantage with shallow circuits.,” Science, vol. 362, no. 6412, pp. 308–311, 2018. ‘CNOT’ [6,5] [2] E. Conover, “Quantum computers are about to get ‘CNOT’ [4,5] real,” Science News, vol. 191, no. 13, p. 28, 2017. ‘CNOT’ [3,6] https://www.sciencenews.org/article/quantum-computers-are-about- get-real. ‘CNOT’ [2,3] [3] P. W. Shor, “Scheme for reducing decoherence in quantum computer ‘H’ [1,2,3,4,5,6] memory,” Phys. Rev. A, vol. 52, no. 4, pp. R2493–R2496, 1995. ‘P’ [3,4,5] [4] A. R. Calderbank and P. W. Shor, “Good quantum error-correcting codes exist,” Phys. Rev. A, vol. 54, pp. 1098–1105, Aug 1996. ‘CZ’ [1,3] [5] A. M. Steane, “Simple quantum error-correcting codes,” Phys. Rev. A, ‘CZ’ [1,4] vol. 54, no. 6, pp. 4741–4751, 1996. ‘CZ’ [1,5] [6] R. Calderbank, E. Rains, P. Shor, and N. Sloane, “Quantum error correction via codes over GF(4),” IEEE Trans. Inform. Theory, vol. 44, ‘CZ’ [2,6] pp. 1369–1387, Jul 1998. ‘CZ’ [3,5] [7] D. Gottesman, Stabilizer codes and quantum error correction. PhD ‘CZ’ [4,5] thesis, California Institute of Technology, 1997. [8] J. Emerson, R. Alicki, and K. Zyczkowski,˙ “Scalable noise estimation ‘CZ’ [4,6] with random unitary operators,” J. Opt. B Quantum Semiclassical Opt., vol. 7, no. 10, pp. S347–S352, 2005. [9] E. Magesan, J. M. Gambetta, and J. Emerson, “Characterizing quantum gates via randomized benchmarking,” Phys. Rev. A, vol. 85, no. 4, p. 042311, 2012. 15

[10] J. Combes, C. Granade, C. Ferrie, and S. T. Flammia, “Logical Random- [36] D. Maslov and M. Roetteler, “Shorter Stabilizer Circuits via Bruhat ized Benchmarking,” arXiv preprint arXiv:1702.03688, 2017. [Online]. Decomposition and Quantum Circuit Transformations,” IEEE Trans. Available: http://arxiv.org/abs/1702.03688. Inform. Theory, vol. 64, no. 7, pp. 4729–4738, 2018. [11] Z. Webb, “The Clifford group forms a unitary 3-design,” Quantum Inf. [37] P. Diaconis and M. Shahshahani, “The subgroup algorithm for generating Comput., vol. 16, no. 15-16, pp. 1379—-1400, 2016. [Online]. Available: uniform random variables,” Prob. Eng. Inf. Sci., vol. 1, no. 1, pp. 15–32, https://arxiv.org/pdf/1510.02769.pdf. 1987. [12] D. Gross, K. Audenaert, and J. Eisert, “Evenly distributed unitaries: [38] R. Koenig and J. A. Smolin, “How to efficiently select an arbitrary On the structure of unitary designs,” J. Math. Phys., vol. 48, no. 5, Clifford group element,” J. Math. Phys., vol. 55, p. 122202, Dec 2014. p. 052104, 2007. [39] K. Choromanski, F. Fagan, C. Gouy-Pailler, A. Morvan, T. Sarlos, and [13] A. Roy and A. J. Scott, “Unitary designs and codes,” Designs, Codes J. Atif, “TripleSpin - a generic compact paradigm for fast machine learn- Cryptogr., vol. 53, no. 1, pp. 13–31, 2009. ing computations,” arXiv preprint arXiv:1605.09046, 2016. [Online]. [14] A. W. Harrow and R. A. Low, “Random quantum circuits are approxi- Available: http://arxiv.org/abs/1605.09046. mate 2-designs,” Commun. in Math. Phy., vol. 291, no. 1, pp. 257–302, [40] P. W. Jones, A. Osipov, and V. Rokhlin, “A randomized approximate 2009. nearest neighbors algorithm,” Appl. Comput. Harmon. Anal., vol. 34, [15] Y. Nakata, C. Hirche, C. Morgan, and A. Winter, “Unitary 2-designs no. 3, pp. 415–444, 2013. from random X- and Z-diagonal unitaries,” J. Math. Phys., vol. 58, no. 5, [41] N. Rengaswamy, R. Calderbank, S. Kadhe, and H. D. Pfister, “Synthesis p. 052203, 2017. of Logical Clifford Operators via Symplectic Geometry,” in Proc. IEEE [16] R. Cleve, D. Leung, L. Liu, and C. Wang, “Near-linear con- Int. Symp. Inform. Theory, pp. 791–795, Jun 2018. [Online]. Available: structions of exact unitary 2-designs,” Quantum Inf. Comput., http://arxiv.org/abs/1803.06987. vol. 16, no. 9-10, pp. 0721–0756, 2016. [Online]. Available: [42] J. T. Anderson, G. Duclos-Cianci, and D. Poulin, “Fault-Tolerant Con- https://arxiv.org/pdf/1501.04592.pdf. version between the Steane and Reed-Muller Quantum Codes,” Phys. [17] D. DiVincenzo, D. Leung, and B. Terhal, “Quantum Data Hiding,” IEEE Rev. Lett., vol. 113, no. 8, p. 080501, 2014. [Online]. Available: Trans. Inform. Theory, vol. 48, no. 3, pp. 580–598, 2002. http://arxiv.org/abs/1403.2734. [18] C. Dankert, R. Cleve, J. Emerson, and E. Livine, “Exact and approximate [43] A. W. Nordstrom and J. P. Robinson, “An optimum nonlinear code,” unitary 2-designs and their application to fidelity estimation,” Phys. Rev. Inform. and Control, vol. 11, no. 5-6, pp. 613–616, 1967. A, vol. 80, no. 1, p. 012304, 2009. [44] A. Kerdock, “A class of low-rate nonlinear binary codes,” Inform. and [19] A. J. Scott, “Optimizing quantum process tomography with unitary 2- Control, vol. 20, pp. 182–187, Mar 1972. designs,” arXiv preprint arXiv:0711.1017, 2007. [Online]. Available: [45] F. P. Preparata, “A class of optimum nonlinear double-error correcting http://arxiv.org/abs/0711.1017. codes,” Inform. and Control, vol. 13, no. 13, pp. 378–400, 1968. [20] M. Quadeer, M. Tomamichel, and C. Ferrie, “Minimax quantum state [46] J. Goethals, “Two dual families of nonlinear binary codes,” Electronic estimation under Bregman divergence,” Quantum, vol. 3, p. 126, 2019. Letters, vol. 10, no. 23, p. 471, 1974. [Online]. Available: http://arxiv.org/abs/1808.08984. [47] J.-M. Goethals, “Nonlinear codes defined by quadratic forms over GF(2),” Inform. and Control, vol. 31, pp. 43–74, May 1976. [21] P. Hayden, M. Horodecki, A. Winter, and J. Yard, “A decoupling approach to the quantum capacity,” arXiv [48] P. Delsarte and J. M. Goethals, “Alternating bilinear forms over GF(q),” preprint arXiv:quant-ph/0702005, 2007. [Online]. Available: J. Comb. Theory, Ser. A, vol. 19, no. 1, pp. 26–50, 1975. http://arxiv.org/abs/quant-ph/0702005. [49] W. C. Huffman and V. Pless, Fundamentals of Error-Correcting Codes. Cambridge University Press, 2003. [22] O. Szehr, F. Dupuis, M. Tomamichel, and R. Renner, “Decoupling with unitary approximate two-designs,” New J. Phys., vol. 15, no. 5, [50] A. Thompson and R. Calderbank, “Sparse near-equiangular tight frames IEEE Glob. p. 053022, 2013. with applications in full duplex wireless communication,” in Conf. Signal Inf. Process., pp. 868–872, Nov 2017. [23] F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting [51] J. Helsen, J. J. Wallman, S. T. Flammia, and S. Wehner, Codes. North-Holland, Amsterdam, 1977. “Multi-qubit Randomized Benchmarking Using Few Samples,” [24] A. R. Hammons, P. V. Kumar, A. R. Calderbank, N. J. A. Sloane, and Z arXiv preprint arXiv:1701.04299, 2017. [Online]. Available: P. Solé, “The 4-Linearity of Kerdock, Preparata, Goethals, and Related http://arxiv.org/abs/1701.04299. Codes,” IEEE Trans. Inform. Theory, vol. 40, no. 2, pp. 301–319, 1994. [52] D. Gottesman, “A Theory of Fault-Tolerant Quantum Computation,” [25] H. Weyl, The Classical Groups: Their Invariants and Representations, arXiv preprint arXiv:quant-ph/9702029, 1997. [Online]. Available: vol. 1. Princeton University Press, 1997. http://arxiv.org/pdf/quant-ph/9702029.pdf. [26] R. Calderbank and S. Jafarpour, “Reed Muller Sensing Matrices and [53] D. Gottesman, “An Introduction to Quantum Error Correction and Fault- the LASSO,” arXiv preprint arXiv:1004.4949, Apr 2010. [Online]. Tolerant Quantum Computation,” arXiv preprint arXiv:0904.2557, 2009. Available: http://arxiv.org/abs/1004.4949. [Online]. Available: http://arxiv.org/abs/0904.2557. [27] J. Dehaene and B. De Moor, “Clifford group, stabilizer states, and linear [54] M. M. Wilde, Quantum Information Theory. Cambridge University and quadratic operations over GF(2),” Phys. Rev. A, vol. 68, p. 042318, Press, 2013. Oct 2003. [55] M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum [28] S. Aaronson and D. Gottesman, “Improved simulation of stabilizer Information. Cambridge University Press, 2010. circuits,” Phys. Rev. A, vol. 70, no. 5, p. 052328, 2004. [56] M. A. De Gosson, Symplectic Geometry and Quantum Mechanics, [29] K. Koike and I. Terada, “Young-diagrammatic methods for the repre- vol. 166. Springer Science & Business Media, 2006. sentation theory of the classical groups of type Bn, Cn, Dn,” J. Algebr., [57] C. Chamberland, P. Iyer, and D. Poulin, “Fault-tolerant quantum vol. 107, pp. 466–511, May 1987. computing in the Pauli or Clifford frame with slow error di- [30] R. Kueng and D. Gross, “Qubit stabilizer states are complex projective agnostics,” Quantum, vol. 2, p. 43, 2018. [Online]. Available: 3-designs,” arXiv preprint arXiv:1510.02767, 2015. [Online]. Available: https://arxiv.org/pdf/1704.06662.pdf. https://arxiv.org/abs/1510.02767. [58] R. Calderbank, S. Howard, S. Jafarpour, and J. Kent, “Sparse approxima- [31] R. Kueng, H. Zhu, and D. Gross, “Low rank matrix recovery from tion and compressed sensing using the Reed-Muller sieve,” Tech. Rep. Clifford orbits,” arXiv preprint arXiv:1610.08070, 2016. [Online]. TR-888-10, Department of Computer Science, Princeton University, Available: https://arxiv.org/abs/1610.08070. 2010. [32] A. Thompson and R. Calderbank, “Compressed Neighbour Discov- [59] R. J. McEliece, Finite Fields for Computer Scientists and Engineers. ery using Sparse Kerdock Matrices,” in Proc. IEEE Int. Symp. Kluwer Academic Publishers, 1987. Inform. Theory, pp. 2286–2290, Jun 2018. [Online]. Available: [60] A. Calderbank, R. Hardin, E. Rains, P. Shor, and N. Sloane, “A Group- http://arxiv.org/abs/1801.04537. Theoretic Framework for the Construction of Packings in Grassmannian [33] A. Calderbank, P. Cameron, W. Kantor, and J. Seidel, “Z4-Kerdock Spaces,” J. Algebr. Comb., vol. 9, no. 2, pp. 129–140, 1999. Codes, Orthogonal Spreads, and Extremal Euclidean Line-Sets,” Proc. [61] P. J. Cameron and J. H. Van Lint, Designs, Graphs, Codes and their London Math. Soc., vol. 75, pp. 436–480, Sep 1997. Links, vol. 3. Cambridge University Press, 1991. [34] O. Tirkkonen, C. Boyd, and R. Vehkalahti, “Grassmannian codes from [62] J. Watrous, The Theory of Quantum Information. Cambridge University multiple families of mutually unbiased bases,” in Proc. IEEE Int. Symp. Press, 2018. Inform. Theory, pp. 789–793, Jun 2017. [63] Z. Puchała and J. A. Miszczak, “Symbolic integration with respect to [35] T. Can, “The Heisenberg-Weyl group, finite symplectic geometry, and the haar measure on the unitary groups,” Bulletin of the Polish Academy their applications,” Senior Thesis, Duke University, May 2018. of Sciences Technical Sciences, vol. 65, no. 1, pp. 21–27, 2017. 16

− 2 21 i i 2 i [64] R. Chao and B. W. Reichardt, “Fault-tolerant quantum computation with = Im AwW + Ay−+z R A−2i+1 R− W few qubits,” arXiv preprint arXiv:1705.05365, 2017. [Online]. Available: | x − − http://arxiv.org/pdf/1705.05365.pdf. h 2 21 i  21 i  i = Im A W + A− A− i+1 W | w y+z x2 h 2 2 i APPENDIX A = Im A + A −2−i −2 W | w (y+z) x PROOF OF LEMMA 25 h  2  i = Im A −2−i −2 W . We proceed as in the proof of Lemma 23 to derive the | w+(y+z) x h i i general form of an element in PK∗ ,m. Introducing the new , , a , d 2 Now we define x c, w c and y c . Then we get generators LR−i , and using identities from Lemma 4, we −i i 2 calculate 2 − −i i 2 T 2 2 a d 1 R− Ax− 0 0 W w + (y + z)− x− = + z + 2 i T 2 T 1 c c ! c 0 (R ) (Ax) W − 0   − 1  i 2  2i 2 i − − 0 R− Ax− W a 2 i d · 1 = i T 1 2 ; = + z + (R ) W − A 0 2  x  c c ! c 2 i 2   Im AyW 0 R− Ax− W i T 1 2 1 1 0 Im (R ) W − Ax 0 = a +    2−i d 2 i T 1 2 i 2 c " cz + c # A W (R ) W − A R− A− W c y x x − · = i T 1 2 ; 2 i (R ) W − A 0 1 acz + ad +1  x  2 i T 1 2 i 2 2 = 2−i AyW (R ) W − Ax R− Ax− W Im AwW c " cz + d # i T 1 2 (R ) W A 0 0 I −i  − x  m  az2 + ad+1 2 i T 1 2 2 i T 1 2 2 i 2 c Ay(W (R ) W − )Ax Ay(W (R ) W − )AxAwW + R− Ax− W = 2−i = i T 1 2 i T 1 2 2 cz + d (R ) W A (R ) W A A W −i   − x − x w  az2 + b ad +1 2 i 2 2 i 2 i 2 AyR− Ax AyR− AwxW + R− Ax− W = 2−i ; b = . = 1 i 2 i T 2 T cz + d c W − R− A (R ) (A )  x wx  Hence we have proved that F performs the permutation , F. − 2 2 2 i ′ , [Im A W ] Im A az +b W , z′ z . In this case the relations between a,b,c,d and x,y,z,w z ′ | 7−→ | cz +d that will yield the desired map are unclear. Hence, we first   2 We note that the above definitions for x,w,y also satisfy determine the transformation on [Im AzW ] in terms of x,y,z and w. Again, we repeatedly invoke| identities from Lemma 4. the special case of i = 0 that corresponds to the proof in Lemma 23. We now substitute these back in F and observe 2 [Im A W ]F the following simplifications. | z 2 i 2 2 i 2 2 i 2 i 2 −i+1 = [AyR− Ax + AzR− Ax (AyR− Awx + R− Ax− )W 2 i 2 i 2 2 i 2 i 2 | (AyR− )Ax = R− Ay Ax = R− A 2−i = R− Ad, 2 i T 2 T y x + AzW (R ) (Awx) ] 2 i 2 i 2 i 2 2 i 2 i 2 (A R− )A + R− A− = R− A A + R− A −1 = R− A , 2 i 2 2 i 2 i 2 y wx x d/c a c b = [Ay+zR− Ax (Ay+zR− Awx + R− Ax− )W ], 1 i 2 1 i 2 i T 1 2 | W − R− Ax = W − R− Ac = (R ) W − Ac, where we have simplified the last term as i T 2 T i T 2 T (R ) (Awx) = (R ) (Aa) . 2 i T 2 T 2 i 2 T 2 i 2 AzW (R ) (Awx) = AzR− W (Awx) = AzR− AwxW. These imply that the general form of an element in PK∗ ,m is Now we have the following simplifications for the three terms. 2 i 2 2 i 2 i 2 AyR− Ax (AyR− Awx + R− Ax− )W i+1 F = 1 i 2 i T 2 T 2 i 2 2 2 i W − R− A (R ) (A ) Ay+zR− Ax = Ay+zAx R− ,  x wx  i+1 i 2 i 2 2 i 2 2 2 i R− Ad R− Ab W Ay+zR− Awx = Ay+zAwx R− , = 1 i 2 i T 2 T . W − R− A (R ) (A ) i 2 2i+1 i  c a  R− Ax− = A−x R− . Applying this back we get [I A2W ]F m | z 2 2i+1 i 2 2i+1 2i+1 i = A A R− A A + A− R− W y+z x | y+z wx x h i 2i+1 2 2 2i+1 2i+1 i I R A− A− A A + A− R− W ≡ m | x y+z y+z wx x h i 2i+1 2 2 2i+1 i  i = I R A + A− A− · R− W m | w y+z x h 2  i 2 2 2i+1  i i = I A W + R A− A− · R− W m | w y+z x − h 2 21 i i 2 2i+1 i i = I A W + A− R A− · R− W m | w y+z x h i