Preparation of metrological states by variational ansatz. a Schematic of a dipolar-interacting spin ensemble in a 3D-random configuration. b The quantum circuit consists of three parts: a sequence for generating entanglement (entangler), phase accumulation (Ramsey) and single-qubit readout in the Pz basis. Dipolar interactions during Ramsey interference are eliminated by dynamical decoupling. The measurement outcome is processed on a classical computer and used to determine the next generation for θ. c Gate sequence of each variational layer and the Wigner distributions for a 5-spin state after each gate. d Illustration of an optimization process on a 3-spin system with m = 1. The contour plots show the 2D projection of the multidimensional θ space for fixed ϑ1. The orange points mark the sampling positions in the parameter space. Convergence to the global maximum is reached in the 63rd generation.

Spin systems are an attractive candidate for quantum-enhanced metrology. Here we develop a variational method to generate metrological states in small dipolar-interacting spin ensembles with limited qubit control. For both regular and disordered spatial spin configurations the generated states enable sensing beyond the standard quantum limit (SQL) and, for small spin numbers, approach the Heisenberg limit (HL). Depending on the circuit depth and the level of readout noise, the resulting states resemble Greenberger-Horne-Zeilinger (GHZ) states or Spin Squeezed States (SSS). Sensing beyond the SQL holds in the presence of finite spin polarization and a non-Markovian noise environment. The developed black-box optimization techniques for small spin numbers (N ≤ 10) are directly applicable to diamond-based nanoscale field sensing, where the sensor size limits N and conventional squeezing approaches fail. https://doi.org/10.1038/s41534-022-00667-4

Zheng, Tian-Xing; Li, Anran; Rosen, Jude; Zhou, Sisi; Koppenhöfer, Martin; Ma, Ziqi; Chong, Frederic T; Clerk, Aashish A; Jiang, Liang; Maurer, Peter C.