arXiv:2003.09412v2 [quant-ph] 7 Jul 2021 aaadfe iciseps h tutr fteClifford the of structure the expose circuits Hadamard-free tts[3,rnoie unu oecntuto 1] an [14], 12 construction [11, code quant states quantum in multi-qubit randomized noise of [13], of tomography states characterization efficient the are 10], 9, in latter algorit [8, role The are central interest [5]. a particular operators play Of cos Clifford the distributed gates. despite uniformly Clifford [4], the implementation of an that of computations cost fault-tolerant u the of co they dominates scope fault-tolerant the the computing: within in quantum necessary subroutines in distillation role as admittin important serve and an computation play classical) circuits (or quantum of purpose and repr n n loigacrutdph9 can depth the circuit of a variants allowing The one and group. part symmetric free rand the between highlighted on is distribution connection surprising A bound. mlyti aoia omt eeaearno nfrl di uniformly random a algo generate O polynomial-time to form a canonical report this We employ c one-to-one a circuits. provides quantum form layered canonical Our group. Clifford the and qubits, of permutation a lffr iciscnb enda unu opttosb the by computations quantum as defined be can circuits Clifford Introduction 1 place. takes advantage an such implemen where be example Finally can explicit circuit an linear discussed. reversible classical also a are where architecture Neighbor Nearest prtrcnb nqeywitni h aoia form canonical the in pr written structural uniquely the be study can we operator Here protocols. correction error ( n h lffr ru ly eta oei unu admzdb randomized quantum in role central a plays group Clifford The 2 cnot .Tenme frno iscnue yteagrtmmatche algorithm the by consumed bits random of number The ). B .J asnRsac etr okonHihs Y10598 NY Heights, Yorktown Center, Research Watson J. T. IBM ae,apidt opttoa ai tt,sc as such state, basis computational a to applied gates, F i r aaeeie aaadfe iciscoe rmsuit from chosen circuits Hadamard-free parameterized are egyBay n mtiMaslov Dmitri and Bravyi Sergey n uy8 2021 8, July mlmnaino rirr lffr ntre nteLinear the in unitaries Clifford arbitrary of implementation Abstract 1 F ptto 3.Otmzto fCiodcrut is circuits Clifford of Optimization [3]. mputation 1 HSF e oeecetyuigCiodgts n show and gates, Clifford using efficiently more ted priso hsgop eso htayClifford any that show We group. this of operties ic tcnhpe htteCiodoverhead Clifford the that happen can it since , esuycmuainlqatmadvantage quantum computational study we , muiomCiodoeaosadteMallows the and operators Clifford uniform om ,cmrse lsia ecito fquantum of description classical compressed ], unu aahdn 1] ial,Clifford Finally, [15]. hiding data quantum d mcmuesvarnoie benchmarking randomized via computers um m o eeainadcmiigo random of compiling and generation for hms ih o optn h aoia om We form. canonical the computing for rithm necetcasclsmlto 1,Clifford [1], simulation classical efficient an g stributed ftennCiodgtsbighge than higher being gates non-Clifford the of t nw ofr ntr -ein[,7 and 7] [6, 3-design unitary a form to known repnec ewe lffr prtr and operators Clifford between orrespondence 2 where , nclfr,oewt hr Hadamard- short a with one form, onical dri unu ro orcin[]and [2] correction error quantum nderlie iciswt hs ( Phase with circuits nhakn,qatmtmgah,and tomography, quantum enchmarking, | 00 n H ... qbtCiodoeao nruntime in operator Clifford -qubit h nomto-hoei lower information-theoretic the s 0 salyro aaadgates, Hadamard of layer a is i hl o nvra o the for universal not While . p ,Hdmr ( Hadamard ), besbrusof subgroups able USA , group S h is ), circuits give rise to interesting toy models of topological quantum order and entanglement renormalization in quantum many-body systems [16, 17]. Obtaining an efficient circuit implementation of a Clifford group element is a problem that was studied well in the literature. Aaronson and Gottesman [1] showed that any Clifford operator admits an 11-stage decomposition of the form -H-CX-P-CX-P-CX-H-P-CX-P-, where -H-, -P-, and -CX- represent circuit stages with h, p, and cnot gates, correspondingly. This decomposition is asymptotically optimal (optimal up to a constant factor) in terms of the number of degrees of freedom as well as the number of gates [18]. Roetteler and one of the authors [19] leveraged Hadamard-free circuits (those including only p, cz, cnot and Pauli gates) to expose more structure of the Clifford group. By employing Bruhat decomposition of the underlying symplectic group, they showed that any Clifford operator admits a 7-stage decomposition -CX-CZ-P-H-P-CZ-CX-, where -CZ- corresponds to a layer of cz gates. The number of degrees of freedom in [19] is asymptotically tight (saturates the information-theoretic lower bound within a constant factor that asymptotically approaches 1). The main result of this paper is a canonical form of Clifford circuits featuring the exactly minimal number of degrees of freedom. It is obtained by fine-tuning the Bruhat decomposition used earlier in [19] and leveraging the additional structure of Hadamard-free circuits. More precisely, we show that any Clifford operator can be uniquely written in the form F1HSF2, where H is a layer of Hadamard gates, S is a swapping of n qubits, and Fi are Hadamard-free circuits chosen from suitable subgroups of the Clifford group, that depend on H and S. Here, F1 corresponds to the -CX-CZ-P- part and SF2 corresponds to the -P-CZ-CX- part in [19]; we optimize this layered decomposition by moving as many gates from SF2 into F1 as possible. We provide a simple explicit characterization of F1 and F2 and give a polynomial-time algorithm for computing all layers in the above decomposition. We describe two applications of the new canonical form. First, we consider the problem of generating a random uniformly distributed n-qubit Clifford operator. The state-of-the-art algorithm proposed by Koenig and Smolin [5] employs a sequence of O(n) symplectic transvections to generate a random uniform Clifford operator. This algorithm has runtime O(n3). In contrast, we describe an algorithm with the runtime O(n2) that outputs a random uniformly distributed Clifford operator specified by its canonical form. If needed, the canonical form can be converted to the stabilizer tableaux in time O(nω), where ω ≈ 2.3727 is the matrix multiplication exponent [20]. Both Koenig-Smolin [5] and our algorithms are optimal in the sense that they consume the number of random bits that matches the information-theoretic lower bound. We provide a Python implementation of the new algorithm (see Appendix C and Appendix D). Our algorithm highlights a surprising connection between random uniform Clifford operators and the Mallows distribution on the symmetric group [21] that plays an important role in several ranking algorithms [22]. We show the Mallows distribution is also relevant in the context of sampling the uniform distribution on the group of invertible binary matrices. A nearly linear-time algorithm for sampling the Mallows distribution (and its quantum generalization) is described. Second, we propose two new circuit decompositions. One decomposition is useful in quantum protocols where a Clifford circuit is followed by the measurement of n qubits in the computational basis. Examples of such protocols include the shadow tomography of multi-qubit states [11, 12] or the last stage of randomized benchmarking [10]. The key observation is that the Hadamard-free operators that appear at the left/right stages of the canonical form map basis vectors to basis vectors. Applying a Hadamard-free operator im- mediately before the measurement of all qubits is equivalent to a simple classical postprocessing of the measurement outcomes. Thus one of the two Hadamard-free stages in the canonical form can be skipped. More generally, a Clifford circuit C followed by the measurement of all qubits can be replaced by another 1 Clifford circuit D as long as DC− is Hadamard-free. We show that for any circuit C there exists a circuit
2 k(k+1) D as above that contains at most nk − 2 two-qubit gates, where k is the number of Hadamards in the canonical form of C. We also show how to rewrite the canonical form in a way that reduces the number of two-qubit gate layers of the form -CZ- and -CX-. This reduced decomposition implies the ability to execute arbitrary Clifford circuits in the Linear Nearest Neighbor architecture in the two-qubit gate depth of 9n. Due to the prominent role played by Hadamard-free Clifford operations as parts of Clifford circuits, we studied their circuit structure further. Surprisingly, we discovered that in certain cases Hadamard gates can reduce the cost of implementing Hadamard-free operators. For example, we demonstrate that so long as one is concerned with the entangling gate count (considering only cnot and cz gates), certain linear reversible functions may be implemented more efficiently as Clifford circuits, as opposed to circuits relying only on the cnot gates. This result can be viewed as a toy example of computational quantum advantage. We also develop upper and lower bounds on the resource counts enabled by the introduction of Hadamard gates and prove two lemmas giving rise to two algorithms for optimizing the number of two-qubit gates in the cnot circuits. We assume reader’s familiarity with the concepts relating to Clifford group in the context of quantum circuits (quantum gates, Clifford tableaux, symplectic group). Basic background information can be found in [1, 2], and more advanced relevant background in [19]. The rest of the paper is organized as follows. Section 2 formally defines the canonical form of Clifford circuits, proves its existence and uniqueness, and gives an efficient algorithm for computing it. The problem of generating random uniform Clifford operators is addressed in Section 3. Applications of the canonical form for optimization of Clifford circuits are discussed in Section 4. Finally, Section 5 investigates conditions under which classical reversible linear circuits can be implemented more efficiently with Clifford gates. Appendix A addresses the problem of sampling the uniform distribution on the group GL(n) and highlights the role of the Mallows distribution. Appendix B describes a version of Bruhat decomposition of the Clifford group related to the one reported in Section 2 without explicitly developing the structure of Hadamard-free layers. Python implementation of our algorithms can be found in Appendix C and Appendix D.
2 Canonical form of Clifford circuits
In this section we describe an exact parameterization of the n-qubit Clifford group by quantum circuits x z p h cnot cz swap x 0 1 z 1 0 expressed using the gate set { , , , , , , }. Here = 1 0 and = 0 1 are single-qubit p 1 0 h 1 1 1 − Pauli operators, = 0 i is the single-qubit Phase gate, = √ 1 1 is the single-qubit Hadamard gate, 2 − and cnot and cz are two-qubit controlled-x and controlled-z gates correspondingly. We denote the identity 1 0 cnot transformation 0 1 as Id. Qubits are labeled by the integers 1, 2,...,n. We write ↓ to indicate that the the control qubit c and the target qubit t obey the relation c