def quil_to_native_quil(self, program: Program) -> Program: request = NativeQuilRequest(quil=program.out(), target_device=self.target_device) response = self.client.call('quil_to_native_quil', request).asdict() # type: Dict nq_program = parse_program(response['quil']) nq_program.native_quil_metadata = response['metadata'] nq_program.num_shots = program.num_shots return nq_program
def quil_to_native_quil(self, program: Program, *, protoquil: Optional[bool] = None) -> Program: self.connect() request = NativeQuilRequest(quil=program.out(), target_device=self.target_device) response = self.client.call("quil_to_native_quil", request, protoquil=protoquil).asdict() nq_program = parse_program(response["quil"]) nq_program.native_quil_metadata = response["metadata"] nq_program.num_shots = program.num_shots return nq_program