Optical probing and manipulation of electron quantum states in semiconductors at the nanoscale are key to developing future nanophotonic devices which are capable of ultrafast and low-power operation (Ohtsu et al. in IEEE J. Sel. Top. Quantum Electron. 8:839, 2002). To optimize device performance and to go far beyond conventional devices based on the far-field optics, the degree to which the electron and light are confined must be properly designed and engineered. This is because while stronger confinement of the electron is lets us use its quantum nature, its interaction with light becomes weaker with reduction of the confinement volume. To maximize their interaction, we need the overlap in scale between confinement volume of electron and that of light. More generally, the spatial profile of the light field should be designed to match that of electron wavefunction in terms of phase as well as amplitude.