A Microscopic Theory Of Quantum Well Photovoltaics