  The emergence of a collective behavior in a many-body system is responsible
of the quantum criticality separating different phases of matter. Interacting
spin systems in a magnetic field offer a tantalizing opportunity to test
different approaches to study quantum phase transitions. In this work, we
exploit the new resources offered by quantum algorithms to detect the quantum
critical behaviour of fully connected spin$-1/2$ models. We define a suitable
Hamiltonian depending on an internal anisotropy parameter $\gamma,$ that allows
us to examine three paradigmatic examples of spin models, whose lattice is a
fully connected graph. We propose a method based on variational algorithms run
on superconducting transmon qubits to detect the critical behavior for systems
of finite size. We evaluate the energy gap between the first excited state and
the ground state, the magnetization along the easy-axis of the system, and the
spin-spin correlations. We finally report a discussion about the feasibility of
scaling such approach on a real quantum device for a system having a dimension
such that classical simulations start requiring significant resources.
