Abstract: Feedback loops are central in most classical control procedures. A controller compares the signal measured by a sensor with the target value. It then adjusts an actuator to bring the signal close to the target value. Generalizing this scheme to the quantum world must overcome a fundamental difficulty: the sensor measurement causes a random back-action on the system. I will present how we have been able to continuously operate a quantum feedback loop stabilizing photon number states in a very high finesse Fabry-Perot cavity. Circular Rydberg atoms repeatedly achieve weak quantum non-demolition measurements of the photon number. A classical computer estimates in real-time the density matrix of the field, based on the outcome of these measurements, and taking into account all known experimental imperfections. It then calculates the amplitude of small classical microwave fields injected into the cavity to bring the field into the target state. We have been able to prepare on demand and stabilize Fock states containing from 1 to 4 photons. This achievement opens interesting perspectives for the production and control of non-classical states for quantum information processing.