  Motivated by the recent success of realizing the topologically ordered ground
state of the exactly solvable toric code model by a quantum circuit on the real
quantum device [K. J. Satzinger {\it et al}., Science \textbf{374}, 1237
(2021)], here we propose a parametrized quantum circuit (PQC) with the same
real-device-performable optimal structure to represent quantum loop gas states
with adjustably weighted loop configurations. Combining such a PQC with the
variational quantum eigensolver, we obtain the accurate quantum circuit
representation for the toric code model in an external magnetic field with any
field strength, where the system is not exactly solvable. The topological
quantum phase transition in this system is further observed in the optimized
circuits by measuring the magnetization and topological entanglement entropy.
