Understanding quantum phase transitions in physical systems is fundamental to characterize their behavior at low temperatures. Achieving this requires both accessing good approximations to the ground state and identifying order parameters to distinguish different phases. Addressing these challenges, our work introduces a hybrid algorithm that combines quantum optimization with classical machine learning. This approach leverages the capability of near-term quantum computers to prepare locally trapped states through finite optimization. Specifically, we apply LASSO for identifying conventional phase transitions and the Transformer model for topological transitions, utilizing these with a sliding window scan of Hamiltonian parameters to learn appropriate order parameters and locate critical points. We validated the method with numerical simulations and real-hardware experiments on Rigetti’s Ankaa 9Q-1 quantum computer. This protocol provides a framework for investigating quantum phase transitions with shallow circuits, offering enhanced efficiency and, in some settings, higher precision-thus contributing to the broader effort to integrate near-term quantum computing and machine learning.