Most stars become white dwarfs when they reach the end of their stellar life cycle. Astrophysicists determine what elements are present in these collapsed stars by comparing spectra observed from space against either experimentally re-created spectra measured in laboratories on Earth or theoretical spectra generated using computer models based on quantum-chemical principles. Over time, they have found that white dwarfs not only contain elements like hydrogen and helium, but also oxygen, silicon, phosphorous, carbon and carbon-containing compounds.