User-specified random sampling of quantum channels and its applications