From 67b8f671896b436dced56fe98b4df8e30bfc159a Mon Sep 17 00:00:00 2001 From: Victory Omole Date: Tue, 20 Sep 2022 17:47:10 -0500 Subject: [PATCH] Remove a few debug prints from tests (#5879) These removals don't seem to affect the tests in any way. Don't merge until after https://github.com/quantumlib/Cirq/pull/5878 --- cirq-core/cirq/contrib/routing/swap_network_test.py | 1 - cirq-core/cirq/devices/noise_utils_test.py | 2 -- cirq-core/cirq/experiments/xeb_simulation_test.py | 6 ------ 3 files changed, 9 deletions(-) diff --git a/cirq-core/cirq/contrib/routing/swap_network_test.py b/cirq-core/cirq/contrib/routing/swap_network_test.py index bbbd6823c08..8ec1cfa879d 100644 --- a/cirq-core/cirq/contrib/routing/swap_network_test.py +++ b/cirq-core/cirq/contrib/routing/swap_network_test.py @@ -80,5 +80,4 @@ def test_swap_network_str(): │ │ │ │ (4, 0): ───q(4)────────q(4)─────────q(4)───ZZ───q(4)───╱1╲───q(2)────────q(2)─────────q(2)───ZZ───q(2)───╱1╲───q(0)────────q(0)─────────q(0)─── """.strip() - print(actual_str) assert actual_str == expected_str diff --git a/cirq-core/cirq/devices/noise_utils_test.py b/cirq-core/cirq/devices/noise_utils_test.py index 3bbca9e370a..412ff1fa192 100644 --- a/cirq-core/cirq/devices/noise_utils_test.py +++ b/cirq-core/cirq/devices/noise_utils_test.py @@ -46,8 +46,6 @@ def test_op_identifier_subtypes(): def test_op_id_str(): op_id = OpIdentifier(cirq.XPowGate, cirq.LineQubit(0)) - print(op_id) - print(repr(op_id)) assert str(op_id) == "(cirq.LineQubit(0),)" assert repr(op_id) == ( "cirq.devices.noise_utils.OpIdentifier(cirq.ops.common_gates.XPowGate, cirq.LineQubit(0))" diff --git a/cirq-core/cirq/experiments/xeb_simulation_test.py b/cirq-core/cirq/experiments/xeb_simulation_test.py index 9f5253b8f58..185fa070366 100644 --- a/cirq-core/cirq/experiments/xeb_simulation_test.py +++ b/cirq-core/cirq/experiments/xeb_simulation_test.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. import multiprocessing -import time from typing import Dict, Any, Optional from typing import Sequence @@ -135,16 +134,11 @@ def test_incremental_simulate(multiprocess): else: pool = None - start = time.perf_counter() df_ref = _ref_simulate_2q_xeb_circuits(circuits=circuits, cycle_depths=cycle_depths, pool=pool) - end1 = time.perf_counter() df = simulate_2q_xeb_circuits(circuits=circuits, cycle_depths=cycle_depths, pool=pool) - end2 = time.perf_counter() if pool is not None: pool.terminate() - print("\nnew:", end2 - end1, "old:", end1 - start) - pd.testing.assert_frame_equal(df_ref, df) # Use below for approximate equality, if e.g. you're using qsim: