  Majorana zero modes in superconductor-nanowire hybrid structures are a
promising candidate for topologically protected qubits with the potential to be
used in scalable structures. Currently, disorder in such Majorana wires is a
major challenge, as it can destroy the topological phase and thus reduce the
yield in the fabrication of Majorana devices. We study machine learning
optimization of a gate array in proximity to a grounded Majorana wire, which
allows us to reliably compensate even strong disorder. We propose a metric for
optimization that is inspired by the topological gap protocol, and which can be
implemented based on measurements of the non-local conductance through the
wire.
