  Despite the obvious similarities between the metrics used in topological data
analysis and those of optimal transport, an optimal-transport based formalism
to study persistence diagrams and similar topological descriptors has yet to
come. In this article, by considering the space of persistence diagrams as a
space of discrete measures, and by observing that its metrics can be expressed
as optimal partial transport problems, we introduce a generalization of
persistence diagrams, namely Radon measures supported on the upper half plane.
Such measures naturally appear in topological data analysis when considering
continuous representations of persistence diagrams (e.g.\ persistence surfaces)
but also as limits for laws of large numbers on persistence diagrams or as
expectations of probability distributions on the persistence diagrams space. We
explore topological properties of this new space, which will also hold for the
closed subspace of persistence diagrams. New results include a characterization
of convergence with respect to Wasserstein metrics, a geometric description of
barycenters (Fr\'echet means) for any distribution of diagrams, and an
exhaustive description of continuous linear representations of persistence
diagrams. We also showcase the strength of this framework to study random
persistence diagrams by providing several statistical results made meaningful
thanks to this new formalism.
