From 29516959d85df3a99f8c01262223d52d34db85a3 Mon Sep 17 00:00:00 2001 From: Paul Nation Date: Fri, 20 Sep 2024 21:10:36 -0400 Subject: [PATCH] fix tests --- mthree/test/test_default_shots.py | 4 ++-- mthree/test/test_inoperable_qubits.py | 3 +-- mthree/test/test_multi_job.py | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/mthree/test/test_default_shots.py b/mthree/test/test_default_shots.py index 020fdec3..f6ac490c 100644 --- a/mthree/test/test_default_shots.py +++ b/mthree/test/test_default_shots.py @@ -22,7 +22,7 @@ def test_athens_mod_shots1(): """Check that default shots works properly for low settings""" backend = FakeAthens() - backend._configuration.max_shots = LOW_SHOTS + backend._conf_dict['max_shots'] = LOW_SHOTS mit = mthree.M3Mitigation(backend) mit.cals_from_system() @@ -32,7 +32,7 @@ def test_athens_mod_shots1(): def test_athens_mod_shots2(): """Check that default shots works properly for high settings""" backend = FakeAthens() - backend._configuration.max_shots = HIGH_SHOTS + backend._conf_dict['max_shots'] = HIGH_SHOTS mit = mthree.M3Mitigation(backend) mit.cals_from_system() diff --git a/mthree/test/test_inoperable_qubits.py b/mthree/test/test_inoperable_qubits.py index 8a67edef..4476e083 100644 --- a/mthree/test/test_inoperable_qubits.py +++ b/mthree/test/test_inoperable_qubits.py @@ -21,8 +21,7 @@ def _faulty(): BACKEND = FakeKolkata() -_ = BACKEND.properties() -BACKEND._properties.faulty_qubits = _faulty +BACKEND._props_dict['faulty_qubits'] = _faulty def test_inoperable_qubits1(): diff --git a/mthree/test/test_multi_job.py b/mthree/test/test_multi_job.py index c87f0dfe..5700001d 100644 --- a/mthree/test/test_multi_job.py +++ b/mthree/test/test_multi_job.py @@ -19,7 +19,6 @@ def test_multiple_job_submission(): """Test that submitting multiple jobs works""" backend = FakeKolkata() backend._conf_dict['max_experiments'] = 5 - #backend._configuration.max_experiments = 5 mit = mthree.M3Mitigation(backend) mit.cals_from_system() assert all(cal.trace() > 1.8 for cal in mit.single_qubit_cals) @@ -29,7 +28,6 @@ def test_multiple_job_submission_single_circuit(): """Test that submitting multiple single-circuit jobs works""" backend = FakeKolkata() backend._conf_dict['max_experiments'] = 5 - #backend._configuration.max_experiments = 1 mit = mthree.M3Mitigation(backend) mit.cals_from_system() assert all(cal.trace() > 1.8 for cal in mit.single_qubit_cals)