  In this work we have synthesised thin films of MgyNi1-y(Hx) metal and metal
hydride with y between 0 and 1. The films are deposited by magnetron
co-sputtering of metallic targets of Mg and Ni. Metallic MgyNi1-y films were
deposited with pure Ar plasma while MgyNi1-yHx hydride films were deposited
reactively with 30% H2 in the Ar plasma. The depositions were done with a fixed
substrate carrier, producing films with a spatial gradient in the Mg and Ni
composition. The combinatorial method of co-sputtering gives an insight into
the phase diagram of MgyNi1-y and MgyNi1-yHx, and allows us to investigate
structural, optical and electrical properties of the resulting alloys. Our
results show that reactive sputtering gives direct deposition of metal hydride
films, with high purity in the case of Mg~2NiH~4. We have observed limited
oxidation after several months of exposure to ambient conditions. MgyNi1-y and
MgyNi1-yHx films might be applied for optical control in smart windows, optical
sensors and as a semiconducting material for photovoltaic solar cells.
