Identification of malfunctioning quantum devices