Arxiv:2003.09412V2 [Quant-Ph] 7 Jul 2021 Hadamard-Free Circuits Expose the Structure of the Clifford Group
Total Page:16
File Type:pdf, Size:1020Kb
Hadamard-free circuits expose the structure of the Clifford group Sergey Bravyi and Dmitri Maslov IBM T. J. Watson Research Center, Yorktown Heights, NY 10598, USA July 8, 2021 Abstract The Clifford group plays a central role in quantum randomized benchmarking, quantum tomography, and error correction protocols. Here we study the structural properties of this group. We show that any Clifford operator can be uniquely written in the canonical form F1HSF2, where H is a layer of Hadamard gates, S is a permutation of qubits, and Fi are parameterized Hadamard-free circuits chosen from suitable subgroups of the Clifford group. Our canonical form provides a one-to-one correspondence between Clifford operators and layered quantum circuits. We report a polynomial-time algorithm for computing the canonical form. We employ this canonical form to generate a random uniformly distributed n-qubit Clifford operator in runtime O(n2). The number of random bits consumed by the algorithm matches the information-theoretic lower bound. A surprising connection is highlighted between random uniform Clifford operators and the Mallows distribution on the symmetric group. The variants of the canonical form, one with a short Hadamard- free part and one allowing a circuit depth 9n implementation of arbitrary Clifford unitaries in the Linear Nearest Neighbor architecture are also discussed. Finally, we study computational quantum advantage where a classical reversible linear circuit can be implemented more efficiently using Clifford gates, and show an explicit example where such an advantage takes place. 1 Introduction Clifford circuits can be defined as quantum computations by the circuits with Phase (p), Hadamard (h), and cnot gates, applied to a computational basis state, such as |00...0i. While not universal for the arXiv:2003.09412v2 [quant-ph] 7 Jul 2021 purpose of quantum (or classical) computation and admitting an efficient classical simulation [1], Clifford circuits play an important role in quantum computing: they underlie quantum error correction [2] and serve as distillation subroutines in the fault-tolerant computation [3]. Optimization of Clifford circuits is necessary within the scope of fault-tolerant computations, since it can happen that the Clifford overhead dominates the cost of an implementation [4], despite the cost of the non-Clifford gates being higher than that of the Clifford gates. Of particular interest are algorithms for generation and compiling of random uniformly distributed Clifford operators [5]. The latter are known to form a unitary 3-design [6, 7] and play a central role in the characterization of noise in quantum computers via randomized benchmarking [8, 9, 10], efficient tomography of multi-qubit states [11, 12], compressed classical description of quantum states [13], randomized quantum code construction [14], and quantum data hiding [15]. Finally, Clifford 1 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 { , , , , , , }.