A Hierarchy of Deviation from Complete Positivity and Optimal Entanglement Witnesses
We introduce the \emph{CP-distance} to quantify the deviation of Hermitian linear maps from complete positivity, defined as the minimal depolarizing noise required to render a map completely positive. We derive a closed spectral formula for this distance and extend the framework to \emph{directional robustness} against arbitrary completely positive maps, establishing stability and tensor-product properties. Expanding this to the intermediate cones of $k$-positive maps, we introduce a \emph{hierarchy of deviation}, $d_k(Φ)$. We derive a spectral formula for $d_k$ based on entanglement depth and demonstrate that it serves as an optimal threshold for certifying Schmidt numbers, allowing for the universal construction of dimension-sensitive entanglement witnesses.