  Optimal encoding of classical data for statistical inference using quantum
computing is investigated. A universal encoder is sought that is optimal for a
wide array of statistical inference tasks. Accuracy of any statistical
inference is shown to be upper bounded by a term that is proportional to
maximal quantum leakage from the classical data, i.e., the input to the
inference model, through its quantum encoding. This demonstrates that the
maximal quantum leakage is a universal measure of the quality of the encoding
strategy for statistical inference as it only depends on the quantum encoding
of the data and not the inference task itself. The optimal universal encoding
strategy, i.e., the encoding strategy that maximizes the maximal quantum
leakage, is proved to be attained by pure states. When there are enough qubits,
basis encoding is proved to be universally optimal. An iterative method for
numerically computing the optimal universal encoding strategy is presented.
