  Nanoscale magnetic resonance imaging (NanoMRI) is an active area of applied
research with potential use in structural biology and quantum engineering. The
success of this technological vision hinges on improving the instrument's
sensitivity and functionality. A particular challenge is the optimization of
the magnetic field gradient required for spatial encoding, and of the
radio-frequency field used for spin control, in analogy to the components used
in clinical MRI. In this work, we present the fabrication and characterization
of a magnet-in-microstrip device that yields a compact form factor for both
elements. We find that our design leads to a number of advantages, among them a
fourfold increase of the magnetic field gradient compared to those achieved
with traditional fabrication methods. Our results can be useful for boosting
the efficiency of a variety of different experimental arrangements and
detection principles in the field of NanoMRI.
