We present a method for the determination of the completely positive (CP) m
ap describing a physical device based on random preparation of the input st
ates, random measurements at the output, and the maximum-likelihood princip
le. In the numerical implementation the constraint of completely positivity
can be imposed by exploiting the isomorphism between linear transformation
s from Hilbert spaces H to K and linear operators in K circle timesH. The e
ffectiveness of the method is shown on the basis of some examples of recons
truction of CP maps related to quantum communication channels for qubits.