arxiv: v1 [quant-ph] 12 Aug 2013

Similar documents
Technology Mapping of Reversible Circuits to Clifford+T Quantum Circuits

Translating between the roots of the identity in quantum computers

Projects about Quantum adder circuits Final examination June 2018 Quirk Simulator

Logic Synthesis for Quantum State Generation

2.0 Basic Elements of a Quantum Information Processor. 2.1 Classical information processing The carrier of information

A Systematic Algorithm for Quantum Boolean Circuits Construction

arxiv:quant-ph/ v5 6 Apr 2005

Introduction to Quantum Computing

C/CS/Phys 191 Quantum Gates and Universality 9/22/05 Fall 2005 Lecture 8. a b b d. w. Therefore, U preserves norms and angles (up to sign).

The Solovay-Kitaev theorem

Extended Superposed Quantum State Initialization Using Disjoint Prime Implicants

QLang: Qubit Language

Unitary Dynamics and Quantum Circuits

arxiv: v3 [quant-ph] 25 Jan 2013

Two-Qubit Quantum Gates to Reduce the Quantum Cost of Reversible Circuit

Quantum Computing Lecture 2. Review of Linear Algebra

Optimal Realizations of Controlled Unitary Gates

FPGA-Based Circuit Model Emulation of Quantum Algorithms

1 Readings. 2 Unitary Operators. C/CS/Phys C191 Unitaries and Quantum Gates 9/22/09 Fall 2009 Lecture 8

Introduction to Quantum Information Processing QIC 710 / CS 768 / PH 767 / CO 681 / AM 871

Teleportation-based approaches to universal quantum computation with single-qubit measurements

Quantum Error Correction and Fault Tolerance. Classical Repetition Code. Quantum Errors. Barriers to Quantum Error Correction

arxiv:quant-ph/ v1 16 Jul 2003

How Often Must We Apply Syndrome Measurements?

Quantum gate. Contents. Commonly used gates

Optimized Reversible Programmable Logic Array (PLA)

arxiv:quant-ph/ v1 14 Apr 2005

Logical operators of quantum codes

CHAPTER 2 AN ALGORITHM FOR OPTIMIZATION OF QUANTUM COST. 2.1 Introduction

arxiv: v3 [quant-ph] 2 Apr 2013

Teleportation of Quantum States (1993; Bennett, Brassard, Crepeau, Jozsa, Peres, Wootters)

arxiv:quant-ph/ v1 27 Sep 2005

On The Complexity of Quantum Circuit Manipulation

Lecture 3: Hilbert spaces, tensor products

Quantum Multiple-Valued Decision Diagrams Containing Skipped Variables

Reversible Logic Synthesis with Output Permutation

ROM-BASED COMPUTATION: QUANTUM VERSUS CLASSICAL

Self-Inverse Functions and Palindromic Circuits

Quantum computing! quantum gates! Fisica dell Energia!

Majority-Based Reversible Logic Gate

Synthesizing Reversible Circuits for Irreversible Functions

Introduction to Group Theory

arxiv:quant-ph/ v2 20 Dec 2010

Integrated Synthesis of Linear Nearest Neighbor Ancilla-Free MCT Circuits

Linear Algebra and Dirac Notation, Pt. 1

Group Theory Based Synthesis of Binary Reversible Circuits

Logical error rate in the Pauli twirling approximation

arxiv:quant-ph/ Oct 2002

. Here we are using the standard inner-product over C k to define orthogonality. Recall that the inner-product of two vectors φ = i α i.

Quantum Algorithms. Andreas Klappenecker Texas A&M University. Lecture notes of a course given in Spring Preliminary draft.

Quantum Computation. Alessandra Di Pierro Computational models (Circuits, QTM) Algorithms (QFT, Quantum search)

Hilbert Space, Entanglement, Quantum Gates, Bell States, Superdense Coding.

Relations for 2-qubit Clifford+T operator group

Problem Set # 6 Solutions

Lecture 10: A (Brief) Introduction to Group Theory (See Chapter 3.13 in Boas, 3rd Edition)

Database Manipulation Operations on Quantum Systems

An Algorithm for Minimization of Quantum Cost

A new universal and fault-tolerant quantum basis

arxiv:quant-ph/ v3 11 Mar 2004

Lectures on Fault-Tolerant Quantum Computation

T-count Optimized Design of Quantum Integer Multiplication

Parallel Quantum Computation and Quantum Codes

Transformation of quantum states using uniformly controlled rotations

Information quantique, calcul quantique :

Investigating the Complexity of Various Quantum Incrementer Circuits. Presented by: Carlos Manuel Torres Jr. Mentor: Dr.

A = 3 B = A 1 1 matrix is the same as a number or scalar, 3 = [3].

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Chemistry 5.76 Revised February, 1982 NOTES ON MATRIX METHODS

DECAY OF SINGLET CONVERSION PROBABILITY IN ONE DIMENSIONAL QUANTUM NETWORKS

On PPT States in C K C M C N Composite Quantum Systems

Introduction to Quantum Computing

Short Course in Quantum Information Lecture 2

Quantified Synthesis of Reversible Logic

Constructive quantum scaling of unitary matrices

Lecture 2: Linear operators

Ph 219b/CS 219b. Exercises Due: Wednesday 20 November 2013

Quantum Entanglement and Error Correction

Quantum Computing Lecture 3. Principles of Quantum Mechanics. Anuj Dawar

arxiv:quant-ph/ v3 21 Feb 2003

Chapter 2 The Density Matrix

arxiv: v2 [quant-ph] 1 Jun 2017

Quantum Computing. 6. Quantum Computer Architecture 7. Quantum Computers and Complexity

International Journal of Scientific & Engineering Research, Volume 6, Issue 7, July ISSN

Grover s algorithm. We want to find aa. Search in an unordered database. QC oracle (as usual) Usual trick

Lecture 2: From Classical to Quantum Model of Computation

Repeat-Until-Success: Non-deterministic decomposition of single-qubit unitaries

The Bloch Sphere. Ian Glendinning. February 16, QIA Meeting, TechGate 1 Ian Glendinning / February 16, 2005

ON THE ROLE OF THE BASIS OF MEASUREMENT IN QUANTUM GATE TELEPORTATION. F. V. Mendes, R. V. Ramos

arxiv:quant-ph/ v1 19 Mar 2006

Grover Algorithm Applied to Four Qubits System

Algebra I Fall 2007

Lecture notes: Quantum gates in matrix and ladder operator forms

Chapter 10. Quantum algorithms

Deutsch Algorithm on Classical Circuits

Quantum Information & Quantum Computing

Design of an Online Testable Ternary Circuit from the Truth Table

Synthesis of Fredkin-Toffoli Reversible Networks

Quantum Information & Quantum Computing

A VERY BRIEF LINEAR ALGEBRA REVIEW for MAP 5485 Introduction to Mathematical Biophysics Fall 2010

arxiv:quant-ph/ v1 18 Apr 2000

A scheme for protecting one-qubit information against erasure. error. Abstract

Transcription:

On quantum circuits employing roots of the Pauli matrices Mathias Soeen, 1 D. Michael Miller, and Rolf Drechsler 1 1 Institute of Computer Science, niversity of Bremen, Germany Department of Computer Science, niversity of Victoria, BC, Canada he Pauli matrices are a set of three complex Hermitian, unitary matrices. In this article, we investigate the relationships between certain roots of the Pauli matrices and how gates implementing those roots are used in quantum circuits. echniques for simplifying such circuits are given. In particular, we show how those techniques can be used to find a circuit of Clifford+ gates starting from a circuit composed of gates from the well studied NCV library. arxiv:1308.493v1 [quant-ph] 1 Aug 013 I. INRODCION he well-studied NCV quantum gate library [1] contains the gates: NO (X, controlled NO (CNO, and both the single controlled square root of NO as well as its adjoint, denoted V and V, respectively. In their seminal paper [], Barenco et al. presented a general result that as one instance shows how a classical reversible offoli gate can be realized by five NCV gates as follows: V V V (1 his result has been used in several wors on synthesis and optimization of quantum circuits [3 5]. Another quantum gate library called Clifford+ [1], which consists of the controlled NO, the phase gate S and the Hadamard gate H, plus the gate ( 1 0, ( 0 e iπ 4 and the adjoint gates S and has also received considerable attention. he Clifford+ library has the advantage over the NCV library with respect to fault-tolerant computing [6]. Recently different synthesis results based on the Clifford+ gate library have been presented [7 9]. One common aim in these wors is to reduce the so-called -depth, i.e. the number of -stages where each stage consists of one or more or gates that can operate simultaneously on separate qubits. In [8] the authors describe a search-based algorithm that finds optimal circuit realizations with respect to their -depth. One of their circuits that realizes a offoli gate is [8, Fig. 13]: H H (3 his circuit has a -depth of 3 and a total depth of 10. (Note that the gates surrounded by the dashed rectangle together have a depth of 1 and are drawn in sequence only for clarity. he approach in [8] produces optimal circuits but since the technique s complexity is exponential, it is only applicable to small circuits. he NO operation is described by the Pauli X matrix [10]. Note that the controlled NO could be drawn as a controlled X but we use the normal convention of a as shown in the figures above. he matrices for the V and V operations as used in (1 are square roots of the Pauli X matrix. Similarly, the gate operation is given by a matrix ( that is the fourth root of the Pauli matrix. he use of gates associated with different Pauli matrices and their roots within the same circuit, as illustrated in (3, motivated us to explore the relations between the Pauli matrices and their roots, and to investigate how the associated gates can be used in constructing quantum circuits. his article presents our findings and demonstrates their applicability in deriving the optimal circuits from [8] from nown NCV circuits rather than using exhaustive search techniques. II. PRELIMINARIES he three Pauli matrices [10] are given by σ 1 ( ( ( 0 1 0 i 1 0, σ 1 0, σ i 0 3 0 1 (4 he alternate naming X σ 1, Y σ, and σ 3 is often used and we use it whenever we refer to a specific Pauli matrix. Matrices describing rotations around the three axes of the Bloch sphere are given by R a (θ cos θ I i sin θ σ a (5 where a {1,, 3} with θ being the rotation angle and I the identity matrix [1]. Each Pauli matrix specifies a half turn (180 rotation around a particular axis up to a global phase, i.e. σ a e iπ Ra (π. (6 he conjugate transpose of R a (θ is found by negating the angle θ or by multiplying it by another Pauli matrix from both sides, i.e. R a(θ R a ( θ R a (θ (7

where a b. Note that it does not matter which of the two possible is used. Since is Hermitian, we also have R a (θ R a(θ. Rotation matrices are additive with respect to their angle, i.e. R a (θ 1 R a (θ R a (θ 1 + θ, so one can derive the th root of the Pauli matrices as well as their conjugate transpose from (6 as ( e iπ π Ra and σ a e iπ R a. (8 For brevity, we term these matrices the Pauli roots. sing (8 the rotation matrices can also be expressed in terms of the roots of the Pauli matrices, i.e. R a e iπ σ a and R a Consequently, we can derive e iπ σ a. (9 (8 ( e iπ R π (7 a e iπ R a(θσ b (9 e iπ σ (10 b σ a and analogously σ a e iπ σ a for a b. his last equation will be a ey element in showing how control lines can be removed from controlled gates by using roots of higher degree. A number in bracets above an equal sign indicates the identity applied. ranslation from one Pauli matrix to another is given by where σ a ρ ab ρ ab (11 ρ ab ρ ba 1 (σ a + e iπ Ra Rb Ra (1 with a b are translation matrices. Further, we define ρ aa I. Eq. (11 can be extended to the Pauli roots giving ρ ab ρ ab. (13 he well-nown Hadamard operator is given by the normalized matrix H 1 ( 1 1 (14 1 1 which can also be expressed as or in terms of rotation matrices as H 1 (X + (15 H e iπ R1 R3 R1. (16 In fact, H ρ 1 ρ 1 so the Hadamard operator can be used to translate between X and, i.e. HXH and X HH (17 Given a unitary n n matrix, called the target operation, we define four controlled operations which are described by,,, and C 1 ( 0 0 I n + 1 1, C ( I n 0 0 + 1 1, C1 ( 0 0 + 1 1 I n, and C ( 0 0 + I n 1 1, (18 (19 respectively, where denotes the Kronecer product, I n denotes the n n identity matrix, and and is Dirac s bra-et notation [11]. he latter two operations are referred to as negative controlled operations. As examples, the CNO gate is C 1 (X and the offoli gate is C 1 (C 1 (X. Notice that adjacent controlled operations with the same control preserve matrix multiplication, i.e. 1 1 and (0 1 1 and gates with opposite control polarities commute, i.e. 1 1 (1 Finally, if the same target operation is controlled with both polarities, the target operation does not need be controlled, i.e. ( he identities in (0 ( hold for C and C analogously. Eq. (1 describes a circuit which performs one of two different target operations depending on the value assigned to the control line. Let us consider the special case C 1 ( 1C 1 ( 0 0 1 + 1 1 (3 which performs 1 or if the control line is negative or positive, respectively. We call this matrix a case gate and employ a special gate representation shown on the left-hand side of: 1 1 (4 Another interesting circuit equality applies to the Pauli gate and its roots. A positively controlled gate can be flipped without changing its functionality, i.e. C 1 ( C (. (5

3 sing the translation gates, a circuit identity for the other Pauli roots can be derived: (5 (13 where ρ 3 3 I. Since I C 1 (e iπ I and (13 (6 C 1 (C 1 (e iπ I C1 (e iπ C1 (e iπ IC1 ( a root of the Pauli gate can be moved across a positive control, i.e. (7 Corollary 1. Analogously to Lemma 1 we can derive σ a (30 Lemma 1 can be used to prove the following theorem that shows how to remove a control line from a controlled Pauli root operation. heorem 1. If a b, then the following circuit equality holds: Proof. We have σ a σ a σ a σ a (31 (9 σ a σ a σ a Lastly, in the remainder of the paper we will often mae use of a circuit identity given in [1, Rule D7]: ( σ a σ a σ a σ a (8 (0,1 σ a σ a σ a σ a III. MAPPING SCHEMES FOR SYNHESIS Many of the mappings for translating a given quantum circuit into a circuit in terms of a restricted gate library in fact reduce the number of controls in a controlled gate, as shown for example in (1. We follow this approach and will provide generic rules in terms of general Pauli roots. First, we show how a single controlled Pauli root σ a gate can be mapped to a circuit involving uncontrolled Pauli root gates by doubling the index, i.e. σ a. We start by proving the following lemma. Lemma 1. he following circuit equality holds for a b: σ a (9 Proof. Based on the special structure of ( 1 0 0 e iπ one obtains σ a (8 σ a e iπ σ a, I σ a which concludes the proof. It follows from the proof that the first gate on the right-hand side of (31 commutes with the other three gates treated as a single group. sing heorem 1 we can for example derive the identity shown in [8, Fig. 5(b] where S : S (5 S (31 (7 Note that a root of the Pauli gate can be moved across the control of a CNO but not over the target. In [, Lemma 6.1] the circuit identity of which (1 is a particular case is defined for an arbitrary unitary matrix on the left-hand side and its square root on the right-hand side. Given that Lemma and the translation gate equality in (13 we can define a new generic mapping that involves the Pauli roots. heorem. he following circuit equality holds: (0,1 e iπ σ a (10 σ a ρ ab ρ ab (3 which proves (9. where ρ ab I if a b.

4 Proof. Considering the circuit one gets from [, Lemma 6.1], the Pauli roots are adjusted by inserting translation gates around each of them. Since the translation gates are Hermitian they are involutory and therefore two translation gates in sequence cancel. One obtains (1 by setting a b 1 in (3. Note that the circuit identities in both (31 and (3 can be extended by adding a control to the left-hand side and controls to particular gates on the right-hand side. Repeating this process enables the mapping of multiple controlled gates. As the above illustrates, one needs to double the degree of the root in order to remove one control line when not using ancilla lines. As a result, one needs operations n in order to represent an n- controlled offoli gate if the only allowed controlled gate is a CNO. By combining (3 with (31 a powerful mapping scheme can be obtained for offoli gates that is very flexible due to the number of degrees of freedom: 1. In (31 we can move the first gate to the end of the circuit.. In (31 the Pauli root can be moved over the controls on the upper line. 3. In (31 the C 1 ( operations can be replaced by C ( operations, if b 3. 4. In (3 the first two lines can be swapped. 5. In (3 the functionality is preserved if all controlled Pauli roots are replaced by their adjoint.. 6. he last controlled Pauli root in (3 can be freely moved within the ρ ab gates. By exploiting these options, it is possible to derive a gate realization for a offoli gate of the same quality as the one shown in (3 starting from the mapping in (1 instead of using expensive search techniques. We will demonstrate this by deriving a realization for a more general gate x 1 x x 3 f x 1 x x 3 f(x 1, x (33 in which the target line x 3 is inverted with respect to a control function f of a particular type. he offoli gate in (3 is the special case where f x 1 x. Given a unitary matrix, in this construction, we will use the notation p for p {0, 1} where 0 and 1. o begin, applying a modified version of the mapping in (1 yields V a V b V c (3,5 S c H S a S b H Next, the controlled S gates are replaced according to (31 into circuits with uncontrolled gates. We implicitly mae use of the commutation property (first item in the list of degrees of freedom to enable the combination of gates. a b H ā a b b c H combine A gate can move over a control line without changing the function, but not over a target. In order to move CNO gates over other controlled gates we are maing use of (8. he combined a b gate commutes with the bloc of three gates to the right to it. H c a ā b c c c b a b c H his last step reduces the total depth by one. H c a ā c b b a b c H By setting a c 0 and b 1 one obtains a circuit that realizes the offoli gate and has the same characteristics as the circuit in (3, i.e. a -depth of 3 with a total depth of 10. he more complicated derivation of precisely the same circuit as in (3 is given in the appendix. Depending on how a, b, and c are assigned values of 0 and 1, we can realize four different circuits as illustrated in the following table where the first row yields a circuit for the offoli gate. Note that each row represents two possible assignments, e.g. setting a c 1 and b 0 also realizes a offoli gate. he two possibilities correspond to performing the required rotations in opposite direction around the Bloch sphere. Assignment Control function c a and b a f(x 1, x x 1x b a and c a f(x 1, x x 1 x b c and a c f(x 1, x x 1x a b c f(x 1, x x 1 x he last entry in the table above can be used to realize x 3 x 1 x by adding a NO gate to the right of the righthand H. Another example is given in Fig. 1 in which the full adder circuit in [8, Fig. 11] is derived starting from two Peres gates, each shown as a offoli gate followed by a CNO. After the NCV expansion has been applied two controlled V gates cancel and we can reorder the gates before mapping them to controlled S gates. After the controlled S gates have been mapped according to (31, the next steps aim to align the gates into as few stages as possible by moving the blocing CNO gates using (8. In that way a -depth of is readily achieved. However, in order to get the same total depth as [8, Fig. 11], one needs to perform the not so obvious

5 S (1 (13,5 S (31 V V V V V V V V V V H S S H H S H H S H H S H H S H FIG. 1. Derivation of the full adder step of adding two CNO gates into the circuit (as depicted in the dashed rectangle followed by more CNO moves and reductions. It is very interesting that by applying (13 and (6 followed by the canceling of neighboring Hadamard gates, one can easily transform the resulting gate circuit into a W gate circuit H W W H H W W H H W W H W W V where W 4 X. his translation is applicable in general and not specific to this example. Moreover, other Pauli roots can be used together with their respective translation matrices. As a result, the size of the circuit does not depend on the underlying Pauli root quantum gate library. However, some optimization techniques may only be possible for certain Pauli matrices. IV. CLIFFORD GROPS he Clifford group is usually defined over C 1 (X, S, and H in the literature. In this section, we investigate how the Pauli roots relate to Clifford groups and can be utilized in order to express Clifford groups in a general manner. We first derive some useful equalities involving Pauli matrices and their roots. he Pauli matrices form an orthogonal basis for the real Hilbert space and therefore one Pauli matrix cannot be expressed as a linear combination of the others. However, the Pauli matrices obey the commutation relation [σ a, ] i 3 c1 ε abcσ c where ε abc (a b(b c(c a is the Levi-Civita symbol and the anticommutation relation {σ a, } δ ab I where δ ab a I 3 b is the Kronecer delta. Exploiting these relations, the following equation is obtained [σ a, ] + {σ a, } (σ a σ a + (σ a + σ a 3 i ε abc σ c + δ ab I (34 leading to σ a i c1 3 ε abc σ c + δ ab I. (35 c1 Hence, an equation can be derived that expresses a Pauli root in terms of a Pauli root σ a and the square root of σ c for {a, b, c} 3, i.e. Let σb ε abc ( σc σ a σc. (36 P n {σ j1 σ jn {j 1,..., j n } {0, 1,, 3}} (37 be the Pauli group where σ 0 I, i.e. the set of all n- fold tensor products of the identity and the Pauli matrices [13]. Following the definition in [8], the Clifford group C n is the normalizer [13] of P n in the group of all unitary n n matrices ( n, i.e. C n { ( n P P n : P P n }. (38 he Clifford group can be generated by C 1 (X, S, and H [13]. Other matrices can then be derived e.g. SS, X HSSH, Y (36 SXS SHSSHSSS. (39

6 Other choices are possible. For example, the Clifford group can be generated by e.g. C 1 (X, V, and H, since S HV H. heorem 3. he gates C 1 (σ a, σ a, and ρ ab generate the Clifford group where a b. Proof. According to (13 one can obtain a second Pauli square root from σ a by multiplying it with ρ ab on both sides. he third square root can then be obtained from (36. Corollary. he gates C 1 (σ a,, and ρ ab generate the Clifford group. Based on the results of this section, circuits built using gates from the Clifford+ library can also be expressed using a more general Clifford group together with a fourth root of a corresponding Pauli matrix. V. NEGAOR OPERAIONS In [14] the authors introduce a related gate called the NEGAOR N(θ which they obtain by replacing π by an angle θ in the matrix representation for the root of Pauli X, i.e. N(θ I + i sin θ + e iθ (I X. (40 his gate can be generalized for all Pauli matrices as N a (θ I + i sin θ + e iθ (I σ a (41 and it can be proven that the matrix is obtained from the corresponding Pauli root by replacing π with θ. heorem 4. It holds, that N a ( θ Note that σ a e iπ R a. e iθ Ra (θ. (4 ( Proof. We rewrite (4 to R a (θ e iθ N θ a and after expanding N a ( θ we have e iθ ( I + i sin θ e iθ (I e iθ I + i sin θ I i sin θ σ a cos θ I i sin θ σ a R a (θ which concludes the proof. Corollary 3. From heorem 3 it can be seen that C 1 (σ a, N a (θ, and ρ ab generate the Clifford group. VI. CONCLDING REMARKS his paper has examined relationships between the Pauli matrices and their roots with an emphasis on circuit synthesis and optimization. We have presented a number of useful identities and techniques. We have also shown that by applying those methods it is possible to systematically derive circuits employing Clifford+ gates from NCV circuits without using expensive exhaustive search techniques. Our ongoing wor is to incorporate the techniques discussed in this paper into a synthesis algorithm opening the way to the synthesis and optimization of larger Clifford+ gate circuits. [1] M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information (Cambridge niversity Press, 000. [] A. Barenco, C. H. Bennett, R. Cleve, D. P. DiVincenzo, N. Margolus, P. Shor,. Sleator, J. A. Smolin, and H. Weinfurter, Phys. Rev. A 5, 3457 (1995. [3] W. N. N. Hung, X. Song, G. Yang, J. Yang, and M. A. Perowsi, IEEE rans. on CAD 5, 165 (006. [4] D. Große, R. Wille, G. W. Duec, and R. Drechsler, Multiple-Valued Logic and Soft Computing 15, 83 (009. [5]. Sasanian and D. M. Miller, Multiple-Valued Logic and Soft Computing 18, 83 (01. [6] H. Buhrman, R. Cleve, M. Laurent, N. Linden, A. Schrijver, and F. nger, in Foundations of Computer Science, Vol. 7 (IEEE Computer Society, 006 pp. 411 419. [7] A. Bocharov and K. M. Svore, Phys. Rev. Lett. 109, 190501 (01. [8] M. Amy, D. Maslov, M. Mosca, and M. Roetteler, IEEE rans. on CAD 3, 818 (013. [9] P. Selinger, Phys. Rev. A 87, 0430 (013. [10] E.. Condon and P. M. Morse, Quantum Mechanics (McGraw-Hill, 199. [11] P. A. M. Dirac, Math. Proc. of the Cambridge Phil. Soc. 35, 416 (1939. [1] M. Soeen and M. K. homsen, in Reversible Computation, Lecture Notes in Computer Science, Vol. 7948 (Springer, 013 pp. 196 08. [13] D. Gottesman, arxiv:quant-ph/9807006v1. [14] A. De Vos and S. De Baerdemacer, Open Syst. & Inform. Dynam. 0, 1350004 (013.

7 Appendix A: Deriving the circuit in (3 Before we derive the circuit, we show one further identity: (31 (31 S (5 S (A1 We start as before by mapping the controlled V and V gates to S and S gates as follows. In this step we mae use of the identity in (A1 which changes the position and orientation of the selected gates: H H After again moving a CNO to the left we have H H V V V S H S S H Replacing the controlled S and S gates by cascades consisting of uncontrolled and gates yields H H cancel After moving gates on the first and second line towards the left and canceling the with the gate on the third line we have H H In this circuit we move a CNO to the left by applying (8 resulting in H H After moving the selected gates to the left the circuit is as follows: H H swap Moving the CNO to the end of the circuit allows the gate on the top line to move into the third -stage. It also leads to a sequence of three CNOs that corresponds to swapping two lines. he two CNOs right of the third -stage can be extended to a line swapping sequence by adding two identical CNOs. H H Consequently, we can replace the gates by uncontrolled Fredin gates H H and then apply the line swapping locally which results in the circuit from (3: H H