  Optically active defects in solids with accessible spin states are promising
candidates for solid state quantum information and sensing applications. To
employ these defects as quantum building blocks, coherent manipulation of their
spin state is required. Here we realize coherent control of ensembles of boron
vacancy (V$_B^-$) centers in hexagonal boron nitride (hBN). Specifically, by
applying pulsed spin resonance protocols, we measure spin-lattice relaxation
time ($T_1$) of 18 $\mu$s and spin coherence time ($T_2$) of 2 $\mu$s at room
temperature. The spin-lattice relaxation time increases by three orders of
magnitude at cryogenic temperature. Furthermore, employing a two- and
three-pulse electron spin-echo envelope modulation (ESEEM) we separate the
quadrupole and hyperfine interactions with the surrounding nuclei. Finally, by
applying a method to decouple the spin state from its inhomogeneous nuclear
environment - a "hole-burning" - the spectral optically detected magnetic
resonance linewidth is significantly reduced to several tens of kHz, thus
extending the spin coherence time by a factor of three. Our results are
important for employment of van der Waals materials for quantum technologies,
specifically in the context of using hBN as a high-resolution quantum sensor
for hybrid quantum systems including 2D heterostructures, nanoscale devices and
emerging atomically thin magnets.
