Symmetry Groups for the Decomposition of Reversible Computers , Quantum Computers , and Computers in between

Whereas quantum computing circuits follow the symmetries of the unitary Lie group, classical reversible computation circuits follow the symmetries of a finite group, i.e., the symmetric group. We confront the decomposition of an arbitrary classical reversible circuit with w bits and the decomposition of an arbitrary quantum circuit with w qubits. Both decompositions use the control gate as building block, i.e., a circuit transforming only one (qu)bit, the transformation being controlled by the other w− 1 (qu)bits. We explain why the former circuit can be decomposed into 2w − 1 control gates, whereas the latter circuit needs 2 − 1 control gates. We investigate whether computer circuits, not based on the full unitary group but instead on a subgroup of the unitary group, may be decomposable either into 2w − 1 or into 2 − 1 control gates.


Introduction
Quantum computing has witnessed considerable attention in the literature in the past decennia, mainly due to the speed-up of quantum computations over their classical counterparts [1][2][3].However, an aspect that is commonly tacitly referred to the background, is the reversible character of the quantum mechanical processes, underlying the computations.Nevertheless, reversible computing offers the one-and-only road towards zero-power computation.This is due to the avoidance of the Landauer effect [4,5], i.e., no heat is dissipated into the system as no information has been destroyed along the process.Reversibility is not monopolized by the quantum world.Also classical circuits can be designed such that no information is destroyed during the computations, which constitutes the field of (classical) reversible computing [6][7][8][9][10].These circuits are very similar to common classical logical circuits, with the exception that they are reversible, i.e., we can unambiguously reconstruct the input from any given output.An overview of the achievements in the field of reversible computation is given by Kerntopf [11].Clearly, the set of classical reversible circuits can be regarded as a subset of the quantum reversible circuits, so classical reversible computing can be regarded as a step-up from the contemporary classical computers towards the development of the quantum computers of the future.
In the present paper, we compare the decomposition of both an arbitrary reversible circuit and an arbitrary quantum circuit into elementary gates.A relationship between the two architectures is established, based on group theory.Whereas reversible computing is based on finite groups, quantum computing is based on infinite groups (a.k.a.Lie groups).Whereas reversible computing reflects the symmetries of the group of permutation matrices, quantum computing displays the symmetries of unitary matrices.In spite of these differences, quite similar (but not identical) synthesis methods may be applied for both building a reversible computer and building a quantum computer from elementary gates called control circuits.

Control Circuits and Control Gates
Assume a circuit of width w, i.e., a circuit with w input (qu)bits and w output (qu)bits.Indeed, for reversible circuits (either classical or quantum), the number of outputs necessarily equals the number of inputs.See Figure 1.With these w (qu)bits, we can build a 2 w dimensional (Hilbert) space with basis vectors {|e 1 , e 2 , . . ., e w ⟩; e j = 0, 1}.For a typical classical reversible circuit, the input and output vector will be equal to one of these basis vectors and we can write them as (A 1 , A 2 , . . ., A w ) = |A 1 , A 2 , . . ., A w ⟩ and (P 1 , P 2 , . . ., P w ) = |P 1 , P 2 , . . ., P w ⟩ respectively.In the quantum world, the situation is different as superpositions or linear combinations of the basis vectors (a.k.a.basis states) are part of the physical reality.So, a general state can be written as Both in the classical case and in the quantum-mechanical case, we can represent a given (qu)bit state by means of a 2 w dimensional column vector with the coefficients (or amplitudes) c {e i } as input entries.Consequently, a circuit or computation bringing one vector to another can be represented by a 2 w × 2 w matrix, acting on the column vectors.These matrices are permutation matrices in the case of classical reversible computing, and become unitary matrices in the quantum case.In the classical case, the circuit is fully characterized by w Boolean functions P j (A 1 , A 2 , ..., A w ).Methods have been developed to synthesize both circuits performing arbitrary reversible functions [9,10] and symmetric reversible functions [12].We consider a special case of circuits, where w = u + v. Let the circuit be such that it leaves the structure of the first u (qu)bits in the input state unaltered [13].We will call these (qu)bits the controlling (qu)bits.The remaining v (qu)bits will be affected by the computation, however depending on the structure of the controlling (qu)bits.In the case of classical reversible computing, it means that the first u output bits will be equal to the input bits (P 1 , P 2 , . . ., P u ) = (A 1 , A 2 , . . ., A u ) and the value of the remaining bits (P u+1 , P u+2 , . . ., P u+v ) is a function of the input bits (A u+1 , A u+2 , . . ., A u+v ), however depending on the values of the controlling bits (A 1 , A 2 , . . ., A u ).In the case of quantum computing, the circuit is based on the same general principle.However, the control does not consist of the sequence (A 1 , A 2 , . . ., A u ) alone, since the input state can be in a superposition of all basis states (1).As a result, the controlling will be done proportional to the amplitudes c A 1 ,A 2 ,...,Au,e u+1 ,e u+2 ,...,e u+v (with e u+j = 0, 1) in the expansion of the input state.This will become clear when inspecting the transformation matrix.In general, these circuits can be represented by a 2 w × 2 w matrix, consisting of 2 u blocks, each of size 2 v × 2 v , situated on the diagonal.Similarly, all matrices involved are either permutation matrices (classical reversible computing) or unitary matrices (quantum computing).We will call these circuits control circuits, e.g., for the case u = 2 and v = 1 (and thus w = 3), the unitary matrix looks like As already mentioned, in quantum computing, the input state will always be in a superposition of the controlling qubits.Therefore, the computation will be controlled according to the amplitudes of the controlling qubits in the input state.Figure 2a shows an example for u = v = 2 (and thus w = 4).
We follow here the notation by Möttönen et al. [14,15].In some cases, only two different submatrices F and G are present, and moreover one of them (i.e., F ) is the 2 v × 2 v unit matrix.Figure 2b shows an example: In such case, the gate g of width v is applied to the controlled (qu)bits if and only if a particular boolean function φ(A 1 , A 2 , ..., A u ) of the controlling (qu)bits equals 1.Such special control circuit is called a control gate [16].The function φ is called the control function.In the example of Figure 2b, we have Control gates are important in classical reversible computing as there exist only two different 2 × 2 permutation matrices, one representing the follower, the other representing the inverter.Thus a classical reversible control circuit with v = 1 always simplifies to a control gate.In quantum computing, even for v as small as 1, as many as ∞ 4 different 2 × 2 unitary matrices [17] are allowed; the "probability" that two such 2 × 2 blocks in a control circuit matrix will be identical, is infinitesimally small.In the following, we will show from quite general principles that the control circuit plays an important role in the effective decomposition of a reversible as well as a quantum circuit.

Symmetric Groups
For the study of reversible computers, we consider the reversible logic circuits of width w, i.e., with w binary inputs A 1 , A 2 , ..., A w and w binary outputs P 1 , P 2 , ..., P w .See Figure 1.The 2 w output rows of the truth table of such a logic transformation correspond to a permutation of the 2 w input rows (0, 0, ..., 0, 0), (0, 0, ..., 0, 1), (0, 0, ..., 1, 0), ..., and (1, 1, ..., 1, 1).Table 1a gives an example for w = 3.All reversible truth tables of the same width w form a group (with respect to the operation of cascading), which we denote by R. The group R is isomorphic to the symmetric group S 2 w of degree 2 w and order N = (2 w )!.It thus is also isomorphic to the group of the 2 w × 2 w permutation matrices.
Table 1.Members of the group R with w = 3.(a) arbitrary; (b) linear.
A natural question is now if we can construct a given reversible function of degree x from a concatenation of circuits with lower degree.Let N (x) be the number of different circuits of degree x, which we would like to build into hardware.We may assume that we can make use of a library of circuits with degree y (with y < x) for that particular purpose.This library again can be constructed from another library of circuits with lower degree z (with z < y) etc., until we have reached the set of all circuits of degree 2 (i.e., the 1-(qu)bit operations).We are interested in a particular kind of decomposition of a circuit with a given (non-prime) degree m: with p and q integers.We aim at decomposing a circuit of degree m into a cascade of three circuits: • the first consisting of q subcircuits each of degree p, • the second consisting of p subcircuits each of degree q, and • the third consisting again of q subcircuits each of degree p.
With the help of 2q circuits of degree p and p circuits of degree q, we can make the following number of combinations: For the particular case of the symmetric group S x of degree x, the order N (x) equals x!.With N (x) = x! and q = m/p, Equation (3) gives For any non-trivial divisor p of m, we have that F (p, m/p) is larger than N (m) = m!.A proof is supplied in Appendix A. This suggests that any factorization of m is a candidate for decomposition of an arbitrary circuit of degree m, e.g., for m equal to a power of 2 (say m = 2 w ), we have p = 2 k .The value of F (p, m/p) grows fast with increasing p : This is illustrated by Figure 3, where m has been chosen equal to 16.The dots on the curve are located at the divisors of m, i.e., at x = 1, x = 2, x = 4, x = 8, and x = 16.Thus all divisors p = 2, p = 4, ..., p = m 2 obey F (p, m/p) > m!.Therefore, the F (p, q) combinations may be enough to construct the N (m) different circuits.Hence, each of these choices of p may lead to a circuit synthesis method.And, in fact, they do, thanks to Birkhoff's theorem on doubly stochastic matrices.One of the versions of this theorem states that any q × q matrix with integer entries, such that all line sums are equal to p, can be written as a sum of p permutation matrices.As a result [16,18], any permutation of m objects can be decomposed as a sequence of q permutations of p objects, p permutations of q objects, and again q permutations of p objects.The most efficient synthesis method is found for that particular value of p for which F (p, m/p) exceeds m! as little as possible.This happens for p = 2 (and thus q = m 2 ).In the case of reversible computing, we have m = 2 w .Thus factorizing this number as p×q = 2×2 w−1 is the best choice for efficient synthesis of a reversible circuit.Figure 4a shows the resulting 3-part circuit.Figure 5 shows how we may apply such decomposition w − 1 times.De Vos and Van Rentergem [16,18] have demonstrated that this eventually leads to a circuit synthesis consisting of a cascade or chain of as little as 2w−1 control gates.The synthesis approach is very efficient, as no synthesis is possible with less than 2w − 3 control gates.Indeed, any synthesis method [18,19] leads to a cascade of length L satisfying ⌉ with N = (2 w )! and B = 2 2 w−1 (the number of different building blocks).Together with Stirling's formula, this yields [18] L ≥ ⌈ (w

Dimensional Analysis
Let n(x) be the dimension of the space of circuits of degree x.With the help of 2q circuits of degree p and p circuits of degree q, we can span a space of dimension For the particular case of the unitary group U(x), the dimension n(x) equals x 2 .With n(x) = x 2 and q = m/p, Equation (4) gives . This is illustrated by Figure 6, where again m has been chosen equal to 16 and dots on the curve are located at the divisors of 16.The curve, in fact, is just a hyperbola.It can be noted from Figure 6 that three and only three dots are located above the horizontal line f = m 2 : the points at p = 1, p = m/2, and p = m.Only the point p = m/2 hints at a plausible decomposition, as both p = 1 and p = m do not lead towards a simplification of the original circuit.For all x-values in the range of interest (i.e., for , for m equal to a power of 2 (say m = 2 w ), we have p = 2 k and only one choice of p is viable in the latter range, i.e., p = m/2 : Thus only the divisor p = m 2 may lead to a synthesis method.If such synthesis really exists, recursive application would eventually lead to a cascade of as little as L(w) = 2 w − 1 control gates.
We summarize the present section applying the notion of Young subgroup.A Young subgroup of a symmetric group S m is any direct-product group of the form S m 1 × S m 2 ×... S mz , where (m 1 , m 2 , ..., m z ) is a partition of the given number m: Let this m be an even integer.Then: • For any factorization m = p × q, an arbitrary member a of the symmetric group S m can be decomposed as the product b 1 cb 2 , where both b 1 and b 2 are member of a same Young subgroup S q p and c is a member of a dual Young subgroup S p q .
• Only for the factorization m = p × q = m 2 × 2, an arbitrary member a of the unitary group U(m) can be decomposed as the product b 1 cb 2 , where both b 1 and b 2 are members of a same subgroup U(p) q and c is a member of a dual subgroup U(q) p .
We close this section by noting that we may rewrite Equation (3) as follows: Comparison with Equation (4), leads to the conclusion that log(F ) and log(N ) for finite groups play a role similar to the dimensions f and n of infinite groups.A similar conclusion was made earlier [18,19].

Decomposition
In order to find the synthesis method of a quantum circuit, we successively decompose the U(2 w )-matrix according to Figure 7b, e.g., for w = 3, we have m = 2 w = 8, p = 2 w−1 = 4, and q = 2.The first step in the series of w − 1 decompositions looks as follows: This decomposition indeed corresponds to the proposed (p, q, p) cascading, as the L and R matrix can be regarded as the product of q = 2 transformations in two different (orthogonal) p 2 = 16-dimensional spaces.This can be made clear by introducing the identity Similarly, M can be written as p = 4 successive transformations in different orthogonal 2 2 = 4-dimensional spaces.
Whereas the original matrix U has n(m) = n(8) = 8 2 = 64 parameters, the decomposition (5) has f (4, 2) = m 2 + 2m = 8 2 + 16 = 80 parameters, i.e., qp 2 = m 2 /2 = 32 parameters for matrix L, pq 2 = 2m = 16 parameters for matrix M , and qp 2 = m 2 /2 = 32 parameters for matrix R. Whereas the matrix at the left-hand side of ( 5) is an arbitrary member of U(8), each of the three matrices at the right-hand side is member of a subgroup of U(8): two are member of a same subgroup isomorphic to U(4) 2 and one is member of a subgroup isomorphic to U(2) 4 .Figure 4b shows the resulting 3-part circuit.Note that the matrix M represents a control circuit, however not with the wth qubit controlled, but with the first qubit controlled and the other w − 1 controlling.Applying such decomposition w − 1 times (Figure 7), one should be able to demonstrate that this eventually leads to a synthesis consisting of a cascade of as little as L(w) = 2 w − 1 control circuits (Figure 7d).
The above synthesis approach is rather efficient, as one can prove that no synthesis is possible with less than 2 w−1 control gates.Indeed, any synthesis method [18,19] leads to a cascades of length L satisfying the dimension of the total space and b = 4 × 2 w−1 the dimension of each control circuits, this yields We conclude that the synthesis contains an overkill of approximately a factor 2. The reason is as follows.
The decomposition ( 5) has m 2 + 2m parameters; therefore for only m 2 constraints, there are as many as 2m degrees of freedom extra.In other words: after the whole decomposition is executed (Figure 7d), a total of t(w) = Lb = (2 w − 1)2 w+1 free parameters are introduced to describe the 2 2w variables of the original unitary transformation U .See Figure 8.Because of these extra degrees of freedom, we are allowed to choose a controlled ROTATOR as control circuit.Each of the 2 × 2 blocks within the M -matrix then has the form Such matrices form a well-known 1-dimensional subgroup of the 4-dimensional group U(2).See Appendix B. As a result, decomposition ( 5) is the well-known cosine-sine decomposition [20].Of the 2m degrees of freedom, only m/2 remain: the rotation angles θ 1 , θ 2 , ..., θ m/2 .The cosine-sine decomposition has indeed been applied for quantum circuit synthesis [14,[21][22][23][24].
With the cosine-sine approach, each of the blocks in Figure 7d comes from a space with dimension 1×2 w−1 , except the blocks in the lowermost line, which come from a space still with dimension 4×2 w−1 .Thus the total dimension is such that there is only an overkill anymore of 5/4 with respect to the dimension 2 2w of Figure 7a, instead of a factor 2.

Alternative Approaches
Möttönen et al. [14] first apply the cosine-sine decomposition (as in Section 4.2), then apply 2 w−1 times the identity ( cos(θ j ) sin(θ j ) − sin(θ j ) cos(θ j ) ) = ( cos(θ j ) exp(iα j ) sin(θ j ) exp(−iα j ) − sin(θ j ) exp(iα j ) cos(θ j ) exp(−iα j ) ) The former factor of the right-hand side becomes a block of the M -matrix in (5); the latter factor is absorbed by the R-matrix.By clever choice of the parameters α j and subsequent application of a "mirroring trick", all the blocks in Figure 7d are member of a 2-dimensional subspace of U(2).The total dimension of their final synthesis exactly matches 2 2w .Many other variations to the cosine-sine decomposition are possible, e.g., in order to obtain a decomposition of an arbitrary quantum circuit more closely resembling the decomposition of a reversible circuit (as given in Section 3), we may apply the identities ) ( We let the first two factors of the right-hand side be absorbed by the L-matrix and the last factor by the R-matrix.This leaves the third factor of the right-hand side as a block of the M -matrix.Thus, the blocks (in the w − 1 upper rows) of Figure 7d become controlled NEGATORs (See Appendix C) instead of controlled ROTATORs.

Intermediate Groups
The symmetric group S 2 w is a subgroup of U(2 w ).As a result, any member of S 2 w can obviously be decomposed by means of the cosine-sine decomposition (Figure 7).However, this is not a very cost-efficient way of proceeding because we know, by virtue of the Birkhoff theorem, that a decomposition according Figure 5 is also possible.Moreover, every elementary control gate in the latter decomposition is a member of S 2 , which also belongs to the family of symmetric groups (S m ).From this perspective, it would be interesting to investigate whether any member of a notable subgroup X(2 w ) of U(2 w ) (or supergroup of S 2 w ) can be decomposed into elementary control gates within the same family of those subgroups (e.g., decomposing the elements of the orthogonal group O(2 w ) into multiple controlled O(2) gates).Furthermore, it is of interest to know whether such a decomposition is necessarily "cosine-sine"-like (Figure 4b & Figure 7) or may be achieved by means of a cheaper Birkhoff-like architecture (Figure 4a & Figure 5).
Consider Lie groups of m × m matrices with dimension n(m), not necessarily equal to m 2 (unitary matrices) or to 0 (permutation matrices).In particular, we focus on functions satisfying which are natural assumptions when dealing with matrix groups.For convenience, we put forward the quadratic form n(m) = Am 2 + Bm + C (7) in accordance to the classical groups [25].This assumption will enable us to analyze the decomposition for groups ranging in between reversible and quantum computing.In general, the basis assumptions (6) lead to A ≥ 0, 5A + B ≥ 0, and By means of the dimensional analysis performed in the previous sections, we can extract necessary (but not sufficient) conditions for a decomposition to be feasible.For both the "cosine-sine"-like and Birkhoff-like architecture, the analysis breaks down to the level of Figure 4. We obtain: 1.For a decomposition like Figure 4a to be possible, it is necessary that Substitution of ( 7) into (9) gives leading to the additional condition A ≤ 0. This result, together with A ≥ 0 from (8) sets A = 0, such that n(m) = Bm + C. As a result, the necessary conditions for a decomposition according to Figure 4a (and subsequently a Birkhoff like decomposition) are A = 0, B ≥ 0, and 8B + 5C ≥ 0 (10) This is illustrated by the dark gray domain in the upper left panel of Figure 9.It may be noted that the conditions for a Birkhoff-like decomposition almost coincide with the general conditions (8) for A = 0. Therefore, a linear-dimensional matrix group (A = 0) is likely to be decomposable by means of a Birkhoff architecture.An example would be the Heisenberg group H m (R), which is a linear-dimensional Lie group [26] of dimension n(m) = 2m − 3 and is depicted in the upper left panel of Figure 9 by (h).At this point, it is worth stressing that ( 10) is a necessary and not a sufficient condition.Therefore, once a particular group has passed the test (10) (10), in general it can not be decomposed into a Birkhoff-style architecture.For quadratic groups, the conclusion we can draw from ( 10) is much more straightforward: since A ̸ = 0, a general Birkhoff-like decomposition is impossible on dimensional grounds.
2. For a decomposition like Figure 4b to be possible, it is necessary that Substitution of ( 7) into (11) gives leading to the additional condition A + B + 1 4 C ≥ 0. As a result, the necessary conditions for a decomposition according to Figure 4b (and subsequently a "cosine-sine"-like decomposition) are A ≥ 0, 5A + B ≥ 0, 8A + 8B + 5C ≥ 0, and 4A + 4B + C ≥ 0 This is illustrated by the light gray domains in the panels of Figure 9.It should be noted that, for A = 0, the conditions (10) and ( 12) coincide exactly.The result suggests that a large set of Lie groups may profit from a decomposition according Figure 4b.As an example, we consider the unitary m × m matrices with all line sums equal to 1.They form a Lie group with dimension n(m) = m 2 − 2m + 1 and are depicted by (ls) in Figure 9.The group is both a subgroup of U(m) and a supergroup of S m .Here, neither (10) nor ( 12) is fulfilled.Thus these matrices cannot be decomposed, neither as in Figure 4a nor as in Figure 4b, and consequently neither as in Figure 5d nor as in Figure 7d.Another example consists of the unitary m × m matrices with only real entries.These matrices form the orthogonal group O(m) with dimension n(m) = 1 2 m 2 − 1 2 m and are depicted by (o) in Figure 9.This time, (10) is not fulfilled, but ( 12) is, such that the Birkhoff-like decomposition is not applicable, but the "cosine-sine"-like decomposition may be applicable.As a matter of fact, it is.This is no surprise, as the cosine-sine decomposition is proved for orthogonal matrices [27].In contrast to the general case treated in Section 4.2, the lowermost row of blocks in Figure 7d, in the orthogonal case, are member of the same O(2) group as the other blocks.The same is valid for the special unitary groups SU(m) with n(m) = m 2 − 1, depicted by (su) in Figure 9.  (10) and for a "cosine-sine"-like (12) architecture.The parameter regions (B, C) for ( 10) & ( 12) are given by respectively dark gray and light gray domains, for four different values of the parameter A. Several examples of matrix groups are placed in the plots: symmetric groups (s), Heisenberg groups (h), orthogonal groups (o), unitary groups (u), and special unitary groups (su).It should be noted that, for case A = 0, conditions (10) (i.e., dark gray) imply (12) (i.e., light gray).

Conclusions
An arbitrary classical reversible computer can be decomposed into 2w − 1 controlled NOT gates.In a similar way, an arbitrary quantum computer can be decomposed into 2 w − 1 control circuits (either controlled ROTATOR circuits, or controlled NEGATOR circuits, or ...).Whereas the reversible circuit decomposition is based on the Birkhoff decomposition of doubly stochastic matrices, the quantum circuit decomposition is based on the cosine-sine decomposition of unitary matrices.Lie groups, other than the unitary groups, may either profit of similar decompositions or not, depending on their dimension.such that (13) also holds for q = Q + 1.Note that in the ≥ step above, we have taken advantage of the property that (p!) 2 ≥ p p .This, in turn, is a consequence of where all p factors of the right-hand side (except the first one and the last one) are larger than p.
A3.Because of A1 and A2, the hypothesis is true for all q ≥ 1.

B. Lie Algebra of U(2)
An arbitrary 2 × 2 matrix with complex entries has eight real parameters: i.e., a product of two commutating matrices, the former representing a group isomorphic to U(1), the latter representing the special unitary group SU (2).Often [28], a further decomposition (into three non-commuting matrices) is performed: ) ( cos(z) sin(z) − sin(z) cos(z) where the substitution a = cos(z) has been performed.

Figure 1 .
Figure 1.A circuit of width w.

Figure 2 .
Figure 2. Symbols for (a) a control circuit and (b) a control gate.

Figure 4 .Figure 5 .
Figure 4. Decomposition of a circuit into three parts.(a) a member of S 16 into two members of S 8 2 and one member of S 2 8 and (b) a member of U(16) into two members of U(8) 2 and one member of U(2) 8 .

Figure 9 .
Figure 9. Illustration of the necessary conditions for a Birkhoff-like(10) and for a "cosine-sine"-like(12) architecture.The parameter regions (B, C) for (10) & (12) are given by respectively dark gray and light gray domains, for four different values of the parameter A. Several examples of matrix groups are placed in the plots: symmetric groups (s), Heisenberg groups (h), orthogonal groups (o), unitary groups (u), and special unitary groups (su).It should be noted that, for case A = 0, conditions (10) (i.e., dark gray) imply (12) (i.e., light gray).