Carrier capture in quantum wells