code: def load(self, executable):
          
          if self.requires_executable:
              if isinstance(executable, PyQuilExecutableResponse):
                  executable = _extract_program_from_pyquil_executable_response(executable)
              else:
                  raise TypeError("`executable` argument must be a `PyQuilExecutableResponse`. Make "
                                  "sure you have explicitly compiled your program via `qc.compile` "
                                  "or `qc.compiler.native_quil_to_executable(...)` for more "
                                  "fine-grained control. This explicit step is required for running "
                                  "on a QPU.")
          else:
              if isinstance(executable, PyQuilExecutableResponse):
                  executable = _extract_program_from_pyquil_executable_response(executable)
              elif isinstance(executable, Program):
                  pass
              else:
                  raise TypeError("`executable` argument must be a `PyQuilExecutableResponse` or a "
                                  "`Program`. You provided {}".format(type(executable)))
  
          return super().load(executable)
docs: Initialize a QAM and load a program to be executed with a call to :py:func:`run`.
  
          If ``QVM.requires_executable`` is set to ``True``, this function will only load
          :py:class:`PyQuilExecutableResponse` executables. This more closely follows the behavior
          of :py:class:`QPU`. However, the quantum simulator doesn't *actually* need a compiled
          binary executable, so if this flag is set to ``False`` we also accept :py:class:`Program`
          objects.
  
          :param executable: An executable. See the above note for acceptable types.