Abstract
By leveraging quantum effects, such as superposition and entanglement, quantum metrology promises higher precision than classical strategies. It is, however, a challenging task to achieve the higher precision on practical systems. This is mainly due to difficulties in engineering nonclassical states and performing nontrivial measurements on the system, especially when the number of particles is large. Here we propose a variational scheme with the Loschmidt echo for quantum metrology. By utilizing hardware-efficient ansatzes in the design of variational quantum circuits, the quantum Fisher information (QFI) of the probe state can be extracted from the experimentally measured Loschmidt echo in a scalable manner. This QFI is then used to guide the online optimization of the preparation of the probe state. We experimentally implement the scheme on an ensemble of 10-spin quantum processors and achieve a 12.4-dB enhancement of the measurement precision over the uncorrelated states, which is close to the theoretical limit. The scheme can also be employed on various other noisy intermediate-scale quantum devices, which provides a promising protocol to demonstrate quantum advantages.