  Probabilities of photon counts at the output of a multiport optical device
are generalised for optical sources of arbitrary quantum states in partially
distinguishable optical modes. For the single-mode photon sources, the
generating function for the probabilities is a linear combination of the matrix
permanents of positive semi-definite Hermitian matrices, where each Hermitian
matrix is a Hadamard product of a submatrix of the multiport matrix and a
Hermitian matrix describing partial distinguishability. For the multi-mode
sources the generating function is given by an integral of the Husimi functions
of the sources. When each photon source outputs exactly a Fock state, the
obtained expression reduces to the probability formula derived for partially
distinguishable photons, \textit{Physical Review A \textbf{91}, 013844 (2015)}.
The derived probability formula can be useful in analysing experiments with
partially distinguishable sources and error bounds of experimental Boson
Sampling devices.
