  Engineering quantum states of light represents a crucial task in the vast
majority of photonic quantum technology applications. Direct manipulation of
the number of photons in the light signal, such as single-photon subtraction
and addition, proved to be an efficient strategy for the task. Here we propose
an adaptive multi-photon subtraction scheme where a particular subtraction task
is conditioned by all previous subtraction events in order to maximize the
probability of successful subtraction. We theoretically illustrate this
technique on the model example of conversion of Fock states via photon
subtraction. We also experimentally demonstrate the core building block of the
proposal by implementing a feedforward-assisted conversion of two-photon state
to a single-photon state. Our experiment combines two elementary photon
subtraction blocks where the splitting ratio of the second subtraction beam
splitter is affected by the measurement result from the first subtraction block
in real time using an ultra-fast feedforward loop. The reported optimized
photon subtraction scheme applies to a broad range of photonic states,
including highly nonclassical Fock states and squeezed light, advancing the
photonic quantum toolbox.
