  For the certification and benchmarking of medium-size quantum devices
efficient methods to characterize entanglement are needed. In this context, it
has been shown that locally randomized measurements on a multiparticle quantum
system can be used to obtain valuable information on the so-called moments of
the partially transposed quantum state. This allows one to infer some
separability properties of a state, but how to use the given information in an
optimal and systematic manner has yet to be determined. We propose two general
entanglement detection methods based on the moments of the partially transposed
density matrix. The first method is based on the Hankel matrices and provides a
family of entanglement criteria, of which the lowest order reduces to the known
$p_3$-PPT criterion proposed in A. Elben et al. [Phys. Rev. Lett. 125, 200501
(2020)]. The second method is optimal and gives necessary and sufficient
conditions for entanglement based on some moments of the partially transposed
density matrix.
