Quantum fluctuation theorem for error diagnostics in quantum annealers