Experimental violations of Leggett-Garg inequalities on a quantum computer