Theory of Quantum System Certification