Perform a sequence of gates contained within a program.

        :param program: The program
        :return: self

def do_program(self, program: Program) -> 'AbstractQuantumSimulator':
        """
        Perform a sequence of gates contained within a program.

        :param program: The program
        :return: self
        """
        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