Cross-sectional scanning tunneling microscopy has been used to study variations in the source gas switching sequences in lattice-matched InGaAs/InP heterostructures grown by chemical beam epitaxy. Using finite element analysis, changes in well–barrier interface strain can be understood in terms of As/P exchange and As memory effect in the growth chamber. Results from annealed samples indicate a greater interdiffusion of group-V species than group-III species.