The sensitivity and accessible mass range of magnetic resonance searches for axionlike dark matter depends on the homogeneity of applied magnetic fields. Optimizing homogeneity through shimming requires exploring a large parameter space which can be prohibitively time consuming. We have automated the process of tuning the shim-coil currents by employing an algorithm based on Bayesian optimization. This method is especially suited for applications where the duration of a single optimization step prohibits exploring the parameter space extensively or when there is no prior information on the optimal operation point. Using the Cosmic Axion Spin Precession Experiment (CASPEr)-gradient low-field apparatus, we show that for our setup this method converges after approximately 30 iterations to a sub-10 parts-per-million field homogeneity which is desirable for our dark matter search.
@article{arxiv.2309.11614,
title = {Fast shimming algorithm based on Bayesian optimization for magnetic resonance based dark matter search},
author = {Julian Walter and Hendrik Bekker and John Blanchard and Dmitry Budker and Nataniel L. Figueroa and Arne Wickenbrock and Yuzhe Zhang and Pengyu Zhou},
journal= {arXiv preprint arXiv:2309.11614},
year = {2023}
}