  We present a method for the determination of the completely positive (CP) map
describing a physical device based on random preparation of the input states,
random measurements at the output, and maximum-likelihood principle. In the
numerical implementation the constraint of completely positivity can be imposed
by exploiting the isomorphism between linear transformations from Hilbert
spaces $\cal H$ to $\cal K$ and linear operators in ${\cal K}\otimes {\cal H}$.
The effectiveness of the method is shown on the basis of some examples of
reconstruction of CP maps related to quantum communication channels for qubits.
