Confinement of quarks due to the strong interaction and the deconfinement at
high temperatures and high densities are a basic paradigm for understanding the
nuclear matter. Their simulation, however, is very challenging for classical
computers due to the sign problem of solving equilibrium states of
finite-temperature quantum chromodynamical systems at finite density. In this
paper, we propose a variational approach, using the lattice Schwinger model, to
simulate the confinement or deconfinement by investigating the string tension.
We adopt an ansatz that the string tension can be evaluated without referring
to quantum protocols for measuring the entropy in the free energy. Results of
numeral simulation show that the string tension decreases both along the
increasing of the temperature and the chemical potential, which can be an
analog of the phase diagram of QCD. Our work paves a way for exploiting
near-term quantum computers for investigating the phase diagram of
finite-temperature and finite density for nuclear matters