Adapative quantum optics