  We consider the problem of devising a suitable Quantum Error Correction (QEC)
procedures for a generic quantum noise acting on a quantum circuit. In general,
there is no analytic universal procedure to obtain the encoding and correction
unitary gates, and the problem is even harder if the noise is unknown and has
to be reconstructed. The existing procedures rely on Variational Quantum
Algorithms (VQAs) and are very difficult to train since the size of the
gradient of the cost function decays exponentially with the number of qubits.
We address this problem using a cost function based on the Quantum Wasserstein
distance of order 1 ($QW_1$). At variance with other quantum distances
typically adopted in quantum information processing, $QW_1$ lacks the unitary
invariance property which makes it a suitable tool to avoid to get trapped in
local minima. Focusing on a simple noise model for which an exact QEC solution
is known and can be used as a theoretical benchmark, we run a series of
numerical tests that show how, guiding the VQA search through the $QW_1$, can
indeed significantly increase both the probability of a successful training and
the fidelity of the recovered state, with respect to the results one obtains
when using conventional approaches.
