Efficient preparation of spin-squeezed states is important for
quantum-enhanced metrology. Current protocols for generating strong spin
squeezing rely on either high dimensionality or long-range interactions. A key
challenge is how to generate considerable spin squeezing in one-dimensional
systems with only nearest-neighbor interactions. Here, we develop variational
spin-squeezing algorithms to solve this problem. We consider both digital and
analog quantum circuits for these variational algorithms. After the closed
optimization loop of the variational spin-squeezing algorithms, the generated
squeezing can be comparable to the strongest squeezing created from two-axis
twisting. By analyzing the experimental imperfections, the variational
spin-squeezing algorithms proposed in this work are feasible in recent
developed noisy intermediate-scale quantum computers