We study the quantum simulation of Z2 lattice gauge theory in 2+1 dimensions. The dual variable formulation, the so-called Wegner duality, is utilized for reducing redundant gauge degrees of freedom. The problem of artificial charge unconservation is resolved for any charge distribution. As a demonstration, we simulate the real-time evolution of the system with two static electric charges, i.e., with two temporal Wilson lines. Some results obtained by the simulator (with no hardware noise) and the real device (with sizable hardware noise) of a quantum computer are shown.