Improvements to the signal-to-noise ratio of magnetic resonance detection lead to a strong reduction
in measurement time, yet as a sole optimization goal for resonator design, it would be an oversimplification of
the problem at hand. Multiple constraints, for example for field homogeneity and sample shape, suggest the use
of numerical optimization to obtain resonator designs that deliver the intended improvement. Here we consider
the 2D Lenz lens to be a sufficiently broadband flux transforming interposer between the sample and a radiofrequency
(RF) circuit and to be a flexible and easily manufacturable device family with which to mediate different
design requirements.We report on a method to apply topology optimization to determine the optimal layout of a
Lenz lens and demonstrate realizations for both low- (45 MHz) and high-frequency (500 MHz) nuclear magnetic
resonance.