Statistics for Quantum Information Processing with Adversarial Devices