  Leakage out of the computational subspace is a major limitation of current
state-of-the-art neutral-atom quantum computers and a significant challenge for
scalable systems. In a quantum processor with cesium atoms, we demonstrate
proof-of-principle circuit-based conversion of leakage errors to erasure errors
via Leakage Detection Units (LDUs), which non-destructively map information
about the presence or absence of the qubit onto the state of an ancilla. With a
standard LDU circuit, we successfully convert leakage errors to erasure errors
for all major leakage pathways while preserving the quantum information in the
case that no leakage occurred. We benchmark the performance of the LDU using a
three-outcome low-loss state detection method and also explore the advantages
of three-outcome measurements for LDUs. We find that the LDU detects atom-loss
errors with ~93.4% accuracy, limited by technical imperfections of our
apparatus. We further compile and execute a SWAP LDU, wherein the roles of the
original data atom and ancilla atom are exchanged under the action of the LDU,
providing 'free refilling' of atoms in the case of leakage errors. This
circuit-based leakage-to-erasure error conversion is a critical component of a
neutral-atom quantum processor where the quantum information may significantly
outlive the lifetime of any individual atom in the quantum register.
