A particular example is produced to prove that quantum walks can be used to simulate full-fledged discrete gauge theories. A family of two-dimensional walks is introduced and its continuous limit is shown to coincide with the dynamics of a Dirac fermion coupled to arbitrary electromagnetic fields. The electromagnetic interpretation is extended beyond the continuous limit by proving that these discrete-time quantum walks (DTQWs) exhibit an exact discrete local U(1) gauge invariance and possess a discrete gauge-invariant conserved current. A discrete gauge-invariant electromagnetic field is also constructed and that field is coupled to the conserved current by a discrete generalization of Maxwell equations. The dynamics of the DTQWs under crossed electric and magnetic fields is finally explored outside the continuous limit by numerical simulations. Bloch oscillations and the so-called $\mathbf{E}\ifmmode\times\else\texttimes\fi{}\mathbf{B}$ drift are recovered in the weak-field limit. Localization is observed for some values of the gauge fields.
A family of discrete-time quantum walks (DTQWs) on the line with an exact discrete
U(N) gauge invariance is introduced. It is shown that the continuous limit of these DTQWs, when it exists, coincides with the dynamics of a Dirac fermion coupled to usual
U(N) gauge fields in two-dimensional spacetime. A discrete generalization of the usual
U(N) curvature is also constructed. An alternate interpretation of these results in terms of superimposed
U(1) Maxwell fields and
SU(N) gauge fields is discussed in the Appendix. Numerical simulations are also presented, which explore the convergence of the DTQWs towards their continuous limit and which also compare the DTQWs with classical (i.e., nonquantum) motions in classical
SU(2) fields. The results presented in this paper constitute a first step towards quantum simulations of generic Yang-Mills gauge theories through DTQWs.