code: def validate_protoquil(program: Program) -> None:
      
      valid_instruction_types = tuple([Pragma, Declare, Halt, Gate, Reset, ResetQubit, Measurement])
      for instr in program.instructions:
          if not isinstance(instr, valid_instruction_types):
              # Instructions like MOVE, NOT, JUMP, JUMP-UNLESS will fail here
              raise ValueError(f"ProtoQuil validation failed: {instr} is not allowed.")
docs: Ensure that a program is valid ProtoQuil, otherwise raise a ValueError.
      Protoquil is a subset of Quil which excludes control flow and classical instructions.
  
      :param program: The Quil program to validate.