code: def do_program(self, program: Program) -> 'AbstractQuantumSimulator':
          
          for gate in program:
              if not isinstance(gate, Gate):
                  raise ValueError("Can only compute the simulate a program composed of `Gate`s")
              self.do_gate(gate)
          return self
docs: Perform a sequence of gates contained within a program.
  
          :param program: The program
          :return: self