Use the standard toric code convention
An open string anticommutes with at its endpoints and creates the electric particles there; an open dual-lattice string creates magnetic particles at its endpoint plaquettes. Joining two strings cancels every shared Pauli because . Bringing two identical endpoints together therefore annihilates them:
Taking around makes its closed string cross the string ending on once. At that crossing , so the state acquires . The same argument with the roles reversed gives
Identical strings commute with one another, as do identical strings. Their exchanges can be deformed without a crossing between anticommuting operators, so . Thus and are bosons and are mutual semions, as summarized by the surface-code anyon model.
On the square lattice the PEPO intertwines the local operators as
Its image also obeys the automatic zero-flux constraints . Thus the transverse-field Ising Hamiltonian maps to a lattice-gauge Hamiltonian generated by edge fields and stars in the zero-flux sector.
At the commuting-projector fixed point, promoting the image constraints to energetic terms gives
the toric code Hamiltonian. Conversely, within a simply connected zero-flux sector one may solve and recover vertex Ising variables. On a torus, the remaining noncontractible loop eigenvalues correspond to the different Ising boundary twists, which accounts for the toric code's topological ground-state sectors.
Let denote the dual edge variable. The PEPO implements the domain-wall map
Because edge domain walls arise from vertex spins, their product around every plaquette is constrained:
Thus the transverse-field Ising operators map to the lattice-gauge operators, while the image is projected into the positive eigenspace of all . At the commuting-projector fixed point, adjoining these automatic projectors gives
the toric code Hamiltonian. Conversely, solving the zero-flux constraint writes locally and recovers the Ising variables, establishing the duality on the supported symmetry sectors.
The original Ising symmetry is the global spin flip
The dual system has a one-form symmetry generated by products of edge Pauli operators along closed noncontractible loops; equivalently, closed Wilson loops label its electric and magnetic topological sectors.
The PEPO annihilates the nonsymmetric Ising sector because each virtual index is summed with the global parity constraint. On the dual side it has support only on configurations obeying all contractible zero-flux constraints and, for a fixed untwisted PEPO, one choice of noncontractible loop eigenvalues. Therefore the duality is invertible only after restricting both Hilbert spaces to corresponding symmetry sectors.
On a torus the toric code has four ground states distinguished by two independent noncontractible loop eigenvalues. A single untwisted duality operator reaches only one of them; inserting the two possible Ising twists supplies the other three. This explains why the global-symmetry Ising description and topologically degenerate toric-code description do not contradict each other.