The problem of an optimal mapping between Hilbert spaces IN and OUT, based on a series of density matrix mapping measurements ρ^{(l)}→ϱ^{(l)}, l=1⋯M, is formulated as an optimization problem maximizing the total fidelity F=∑_{l=1}^{M}ω^{(l)}F(ϱ^{(l)},∑... ...