Skip to content

Commit

Permalink
Remove noisy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
notmgsk committed Dec 16, 2020
1 parent 14b5bad commit 8e0b0d9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
7 changes: 0 additions & 7 deletions pyquil/api/_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,6 @@ def native_quil_to_executable(
rather than expanding calibrations on the translation service
:return: An (opaque) binary executable
"""
if not self.qpu_compiler_client:
raise UserMessageError(
"It looks like you're trying to compile to an executable, but "
"do not have access to the QPU compiler endpoint. Make sure you "
"are engaged to the QPU before trying to do this."
)

self._connect_qpu_compiler()

nq_program_calibrated = (
Expand Down
6 changes: 0 additions & 6 deletions pyquil/api/_qpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
##############################################################################
from collections import defaultdict
import uuid
import warnings
from typing import Any, Dict, List, Optional, Tuple, Union, cast

import numpy as np
Expand Down Expand Up @@ -259,11 +258,6 @@ def run(self, run_priority: Optional[int] = None) -> "QPU":
for name, array in extracted.items():
self._memory_results[name] = array
elif not ro_sources:
warnings.warn(
"You are running a QPU program with no MEASURE instructions. "
"The result of this program will always be an empty array. Are "
"you sure you didn't mean to measure some of your qubits?"
)
self._memory_results["ro"] = np.zeros((0, 0), dtype=np.int64)

self._last_results = results
Expand Down
2 changes: 1 addition & 1 deletion pyquil/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def test_quil_to_native_quil(compiler):


@pytest.mark.skip(reason="Deprecated.")
def test_native_quil_to_binary(server, mock_qpu_compiler):
def test_native_quil_to_executable(server, mock_qpu_compiler):
p = COMPILED_BELL_STATE.copy()
p.wrap_in_numshots_loop(10)
response = mock_qpu_compiler.native_quil_to_executable(p)
Expand Down

0 comments on commit 8e0b0d9

Please sign in to comment.