  The performance of superconducting microwave circuits is strongly influenced
by the material properties of the superconducting film and substrate. While
progress has been made in understanding the importance of surface preparation
and the effect of surface oxides, the complex effect of superconductor film
structure on microwave losses is not yet fully understood. In this study, we
investigate the microwave properties of niobium resonators with different
crystalline properties and related surface topographies. We analyze a series of
magnetron sputtered films in which the Nb crystal orientation and surface
topography are changed by varying the substrate temperatures between room
temperature and 975 K. The lowest-loss resonators that we measure have quality
factors of over one million at single-photon powers, among the best ever
recorded using the Nb on sapphire platform. We observe the highest quality
factors in films grown at an intermediate temperature regime of the growth
series (550 K) where the films display both preferential ordering of the
crystal domains and low surface roughness. Furthermore, we analyze the
temperature-dependent behavior of our resonators to learn about how the
quasiparticle density in the Nb film is affected by the niobium crystal
structure and the presence of grain boundaries. Our results stress the
connection between the crystal structure of superconducting films and the loss
mechanisms suffered by the resonators and demonstrate that even a moderate
change in temperature during thin film deposition can significantly affect the
resulting quality factors.
