Qudit stabilizer codes for ZN lattice gauge theories with matter

In this work we extend the connection between Quantum Error Correction (QEC) and Lattice Gauge Theories (LGTs) by showing that a \(ZN\) gauge theory with prime dimension \(N\) coupled to dynamical matter can be expressed as a qudit stabilizer code. Using the stabilizer formalism we show how to formulate an exact mapping of the encoded \(ZN\) gauge theory onto two different bosonic models, uncovering a logical duality generated by error correction itself. From this perspective, quantum error correction provides a unifying language to expose dual descriptions of lattice gauge theories. In addition, we generalize earlier \(Z2\) constructions on qubits to \(ZN\) on \(N\)-level qudits and demonstrate how universal fault-tolerant gates can be implemented via state injection between compatible qudit codes.