Skip to content

Commit 040485e

Browse files
committed
Remove noisy warnings
1 parent 14b5bad commit 040485e

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

pyquil/api/_compiler.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,6 @@ def native_quil_to_executable(
351351
rather than expanding calibrations on the translation service
352352
:return: An (opaque) binary executable
353353
"""
354-
if not self.qpu_compiler_client:
355-
raise UserMessageError(
356-
"It looks like you're trying to compile to an executable, but "
357-
"do not have access to the QPU compiler endpoint. Make sure you "
358-
"are engaged to the QPU before trying to do this."
359-
)
360-
361354
self._connect_qpu_compiler()
362355

363356
nq_program_calibrated = (

pyquil/api/_qpu.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,6 @@ def run(self, run_priority: Optional[int] = None) -> "QPU":
259259
for name, array in extracted.items():
260260
self._memory_results[name] = array
261261
elif not ro_sources:
262-
warnings.warn(
263-
"You are running a QPU program with no MEASURE instructions. "
264-
"The result of this program will always be an empty array. Are "
265-
"you sure you didn't mean to measure some of your qubits?"
266-
)
267262
self._memory_results["ro"] = np.zeros((0, 0), dtype=np.int64)
268263

269264
self._last_results = results

pyquil/tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def test_quil_to_native_quil(compiler):
319319

320320

321321
@pytest.mark.skip(reason="Deprecated.")
322-
def test_native_quil_to_binary(server, mock_qpu_compiler):
322+
def test_native_quil_to_executable(server, mock_qpu_compiler):
323323
p = COMPILED_BELL_STATE.copy()
324324
p.wrap_in_numshots_loop(10)
325325
response = mock_qpu_compiler.native_quil_to_executable(p)

0 commit comments

Comments
 (0)