  We report on controlled growth of photochromic yttrium oxyhydride thin films
monitored by $\textit{in-situ}$ composition depth profiling. Films were grown
by reactive $e^-$-beam evaporation and subsequently oxidized, while
simultaneously tracking the oxygen and hydrogen concentrations. Sample
composition and photochromic response were characterized $\textit{in-situ}$
using non destructive ion beam analysis and image analysis, respectively - as
well as complementary $\textit{ex-situ}$ ion beam methods, X-ray diffraction
and optical spectrophotometry. We show that photochromic yttrium oxyhydride can
be grown as yttrium dihydride, which is then oxidized to O/H ratios triggering
the photochromic response.
