Classification of same-gate quantum circuits and their space-time symmetries with application to the level-spacing distribution

We study Floquet systems with translationally invariant nearest-neighbor 2-site gates. Depending on the order in which the gates are applied on an N -site system with periodic boundary conditions, there are factorially many different circuit configurations. We prove that there are only N − 1 different spectrally equivalent classes which can be viewed either as a generalization of the brick-wall or of the staircase configuration. Every class, characterized by two integers, has a nontrivial space-time symmetry with important implications for the level-spacing distribution – a standard indicator of quantum chaos. Namely, in order to study chaoticity one should not look at eigenphases of the Floquet propagator itself, but rather at the spectrum of an appropriate root of the propagator.


I. INTRODUCTION
Chaoticity and integrability are important theoretical notions.Integrability can allow for analytical results, while chaotic systems, in spite of unpredictability of trajectories, adhere to statistical laws.So-called toy models -the simplest models with a given property -play an important role.Classical single-particle H in one dimension (1D) is always integrable; one needs at least a 3D phase space for chaos to be possible.This can also be achieved already in 1D [1] by a time-dependent H(t), the simplest case being a "kicked" system of form H(t) = p 2 2 + V (q)τ δ τ (t), where δ τ (t) is a train of delta functions.A canonical example is the standard map [2].Similar logic of taking a Floquet propagator (map) works for quantum systems as well.For instance, one can exemplify single-particle quantum chaos with a kicked top [3,4].Going to many-body quantum systems a plethora of possibilities opens up, one choice being a Floquet propagator that is a product of two simpler propagators, e.g.Ref. [5].In light of experimental advances in noisy quantum simulations [6][7][8] it pays off to consider systems where the basic building block is a nearestneighbor gate rather than the local Hamiltonian (applying two-site gates is also simpler in classical numerical simulations [9]).
We therefore focus on circuits where a one-unit-of-time Floquet propagator F is composed of applying the same two-site unitary gate V on all nearest-neighbor pairs of qubits in 1D -we call such systems simple circuits.Simple circuits have translational and temporal invariance, and, depending on the chosen gate V , span all dynamical regimes from integrability to chaos.Needles to say, such simple circuits have been extensively studied, a non-exhaustive list of only few of recent papers includes Refs.[10][11][12][13][14][15][16][17][18][19][20].We show that any such circuit has a very simple form: it is a product of a local 2-site transformation and a free propagation (translation), and that there are only N − 1 spectrally inequivalent classes.
There are many indicators of quantum chaos with perhaps the most frequently used one being the so-called level spacing distribution (LSD) P (s) of nearest-neighbor eigenenergy spacing s [3].According to the quantum chaos conjecture [21] Hamiltonian systems with a chaotic classical limit are expected to display P (s) given by the random matrix theory (RMT) [22].RMT LSD has also been observed in non-integrable generic systems without a classical limit, of which simple circuits are an example, where it is sometimes even taken as a defining property of quantum chaos [23].For Floquet systems checking for quantum chaos via P (s) is even simpler: writing eigenvalues of F as e iϕj the density of eigenphases ϕ j should be uniform and therefore taking for s = (ϕ j+1 − ϕ j )N /2π, where N is the Hilbert space dimension, there is no need for the unfolding that is required when studying spectra of H [3]. It is therefore rather surprising that, while there are hundreds of papers using P (s) to study chaoticity in many-body Hamiltonian systems, there are essentially none studying LSD in simple (same-gate) quantum circuits (exceptions are recent Refs.[24,25]).The reason is that, surprisingly, LSD for chaotic simple circuits seemingly does not adhere to the RMT expectation.In our paper we will show that the reason behind it is a space-time symmetry that all such circuits posses.
Let us demonstrate that by a simple generalized brickwall (BW) circuit with 3 layers (Fig. 1 inset), where we translate each 2-site gate by 3 sites (instead of 2 as in BW).For periodic boundary conditions and N divisible by 3 the Floquet propagator can be written as V j+3k,j+3k+1 is one layer beginning at site j and V i,j denotes the unitary 2-site gate V acting on qubits i and j.Indices are taken modulo N , with sites j = 1, . . ., N .Taking a 2-qubit gate V to be some fixed generic unitary, and therefore having a system that should be quantum chaotic, we can see in Fig. 1 that, after resolving the obvious translational symmetry, the LSD of F is far from the expected RMT result for a circular unitary ensemble (CUE) [3].If anything, it is closer to a Poisson statistics typical of integrable systems, as if there would be some unresolved symmetry [26].Indeed, each layer f j , and thereby also F , is invariant under translation by 3 sites, S −3 f j S 3 = f j , where S is FIG. 1.A chaotic 3-layer BW circuit (inset) and the eigenphases level-spacing distribution P (s).Eigenphases of the propagator F (blue) do not follow the RMT expectation, while after resolving the space-time symmetry the eigenphases of the root F = (S 6 F ) 1/3 (purple) do agree with the CUE RMT (green curve).Red curve is the theory for a direct sum of 3 CUE matrices (see Eq. ( 9) and Appendix B).Data is for N = 12 in the eigenspace with momentum 0, and Haar random gate V .
the translation operator by 1 site to the left, We can also easily see (Fig. 1) that translating F by 2 sites is the same as a shift in time by 1 layer.Denoting propagator from time t 1 to t 2 by F (t 1 , t 2 ), e.g., F = F (0, 1), the 3-layer BW circuits has a space-time symmetry S −2 F (0, 1)S 2 = F (1/3, 4/3) (application of each gate advances time by 1/N ).This symmetry is also reflected in the structure of F , which can be written as We now see where the crux of the problem lies.Since F as well as f 1 have translational symmetry by 3 sites the momentum k labeling eigenvalues of S 3 (also referred to as the quasi-momentum, since it takes a discrete set of values) is a good quantum number.In each momentum eigenspace S −6 is just an overall phase, and therefore F is, up-to this irrelevant phase, equal to the 3rd power of F = S 2 f 1 .The quantum chaos conjecture should therefore be applied to F rather than to F .Doing that one recovers perfect agreement with the RMT (Fig. 1).It also tells us that, provided F and therefore the circuit is "chaotic", the LSD of F will be equal to that of the 3rd power of a CUE matrix which is equal to a direct sum of 3 independent CUE matrices, Eq. (9).The above example is just one possible simple circuit -in our classification it is of type (q, r) = (3, 2).We shall classify symmetries of all possible simple quantum circuits, showing that all posses an appropriate spacetime symmetry.Space-time symmetries have been discussed before in the solid-state physics context and timeperiodic H(t) [27][28][29].An important offshoot will be expressing F essentially as a power of simpler matrix F , meaning that in order to probe dynamic (chaotic) properties one needs to study F and not F .Expressions of Allowed (q, r)
that form have appeared before for special cases of the BW circuit in Ref. [30] (class (2, 1)), and for r = 1 in Ref. [25], see also Ref. [24] for preliminary results.

II. CLASSIFICATION OF SIMPLE CIRCUITS
Having an N -site 1D system with periodic boundary conditions there are N nearest-neighbor gates V j,j+1 that can be ordered in N !different ways (configurations) to make a one-step propagator F [31].However, it is clear that many of those configurations have equal F since 2-site gates acting on non-overlapping nearest neighbor sites commute.Furthermore, a lot of configurations lead to the same spectra, for instance, under cyclic permutations of gates spetra do not change [32].Because we want to study spectra of F we will call two circuits equivalent if they have the same spectrum.It is clear that there are much less than N !non-equivalent simple circuit classes.For open boundary conditions there is in fact just one class [32].
For periodic boundary conditions this is not the case.One can show (see Appendix, Theorem 2) that there are (N − 1) different equivalence classes.A canonical representative circuit of a given equivalence class follows a similar logic as the 3-layer BW example in the introduction: a canonical circuit is characterized by two integers q and r, where the first layer of gates f 1 is made by repeatedly translating V 1,2 by q sites (q = 3 in the example), whereas r determines the shift of the 2nd layer with respect to the 1st one (r = 2 in the example).The following theorem embodies the precise statement.
Theorem 1.Any simple qubit circuit on N sites with periodic boundary conditions is equivalent to exactly one of the N −1 canonical simple qubit circuits having Floquet propagator where q is larger than 1 and divides N , and q and r are coprime, Any same-gate nearest-neighbor circuit is spectrally equivalent to one of the canonical circuits Fq,r shown here for N = 6, see also Table I.Dashed rectangles denote f1, one layer occurring in the root Fq,r in Eq. ( 5).Circuits where gcd denotes the greatest common divisor.
The proof can be found in Appendix C. While it is not constructive in the sense of providing an explicit procedure of transforming a given F to its canonical form F q,r , the transformation is in practice easily achieved by hand for small N , or one can in linear time calculate the invariant p introduced in Lemma 1 in Appendix C, thereby obtaining the correct (q, r).The integer invariant p is defined for an alternative simple circuit representative of a given class, and characterizes the circuit as a concatenation of two staircase sections with opposite chirality (Fig. 5), the length of the 2nd being p.
The canonical form of F q,r in Eq. ( 2) has a simple geometric interpretation: the term in the inner bracket is a single layer f 1 that is composed of N/q gates, which is then with appropriate shifts repeated in altogether q layers, explicitly written as The (N − 1) classes described in Theorem 1 account for all possible circuits of which the standard brick-wall with (2, 1), and the staircase [32][33][34] (also called convolutional codes [35,36]) with (N, 1) are just two cases.The allowed values of (q, r) for few small N are listed in Table I, while their pictures are shown for N = 6 in Fig. 2, and for N = 10 in Fig. 4 in Appendix.Note that while the allowed set of (q, r) for a given N depends on the factors of N , the allowed N s for a given (q, r) are simpler: taking any coprime q > r a circuit is possible for all N that are multiples of q.The set of allowed (q, r) naturally splits into two categories.Because q divides N , with the maximal value being N , one group is composed of the largest possible q = N , while the other has smaller 2 ≤ q ≤ N/2.Group (i) are generalized S circuits with q = N .Because the translation by N is equivalent to the identity this group could be equivalently described by (N, r) ≡ (r, 0), that is, by a single integer r that gives the shift of the next gate.As r is coprime with N all n.n.gates are obtained by just this translation modulo N .Group (ii) can be viewed as generalized BW circuits and needs two integers.Because q divides N , translation by q alone does not generate all n.n gates and one needs subsequent layers characterized by r.Altogether one has a q-layer BW circuit, each layer consisting of N/q gates.For a generic gate V the spectra of all (N − 1) propagators F q,r are different.If V would be symmetric with respect to the exchange of the two qubits the circuits with (q, r) and (q, q − r) would have the same spectra (spatial reflection symmetry), and therefore one would have only ⌊ N 2 ⌋ different spectral classes [32].Theorem 1 also shows that for prime N only generalized S circuits exist.For odd N there are no standard BW circuits having (2, 1), but there are generalized BW circuits with q > 2 (see Table I).It is interesting to note that circuits with more complex multi-site update rules have been used before, for instance the (3, 1) case [37] as well as (4, 1) has been used to construct integrable models [38] (although with a 3-site transformation).One interesting question is possible integrability of different canonical configurations for specific V .While for smaller N < 10 possible circuits are straightforward generalizations of the S or BW configurations with left or right chirality, for larger N less intuitive circuits are also possible.For instance, for N = 10 one can have (5, 2) (see Fig. 4 in Appendix) that can be further compressed in time direction (e.g., all gates in the first two layers f 1 and f 3 commute), reducing the number of non-commuting layers from q = 5 to just 3.Each of those compressed layers has 2 idle qubits (that are not acted upon), such that the compressed circuit F t 5,2 has two separate diagonally slanted lines of idle qubits, each of width 1. Integers (q, r) therefore also determine the filling fraction, i.e., the number and the pattern of idle qubits in maximally compressed F t q,r (see Appendix A).The only circuit with no idle qubits is the standard BW with (2, 1).

III. SPACE-TIME SYMMETRIES
In order to understand space-time symmetries of any simple circuit it suffices to study the canonical equivalence class representatives F q,r .Denoting the inner term FIG. 3. Level-spacing distribution P (s) of eigenphases of Fq,r (Eq.2) in blue are not chaotic and are equal to a direct sum of q CUE matrices (red curve, Appendix B), while the LSD of the eigenphases of root Fq,r (Eq. 5, violet) agrees with the CUE RMT prediction (green curve).For q ̸ = N we show data from the momentum eigenspace of S q with k = 0, and averaging is done over 10 − 50 circuits each having an independent 2-site Haar random gate V .
in Eq. ( 2) by Fq,r , calling it a root of F q,r , where S kq , we can write Eq. ( 2) as Eq. ( 6) appeared in Ref. [30] in the open-systems context for the special case of a BW circuit with (2, 1).The root connection is especially simple for the generalized S case: for q = N the translation S q is identity, resulting in The root has a translational symmetry by q sites S −q Fq,r S q = Fq,r .
This is trivially true if q = N , otherwise the translated root is equal to S r N/q−1 k=0 S −(k+1)q V 1,2 S (k+1)q , where, since all the gates in the product commute, we can relabel the index k +1 = k ′ , yielding S r N/q−1 k ′ =0 S −k ′ q V 1,2 S k ′ q = Fq,r .Because F q,r is a power of Fq,r multiplied by some power of S q , F q,r also has translational symmetry by q sites.Furthermore, F q,r also has a space-time symmetry when translating by r sites This can be easily seen by rewriting the LHS of Eq. ( 8) as S −qr S r S −r (S q V 1,2 ) N/q S r q , which then equals to S −qr S r (S q V 1+r,2+r ) N/q q .The final expression can be understood as a circuit beginning with the second layer, thus justifying the equality to the RHS of Eq. ( 8).Eq. ( 8) appeared in Ref. [25] for the special case of r = 1, along with a figure showing numerically computed LSD of F q,r for q = 2, r = 1.

IV. LEVEL SPACING STATISTICS
An immediate application of the above results is in quantum chaos for the statistics of spacings of closest eigenphases of F .Looking at the root connection in Eq. ( 6) and the fact that S q commutes with all terms, one can focus on a given common momentum eigenspace of S q with eigenvalues e 2πikq/N , k ∈ {0, 1, . . ., N/q − 1}.There S −qr is just an overall phase factor e −2πiqkr/N .Therefore F q,r is up-to this phase equal to an appropriate power of Fq,r .
The eigenphases of F q,r are therefore simple q-th multiples of eigenphases of Fq,r modulo 2π (and adding the momentum phase factor).For high q such an operation will results in an uncorrelated Poisson statistics of eigenphases of F q,r [39], i.e., an exponential distribution of P (s), and to infer possible quantum chaos one should not look at the eigenphases of F q,r .Rather, if the circuit is quantum chaotic one would expect that the spectral statistics of the root Fq,r (5) will adhere to the RMT theory.In particular, if the 2-site gate V does not have any anti-unitary (time-reversal) symmetry, which is the case for our numerics where V is randomly picked according to the Haar measure, the appropriate ensemble for Fq,r is the CUE (i.e., the unitary Haar measure).We can see in Fig. 3 that the LSD of Fq,r indeed agrees with CUE Wigner surmise P (s) = 32 π 2 s 2 e −s 2 4/π for all canonical classes.
If one is on the other hand interested in the eigenphases of F q,r one has to take into account the nontrivial modulo 2π operation.The theorem by Rains [40] tells us what is the distribution of eigenvalues of a power of a matrix from the unitary Haar measure.For M ∈ U N , where U N denotes the Haar distribution of N × N unitary matrices, the eigenvalues of its power M q are a union of q independent eigenvalue sets distributed according to U Nj of smaller matrices, for any q < N , ⌈•⌉ denotes the ceiling function, and λ(U N ) is the distribution of eigenvalues of Haar-random unitary matrices of size N .Note that N = q−1 j=0 N j , and therefore, as far as the eigenvalue distribution is concerned, it is as if M q would have a block diagonal structure with blocks of smaller CUE matrices.In our case of large N and small q ≪ N all dimensions in the union are approximately equal to N j ≈ N /q, which means that the level-spacing distribution in each eigenspace of S q of size N ≈ 2 N q/N of F q,r behaves in the same way as if it had another unitary symmetry with q distinct sectors [26].Theoretical LSD in such a case of a sum of q independent spectra is known and has been studied long time ago [41], see also Appendix B (or Appendix A in Ref. [22]).We can see in Fig. 3 that this theory agrees with numerical LSD for F q,r [42].

V. DISCUSSION
We have classified all different quantum circuits in one dimension with periodic boundary conditions and translationally invariant nearest-neighbor 2-site gates.There are (N − 1) different spectral classes, being generalizations of the familiar brick-wall and the staircase configurations.Each class can be characterized by two integers (q, r), such that the Floquet propagator is essentially a q-th power of F = S r f 1 , where for generalized S circuits one has f 1 = V 1,2 , while for generalized BW circuits f 1 is one layer of gates.We have therefore come full circle: similarly as in classical single-particle kicked models where one interchangeably applies a simple map in real space (e.g., potential V (q)) and a simple map in momentum space (e.g., free evolution), any quantum many-body translationally invariant Floquet system has the same basic structure.The elementary building block F is a product of simple local transformation, like V 1,2 , and of "free evolution" described by the translation operator S (that is diagonal in the Fourier basis).
We have explicitly shown how that affects the level spacing statistics of simple circuit Floquet systems -to detect quantum chaos one must look at the spectrum of the q-th root F of the propagator.Effects of the underlying space-time symmetry on other quantifiers of quantum chaos remain to be explored.Reducing all circuits to just few canonical classes makes it possible to study chaoticity for different (q, r); are some configurations more chaotic than others, does that depend on the filling fraction (see Appendix A)?While we focused on systems without any symmetry, i.e., the unitary case, orthogonal and symplectic cases can be treated along the same lines.Generalizing classification to more than one dimension is also an open problem.q = 2, r = 1, p = 5 q = 5, r = 1, p = 2 q = 5, r = 2, p = 6 q = 5, r = 3, p = 4 q = 5, r = 4, p = 8 q = 10, r = 1, p = 1 q = 10, r = 3, p = 7 q = 10, r = 7, p = 3 q = 10, r = 9, p = 9 FIG. 4. All Fq,r defined in Eq. ( 2) for N = 10.The parameter p of the equivalent Fp (Eq.(C7)) is also included.Here C(Fq,r) = p, see discussion in Section C.2.

Appendix A: Canonical circuits
In the main text in Fig. 2 we have shown canonical circuits F q,r for N = 6.Here we show in Fig. 4 all 9 canonical F q,r for N = 10, where a variety of configurations is richer.We can for instance notice that even though circuits are constructed as a q-layered circuit in some cases consecutive layers commute and can therefore be compressed, thus reducing the number of layers.For N = 10 this is the case for (q, r) = (5, 2) and its chiral pair (5,3).For (5, 2) the first two layers f 1 and f 3 commute and can be compressed to a single layer; likewise for the next two layers.Therefore in the compressed form (F 5,2 ) 2 consists of only 5 layers instead of 10.In this compressed form there are still 2 idle qubits in each layer on which no gate acts.One can say that the filling fraction of gates for the circuit (5, 2) is 8/10, i.e., 20% of qubits is idle.The class (5, 1) on the other hand can not be compressed any further and has the filling fraction of only 4/10.The only circuit with filling fraction 1 is the standard BW with (2, 1).

Appendix B: Level-spacing distribution of a direct sum of independent RMT matrices
The general formula for the LSD of a direct sum of independent RMT matrices of arbitrary dimensions was derived in Ref. [41].The matrices in the union in the theorem by Rains [40], Eq. ( 9), are approximately of equal dimensions in the large N limit, which is why we use the formula for the direct sum of equally dimensional matrices throughout this paper.
For the LSD P (s) of an RMT ensemble we define where R(y) is nothing but 1 minus the cumulative distribution of P .The LSD for a direct sum of m independent equally dimensional matrices from the same RMT ensemble is then In Figures in the paper, we plot P m (s) obtained by using the Wigner surmise for P (s), which is of acceptable accuracy for our application.For better approximations of P (s) see Ref. [46].
gate i l in a given F , we will call i l+1 the time successor and i l−1 the time predecessor, whereas when referring to gates with neighboring numbers, we will call i l − 1 the left neighbor and i l + 1 the right neighbor of i l .By definition, the sequences corresponding to simple circuits are permutations of the first N natural numbers.For the canonical simple circuits defined in the paper in Eq. 2 F q,r ≡ (1, 1 + q, . . ., 1 + (N/q − 1)q, , 1 + r, 1 + r + q, . . .), (C2) where all gate numbers are taken modulo N (from 1 to N ).We are interested in (spectrally) equivalent circuits, as defined in the paper.The equivalence will be denoted with ∼ =.The two important equivalence operations are time predecessor/successor commutation of non-neighboring gates (here the Floquet operators are actually equal, not only equivalent) in the new notation written as and cyclic permutation or in the new notation While the equivalence of cyclically permuted circuits was motivated by spectral equivalence, a different, perhaps more general, motivation is also possible.If we have dynamics in mind, i.e., F t with possibly large t, the definition of a starting time of our period is arbitrary, e.g., the first operator in a period could just as well have been defined as the last operator in the previous period.Therefore, it would also make sense to define cyclically permuted circuits to be equivalent in this case.

C.1. Double staircase canonical circuits Fp
We now introduce a new canonical form, different from the one in the main paper, its diagram is shown in Fig. 5.It consists of two staircase sections with opposite chirality, the second having length p.To show that it is indeed a canonical form, i. e. that every simple circuits is equivalent to some circuit in this form, we can prove the following Theorem.
Theorem 2. Any simple circuit is equivalent to a simple circuit with the Floquet operator given by for some p ∈ {1, 2, . . ., N − 1}.
N ) be any simple circuit.This means that i First, we will bring gate 1 to index 1 (step 1 ).After that, we will try to bring gate 2 to index 2 (step 2 ).This will either be possible, in which case we will continue to try bring gate k to index k in the general step, or it won't be possible, in which case our gate will be equivalent to F N −1 .
Step 1 : By means of cyclic permutations (C6) we can always transform F into an equivalent simple circuit beginning with gate 1 (V 1,2 in the standard notation) 2 , . . ., i where we have appropriately relabeled the indices.
Step 2 : We now try to bring gate 2 = i K , K ∈ {2, . . .N } to the second position by doing time predecessor/successor commutations (C4).Gate 2 does not commute only with gates 1 and 3, which means that we must consider two possibilities: L for L > K: By applying (C4), we can bring gate 2 to index 2 where we have again relabelled the indices.We can continue with the general step.
(ii) Gate 3 appears before gate 2, 3 = i L for L < K: By applying (C4) (and relabelling the indices), we can bring gate 2 to be the time successor of gate 3 2 , . . ., 3, 2, . . ., i In the context of equivalence transformations, we can now think of the sequence of gates (3, 2) = (i K ′ +1 ) as a gate that does not commute only with gates 1 and 4. Again, we have two similar cases: (a) Gate 4 appears after the sequence of gates (3,2), L ′ for L ′ > K ′ + 1: By applying (C4), we can bring gate 3 to index 1 and gate 2 to index 3 and by applying (C6), we can cyclically permute gate 3 to index N 3 , . . ., i We can now continue with the general step.
(b) Gate 4 appears before (3, 2), 4 = i L ′ for L ′ < K ′ : By applying (C4) We can again think of (4, 3, 2) as a gate that does not commute only with gates 5 and 1 and again consider two cases similar to (a) and (b).By repeating this process, we either get to the point where case (a) arises, and we can continue with the general step, or our circuit is equivalent to Here, the obtained equivalent circuit is thus precisely F N −1 .
General step: Let us suppose we have already shown that F is equivalent to where i (k) l are arbitrary indices relabelled in a convenient way.We can treat the sequence of gates (1, 2, . . ., k) as a gate, that does not commute only with N and k + 1, which means that we can repeat step 2 by trying to bring gate k + 1 to the right of k (index k + 1).Thus, either In (i) we can repeat the general step until case (ii) arises, or we end up with F ∼ = (1, 2, . . ., N ) = F 1 .
Since there are (N − 1) allowed p, it is clear that there are (at most) (N −1) non-equivalent simple circuits.The proof given is constructive, which means that we can use it as an algorithm to convert a given F to some F p .

C.2. Circuit invariant
An alternative way to determine the equivalent F p for a given F is to calculate some quantity, which is invariant in equivalence operations and is different for all F p .A convenient choice is the length of the second staircase p, which is clearly equal to the number of gates, for which their right neighbor (modulo N ) appears in the Floquet operator before them.Let us thus define C(F ) to be exactly that Let us now show that C(F ) is indeed invariant under circuit equivalence operations.
be the set of gates the invariant is counting, which means As stated previously, for simple circuits (i 1 , . . ., i N ) is just a permutation of (1, . . ., N ), which means where indices are taken modulo N .But in the equivalent cyclically permuted circuit (C6) The membership of all other gates in C stays the same in both cases, since the position of i 1 can change only the membership of i 1 − 1 and i 1 in C and all other relative positions stay the same.Thus which means that C is conserved under cyclical permutations (C6).A transposition of time successive gates can only change C if their gate number difference is ±1, which We now wish to show that the invariant C(F q,r ) is different for all allowed (q, r), which is the last important statement required for the proof of Theorem 1.We do this in two steps, first for the generalized S in Lemma 5 and then for generalized BW in Lemma 6, finally combining both in Lemma 7.
Lemma 5.In the generalized S case, (q, r) ∈ Q and is different for different r.Here all the values in the set (C31) are taken for some allowed r.
Proof.Since we are considering the generalized S case: q = N , r < N and gcd(N, r) = 1.
We first want to consider if we know that a certain gate is a member of C(F N,r ), what can we say about the membership of its time successor and predecessor.Let F N,r = (i 1 , . . ., i N ).Let i l ∈ C(F N,r ), which means that its right neighbor appears in F N,r before it, ∃i k = i l + 1, k < l (gate numbers are taken modulo N , but indices are not).Here l ̸ = 1, since in that case, such k < l = 1 never exists.Let us now consider the membership of i l 's successor and predecessor: (a) If i l+1 = i l + r is a valid gate (i.e. its index is valid, which means l < N ), then i k+1 = i k +r = i l +1+r = i l+1 +1, is the right neighbor of i l+1 and k +1 < l +1, which implies i l+1 ∈ C(F N,r ).In other words: If i l 's time successor exists (i.e. i l is not the last gate in F ), it is also a member of C(F N,r ).

(b) i
is a valid gate (i.e. k > 1), it is the right neighbor of i l−1 and k − 1 < l − 1, so clearly i l−1 ∈ C(F N,r ).In other words: If i l 's right neighbor is not i 1 , then it's time predecessor is also a member of C(F N,r ).
In case (b) i k−1 is not valid only if k = 1.In the case of F q,r , i 1 = 1 and thus i l = N .Since always N ∈ C(F N,r ) (its right neighbor is 1 = i 1 ), by iterating (a), all gates appearing after gate N are also members of C(F N,r ).If any gate appearing before gate N would be a member of C(F N,r ), iterating (b) would eventually lead to i 1 = 1 ∈ C(i 1 , . . ., i N ), which cannot happen, thus leading to a contradiction.We have shown: By definition of allowed F N,r circuits, r, r < N , which means that r = r, leading to a contradiction.We have thus shown that for different allowed r, C(F N,r ) are different.Moreover, in Eq. (C35) we have shown that the value of C(F N,r ) is a member of a set with exactly the same number of elements as allowed r (see Q (S) N in the proof of Lemma 4).This means that C(F N,r ) takes all the values from the set in Eq. (C35) if we let r be all the allowed r values.Lemma 6.In the generalized BW case, (q, r) ∈ Q (BW) N , for fixed q C(F q,r ) ∈ N q p; p < q, gcd(p, q) = 1 .

(C38)
The values are different for different r and are all taken for some allowed r.
Proof.Since we are considering the generalized BW case: q|N, r < q, gcd(q, r) = 1.
In this case, we can divide the circuit in q blocks (layers) of N/q time consecutive gates.The first block is generated by translating gate 1 by q (modulo N ) until we reach gate 1 again.The second block consists of all the gates from the first block translated by r.This means that the first block can be mapped to the subgroup of the cyclic group Z N = {0, . . ., N − 1} of order N/q, where group addition is taken modulo N .The other blocks are cosets of this subgroup (since according to Lemma 3, they must be disjoint), implying that the first q gate numbers are contained in different blocks.We can therefore denote the blocks with the minimal gate number contained in it (and a tilde for clarity) 1, 2, . . ., q.
FIG.2.Any same-gate nearest-neighbor circuit is spectrally equivalent to one of the canonical circuits Fq,r shown here for N = 6, see also TableI.Dashed rectangles denote f1, one layer occurring in the root Fq,r in Eq.(5).Circuits (a), (b), and (c) are generalized BW while (d) and (e) are generalized S. Circuits (b) and (c), as well as (d) and (e), are chiral pairs.

C(F N,r ) = 1 +
|{gates appearing after gate N }| = = N − k N + 1, (C32)where k N is the index of gate N , i k N = N .We have thus shown the first part of the lemma.We now want to determine what are the possible values of C(F N,r ).In order to do that, we must only find the possible values of k N .By definition, we get gate N after k N − 1 translations of gate 1 by r1 + (k N − 1)r ≡ 0 (mod N ), =⇒ −(k N − 1)r ≡ 1 (mod N ).(C33)Thus, −r is a modular multiplicative inverse of k N − 1.According to a well known theorem[47], a requirement for modular multiplicative inverses to exists is gcd(k N − 1, N ) = 1.Therefore gcd(C(F N,r ), N ) = gcd(N − k N + 1, N ) = = gcd(k N − 1, N ) = 1.(C34) In other words, C(F N,r ) is coprime with N .According to Lemma 2, C(F ) ≤ N − 1, which means that C(F N,r ) can only be a number less than N and coprime with N C(F N,r ) ∈ {p; p < N, gcd(p, N ) = 1}.(C35) Let us now show that k N is different for different F N,r and F N,r by contradiction.Let us suppose otherwise, this means that k N − 1 translations by r and by r must generate the same gate number modulo N .(k N − 1)r ≡ (k N − 1)r (mod N ).(C36) Since gcd(k N − 1, N ) = 1, we can divide the equation by k N − 1 [47] r ≡ r (mod N ).(C37)