Copy all the members that live on a Program object.

        :return: a new Program

def copy_everything_except_instructions(self):
        """
        Copy all the members that live on a Program object.

        :return: a new Program
        """
        new_prog = Program()
        new_prog._defined_gates = self._defined_gates.copy()
        if self.native_quil_metadata is not None:
            new_prog.native_quil_metadata = self.native_quil_metadata.copy()
        new_prog.num_shots = self.num_shots
        return new_prog