{'fraction_non_alphanumeric': 0.05375654062592556, 'fraction_numerical': 0.006664033961891598, 'mean_word_length': 4.099169393405487, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A gauge-invariant reversible cellular automaton

Gauge-invariance is a fundamental concept in physics---known to provide the mathematical justification for all four fundamental forces. In this paper, we provide discrete counterparts to the main gauge theoretical concepts, directly in terms of Cellular Automata. More precisely, we describe a step-by-step gauging procedure to enforce local symmetries upon a given Cellular Automaton. We apply it to a simple Reversible Cellular Automaton for concreteness. From a Computer Science perspective, discretized gauge theories may be applied to numerical analysis, quantum simulation, fault-tolerant (quantum) computation. From a mathematical perspective, discreteness provides a simple yet rigorous route straight to the core concepts.


Introduction
In Physics, symmetries act as guiding principles towards discovering the laws we put forward to model nature. Among them, Gauge symmetries are absolutely central, as they provide mathematical justifications for all four fundamental forces: electromagnetism and gravity (long range interactions), weak and strong forces (short range interactions) [1]. In this paper we express the key notions of gauge theories natively in Computer Science friendly, Discrete Mathematics terms-we do so in order to make them available to these disciplines, and in order to clarify its concepts. More precisely, we describe a discrete counterpart to the gauging procedure. I.e. we provide a step-bystep procedure to enforce local symmetries within Cellular Automata.
These methods may lead to natural, physics-inspired CA. More importantly, the fields of numerical analysis, quantum simulation, digital physics are constantly looking for discrete schemes that simulate known physics [2]. Quite often, these discrete schemes seek to retain the symmetries of the simulated physics; whether in order to justify the discrete scheme as legitimate, or in order to do the Monte Carlo-counting right [3]. Generally speaking, since gauge symmetries are essential in physics, having a discrete counterpart of it may also be.
Interestingly, this way of enforcing local redundancies also bears some resemblances with error-correction, and echoes the fascinating question of noise resistance within spatially-distributed models of computation [4,5], as was pointed out in the context of quantum computation in [6,7].
Although we authors come from the field of quantum computation and simulation, the formalism we use is totally devoid of any quantum theory, least action principle, nor 2 The gauge-invariance requirements Theory to be gauged. In this paper 'theories' stand for CA. As our running example, we pick possibly the simplest and most natural physics-like RCA : one that has particles moving left and right. More precisely, each cell of the RCA has a state in Σ = { , , , } ∼ = {00, 01, 10, 11}. Its dynamics R is defined through a local rule λ R which computes the next state of a cell from that of its left and right neighbours, i.e. ψ(x, t + 1) = λ R (ψ(x − 1, t), ψ(x + 1, t)), with ψ(x, t) the state of cell x at time t. A spacetime diagram ψ : Z 2 → Σ, is said to be R-valid if and only if it is produced by applying λ R , see for instance Fig-1a. We also say that it is 'a solution'. We use the shorthand notations (Rψ)(x, t) for ψ(x, t+1), ψ(x) for ψ(x, 0), ψ(., t) for the function mapping x into ψ(x, t). In our running example, the R that we consider can be expressed in the block circuit form of Fig-1b, with W the gate that swaps two bits: ). RCA presented in such a block circuit form are often referred to as (Margolus-)Partitioned CA in Computer Science vocabulary [8], or as Lattice-gas automata in Physics [9]. This theory is to-be-gauged. This means that although it may have a global symmetry (here the CA has global black/white-symmetry, see Fig-2 (a) − (b)), it lacks a certain local symmetry (here no deterministic CA describes Fig-2 (c)). The aim of the so-called gauging procedure is to extend a theory order so as to enforce a given local symmetry.
(a) An R-valid spacetime diagram with two particles moving in opposite directions Local transformation and its invariant. In our running example we will be interested in enforcing a local black/white-symmetry. We formalize this by giving ourselves a bit field ϕ : Z 2 → {0, 1} ∼ = Z 2 that specifies, at each spacetime point, whether the symmetry is to be applied. In other words, the action of the Z 2 group at (x, t) gets represented upon Σ by with X the NOT gate. Then, an entire spacetime diagram ψ transforms into an en- . This is the symmetry we are trying to enforce. Thus, whenever two spacetime diagrams are related by a transformation G ϕ for some ϕ, they are understood as physically equivalent. For instance, in Fig-2, the first three diagrams are physically equivalent with respect to the symmetry. They all represent this one particle moving right, which can be understood as an invariant of the symmetry. Given a spacetime diagram ψ, we write ψ = {G ϕ ψ | ϕ ∈ Z 2 → Z 2 } for its invariant, (physical) equivalence class. In the case of our field ψ, the bit field J(x, t) = ψ + (x, t) − ψ − (x, t) ( mod 2) fully characterizes ψ, since for all ψ and ψ ′ , G ϕ ψ = ψ ′ if and only if J = J ′ . Fig-2d shows the underlying J.

Definition 1 (Gauge-invariance). A theory T is gauge-invariant if and only if there
exists Z a theory such that for all ϕ The above-defined RCA fails to meet this requirement. An example of this failure is provided by Fig-2, which shows three physically equivalent spacetime diagrams, i.e. that are G ϕ -related. Clearly the first two are R-valid, but the third one is not, as can be seen from looking at ψ(x, t + 1). (b) Still an R-valid spacetime diagram after applying the global symmetry Gϕ with ϕ constant equal to one.
The J-field that characterizes the invariant under Gϕ, common to the other three spacetime diagrams. Indeed, on the one hand cell ψ(x, t + 1) of Fig-2c needs have different-color subcells, as it is a G ϕ (x, t + 1) of that of the other diagrams, and G ϕ (x, t + 1) conserves samecolorness. But, on the other hand, cell ψ(x, t + 1) of Fig-2c needs have same-color subcells, as it is produced by a W which is fed with same-color subcells-due to the particular choice of ϕ(x−1, t) and ϕ(x+1, t)-and since W conserves same-colorness. This cannot be fixed with a better choice of ϕ(x, t + 1). Therefore, our previously defined RCA fails to verify the gauge-invariance condition. The gauging procedure proceeds by extending R into an inhomogeneous dynamics.

The gauge field
Introducing the gauge field. In order to obtain the gauge-invariance condition (1), the standard procedure is to make the theory R into an inhomogeneous theory R • , and aim at inhomogeneous gauge-invariance: The spacetime diagram A, which specifies the spacetime dependency of R, is referred to as the gauge field, or Ehresmann connection in mathematics. Back to our running example, we are thus looking for an extension of R into an R A and of G ϕ , so that it acts on both ψ and A, in order to achieve condition (2). Developing, we need that there exists Z such that for all Z-valid ϕ, for all A, for all R A -valid ψ, for all x, which, for our running example, translates into : This is equivalent to A somewhat minimal choice verifying the above condition is to take A : Z 2 → Z 2 2 a 2-bits field, and with A transforming under G ϕ as : Indeed, It follows that the induced R • verifies the inhomogeneous gauge-invariance condition (2). This procedure is reminiscent of the route physics follows to account for a local phase transformation on the state vector ψ(x, t), which leads to the modern formulation of electrodynamics, with A(x, t) playing the role of the electromagnetic potential.
Invariant of the gauge field. Since A also transforms under G ϕ , we may again seek to characterize its invariant A = {G ϕ A | ϕ ∈ Z 2 → Z 2 } by means of some field F . This time, in order to do so, we introduce the light-like discrete derivatives fully characterizes the invariant of the gauge field. More precisely, for any A and A ′ , there exists ϕ such that

Proof.
A lengthy but easy computation shows that, given any A and A ′ , The converse is harder to prove, but also true. Indeed, suppose that we are given A and A ′ such that F = F ′ . We want to construct a ϕ such that G ϕ A = A ′ , i.e. such that we have both Clearly, starting from an initial spacelike configuration ϕ, the requirements (3) fix the rest of ϕ across spacetime. Unless they conflict. This could happen every time we close up a square. Starting from ϕ(x, t), say, the requirements (3) provide two prescriptions for ϕ(x, t + 2), namely ϕ(x, t) + 1) via the right-then-left path. These need be equal, i.e we need which is our hypothesis. It follows that ϕ exists and so the converse holds. F fully characterizes A.
The role played by this discrete bit-field F is analogous to that of the electromagnetic tensor, a differential 2-form, which is the exterior derivative of the electromagnetic potential A(x, t) and whose derivatives are prescribed by the Maxwell equations.
ψ(x, t + 1) Al Ar Gauge field physics. It is crucial to understand that, even though A was introduced just to enforce a symmetry, i.e. to make sure that physically equivalent states are mapped into physically equivalent states. . . this newly introduced A is also capable of a range of other things, i.e. it produces new physics. For instance, Fig-4 shows how, starting from the same initial conditions for J, but choosing different initial conditions for A, can lead to rather different R A -valid spacetime diagrams-which may (Fig-4c) or may not be (Fig-4d) related by a G φ . At this stage we can have two points of view upon A. Either A is seen as an independent field, which could be to some extent tuned by the user/experimentalist (e.g. in the case of the electromagnetism, one can physically engineer each component of the electromagnetic tensor, F , namely the electric and the magnetic field). Or we must extend the configuration space so as to account for A, as suggested by Fig-3. Of course if we do that we need to provide a dynamics for A, i.e. we need to look for a theory T upon c(x, t) = (ψ(x, t), A(x, t)), which still verifies the gauge-invariance condition (1).
Observe that the J field is as in (a). Observe that the J field differs from that of (a).

Fig. 4: Examples of the influence of F , S • and S •
Gauge equivalence of two theories. We need to keep in mind that by its very nature, such a T cannot be unique-in the sense that for every candidate T there will be several other physically equivalent local rules. This is because, as T fully implements the local symmetry, it is inherently redundant, and thus equivalent to other theories up to this redundancy. This definition ensures that given theory T and some input configuration c(., t), we can always encode the input as G ϕ(.,t) c(., t), and have it evolve under T ′ , so as to retrieve G ϕ(.,t+1) c(., t + 1), which is physically equivalent to c(., t + 1). We will now build candidate theories T and T ′ by following the standard steps of the gauging procedure.

Gauge field dynamics
Dynamics of the invariant of the gauge field. The dynamics T we want to build takes c(., t) as input and outputs c(., t + 1). However, we already have R • which takes c(., t) = (ψ(., t), A(., t)) and outputs ψ(., t + 1). Therefore, all we need is a rule S • that takes c(., t) and outputs A(., t + 1). The standard procedure indeed proceeds by decomposing T into R • and S • . For such a T to verify (1), we just need S • to verify (2), for the same G ϕ and Z that work for R • .
The procedure goes in two steps. The first step is to prescribe a dynamics S not over A, but over its invariant A, which in our case amounts to a dynamics over F . It may even be a J-dependent dynamics S • . Such a dynamics will be gauge-invariant by definition, since F and J are gauge-invariant. Thus the particular choice of S • is only dictated by the phenomena that we wish to model. A simple choice, for instance, is to take S to be the identity. Then, if initially we had F = 0 initially, this will remain the case. Beware that this does not mean that the behaviour of the underlying A will be trivial. In fact it will remain largely undetermined, as F = 0 just means ∆ r A l (x, t) = ∆ l A r (x, t). But at least this constraint over the dynamics of A is gauge-invariant. Fig-4a, 4b,4c give examples of different A that have F = 0-illustrating how many different gauge fields can arise from the same prescription for the invariant. Thus, this first step does not suffice to prescribe S • . Hence the need for a second step called gauge-fixing.
Gauge-fixing : completing the dynamics. Gauge-fixing means choosing an actual S • which induces the S • that we had settled for in the first step. In our case, we need to fix an S • such that for all (ψ, A), if A is an S ψ -valid spacetime diagram, then F is a S J -valid spacetime diagram, with F and J computed from A and ψ. It is crucial to understand that this time the choice of a particular S • is not dictated by the physics, but by mere convenience. This assertion relies on the following proposition.
Proposition 1 (Gauge-fixing soundness). Let R • be an A-dependent inhomogeneous theory upon ψ, with respect to a given G ϕ and Z. Let S • and S ′ • be two ψ-dependent inhomogeneous gauge-invariant theories upon A, with respect to the same G ϕ and Z. If the two theories induce the same S • , then:

For any A an S ψ -valid spacetime diagram, there exists ϕ such that
• are physically equivalent theories.
Proof. 1. S • and S ′ • induce the same S • . Giving A an S • -valid field also gives F an S • -valid field. We can then build A ′ an S ′ • -valid field, inducing the same F . This is done using an initial condition for A ′ which gives F (., 0). When evolving with S ′ • , F will evolve with S ′ A . Using remark-1 which says that given A and A ′ inducing the same F , there exists ϕ such that A ′ = G ϕ A, we prove Fact 1 by applying such a G ϕ to c = (ψ, A). Thus we have built a ϕ such that A ′ is an S ′ ψ ′ -valid spacetime diagram with (ψ ′ , A ′ ) = G ϕ (ψ, A). 2. We can now prove Fact 2. Given c = (ψ, A) a T -valid spacetime diagram, consider A on its own. A is an S ψ -valid spacetime diagram. But since S • and S ′ • both implement S • , there exists ϕ such that A ′ = G ϕ A is an S ′ Gϕψ -valid spacetime diagram (Fact 1). Apply this G ϕ to the whole of c = (ψ, A). This yields some c ′ = (ψ ′ , A ′ ). Is c ′ a T ′ -valid spacetime diagram? Yes, because: A ′ is an S ′ ψ ′ -valid spacetime diagram by construction and since ψ is an R A -valid spacetime diagram, ψ ′ is an R A ′ -valid spacetime diagram due to R • gauge-invariance. Hence T and T ′ are physically equivalent theories.
Hence, different dynamics S • can be used to describe the same physics, and choosing between them is a matter of convenience. To illustrate this point, we refer again to Fig-4. In this figure, we can see that sub-figures 4a, 4b, 4c are physically equivalent, the same gauge-field invariant F = 0 is used. But sub-figure 4b shows that we do have a degree of freedom on S ψ .
Gauge-constraining : removing redundancies. Now that we fully described our gaugeinvariant theory T , we find ourselves confronted with its inherent redundancies-the ones arising precisely from the gauge-symmetry we just managed to implement. Indeed, any two G ϕ -related initial configurations, lead to physically equivalent solutions-as shown in Fig-(4a and 4c). At this stage, and only now that the symmetry has been implemented, we may wish to remove its induced redundancies by suitably restricting the space of configurations. This is usually done by imposing some local constraints directly on the field c(x, t), referred to as gauge-constraining. However we must keep in mind that constraining c(x, t) could potentially restrict the set of physical solutions available. One must therefore check that a gauge-invariant theory T , and its gaugeconstrained version T ′′ , remain physically equivalent theories in the sense of Def. 3.

Conclusion
Summary. The paper followed a discrete counterpart to the gauging procedure, which aims to enforce a local symmetry that was judged missing in some physical theory.
Here, theories were captured as Cellular Automata (CA), and local symmetries as local transformations G ϕ of the spacetime diagrams c of these CA. Gauge-invariance was formulated as a concrete condition (1), which directly translates into a local constraint upon the local rule of the theory. It was shown how, starting from a homogeneous nongauge-invariant theory R over configurations ψ(., t), one gets to an A(x, t)-dependent inhomogeneous gauge-invariant theory R • , and completes this with a ψ(x, t)-dependent gauge-invariant theory S • over configurations A(., t), in order to finally obtain a homogeneous gauge-invariant theory T = R • ∪S • over configurations c(., t) = (ψ(., t), A(., t)). The acquired gauge-symmetry then leads to equivalent theories T ′ -equivalent up to the symmetry. A way to go from a T to some equivalent T ′ is to replace S • by some S ′ • whose spacetime diagrams are G ϕ -related-this is called gauge-fixing. Theory equivalence and gauge-fixing were formalized, the fact that the latter respects the former was proven. Moreover, one can sometimes find an equivalent theory on a reduced configuration space c(., t), which can be understood as a canonical representant of c(., t) under the symmetry-this is called gauge-constraining.
Motivations.These were twofold: (i) Porting the gauge theoretical tools and concepts to Computer Science, as methods for constructing nature-inspired CA; providing more accurate schemes for numerical analysis; providing quantum simulation algorithms; making spatially distributed (quantum) computation immune to local errors. (ii) Clarifying the gauge theoretical concepts through the simplicity and rigor brought by Discrete Mathematics; providing the most direct route to its core, i.e. without reference to quantum mechanics and least action principle.
Related works. A number of discrete counterparts to physics symmetries have been reformulated in terms of CA, including reversibility, Lorentz-covariance [10], conservations laws and invariants [11], but no gauge symmetry. To our knowledge the closest work is the colour-blind CA construction [12] which implements a global colour symmetry without porting it to the local scale. However gauge symmetries have been implemented in the one-particle sector of Quantum CA, a.k.a for Quantum Walks. Indeed, one of the authors had followed a similar procedure in order to introduce the electromagnetic gauge field [13], and that of the weak and strong interactions [14,15]. This again was done in the very fabric of the Quantum Walk and the associated symmetry was therefore an intrinsic property of the Quantum Walk. But the gauge field would remain continuous, and seen as an external field. There are, of course, numerous other approaches to space-discretized gauge theories, the main ones being Lattice Gauge Theory [16] and the Quantum Link Model [17], which were phrased in terms of Quantum Computation-friendly terms through Tensor Networks [18] and can be linked in a unified framework [19]. Discretized gauge-theories have also arisen from Ising models [19,20]. All of these approaches, however, begin with a well-known continuous gauge theory which is then space-discretized-time is usually kept continuous. An interesting attempt to quantum discretize gauge theories in discrete time, on a general simplicial complex can be found in [21].
Perspectives. We believe that the hereby developed methodology is ready to be applied to Quantum CA (QCA) [22], so as to obtain discretized free and interacting Quantum Field Theories [23]. Such discretized theories are of interest in Physics especially in non-perturbative theories [24], but they also represent practical assets as quantum simulation algorithms, i.e. numerical schemes that run on Quantum Computers to efficiently simulate interacting fundamental particles-a task which is beyond the capabilities of classical computers. This is ongoing work.