Quantum dots (QDs, i.e., semiconductor nanocrystals) can be formed by spontaneous self-assembly during epitaxial growth of lattice-mismatched semiconductor systems. InAs QDs embedded in GaInAsP on InP are introduced, which can be continuously wavelength-tuned over the 1.55 μm region by inserting ultrathin GaAs or GaP interlayers below them. We subsequently introduce a state-filling optical nonlinearity, which only requires two electron–hole pairs per QD. We employ this nonlinearity for all-optical switching using a Mach–Zehnder interferometric switch. We find a switching energy as low as 6 fJ.