This paper explores the performance of quantum communication systems in the presence of noise and focuses on finding the optimal encoding for maximizing the classical communication rate, approaching the classical capacity in some scenarios. Instead of theoretically bounding the ultimate capacity of the channel, we adopt a signal-processing perspective to estimate the achievable performance of a physically available but otherwise unknown quantum channel. By employing a variational algorithm to estimate the trace distance between quantum states, we numerically determine the optimal encoding protocol for the amplitude damping and Pauli channels. Our simulations demonstrate the convergence and accuracy of the method with a few iterations, confirming that optimal conditions for binary quantum communication systems can be variationally determined with minimal computation. Further, since the channel knowledge is not required at the transmitter or at the receiver, these results can be employed in arbitrary quantum communication systems, including satellite-based communication systems, a particularly relevant platform for the quantum Internet.