  The electronic properties and optical response of ice and water are
intricately shaped by their molecular structure, including the quantum
mechanical nature of hydrogen atoms. In spite of numerous studies appeared over
decades, a comprehensive understanding of the effect of the nuclear quantum
motion on the electronic structure of water and ice at finite temperatures
remains elusive. Here, we utilize molecular simulations that harness the
efficiency of machine-learning potentials and many-body perturbation theory to
assess the impact of nuclear quantum effects on the electronic structure of
water and hexagonal ice. By comparing the results of path-integral and
classical simulations, we find that including nuclear quantum effects leads to
a larger renormalization of the fundamental gap of ice, compared to that of
water, eventually leading to a comparable gap in the two systems, consistent
with experimental estimates. Our calculations suggest that the quantum
fluctuations responsible for an increased delocalization of protons in ice,
relative to water, are a key factor leading to the enhancement of nuclear
quantum effects on the electronic structure of ice.
