Similar Items: The Exact Replica Threshold for Nonlinear Moments of Quantum States