The k·p method describes the motion of electrons and holes in a periodic potential through effective-mass-like equations around the band edge. Where degenerate bands are involved, the description becomes a coupled set of differential equations rather than a single equation. The 4×4, 6×6 and 8×8 options correspond to how many bands are included in that coupled set.
In a quantum well, these equations are solved under the confinement potential along the growth direction to obtain the subband levels and envelope functions — that is, the electron and hole states. The growth direction is discretised by finite differences and the in-plane response is assumed isotropic. Strain enters the Hamiltonian through the deformation potential and shifts the band edges and the effective masses.
Gain is then derived from the optical transitions between the electronic states obtained in this way. Using the transition matrix elements between conduction-band and valence-band states, together with the occupation probabilities under the quasi-Fermi levels set by the carrier density, the stimulated and spontaneous emission coefficients are calculated separately for TE and TM. Intraband scattering is applied as a Lorentzian broadening. The change in refractive index follows from the resulting spectra through the Kramers–Kronig relations.