Mechanical position is used to control the wavelength of light emission of semiconductor heterostructures. The heterostructures are coupled across a gap that varies with position to tune electron states in much the same manner that optical cavities can be coupled across a tunable reflectivity mirror to control photon states. In the experiments, a SixN/InP cantilever containing an InGaAs surface well collapses over another InGaAs quantum well. The spacing between the wells varies along the cantilever, such that the heterostructure band gap is determined by the mechanical bending of the cantilever. Photoluminescence measurements of the coupled 200°A surface wells show a wavelength shift of up to 22 nm. Associated theory shows that mechanical quantum coupling enables interband or intersubband devices with unprecedented spectral tuning ranges for gain or absorption.