Consider a molecule with alternating single and double bonds between carbon atoms, such that multiple resonant configurations are possible, e.g. beta-carotene. While using UToko's edx course about quantum mechanics of molecules, I heard that this emergent system of delocalized electrons formed by the mixing of pi bonds from the double bonds can be modeled as a particle in a box (lecture 1.5, https://courses.edx.org/courses/course-v1:UTokyoX+UTokyo003x+1T2016/course/). He then proceeds to model each of the 22 shared electrons from carotene's conjugated pi bond system as an electron in each of the 22 lowest energy states of a particle in a box.
Why do all electrons get placed in different energy levels? Is it something to do with degeneracy? Is it that once you already have one electron in those orbitals, it takes more energy to add the second electron, and then more energy for the third? Or is there something else going on?
Sorry if the description is unclear. I don't understand what he's doing, so my description may not even be accurate. But I have attached the link to the course and video (it's free but it needs an edx account, which does not need payment information), so I hope that the confusing part of the lecture is indicated clearly.