diff --git a/qiskit_experiments/framework/base_experiment.py b/qiskit_experiments/framework/base_experiment.py index 3c0a81419f..882fc20a3f 100644 --- a/qiskit_experiments/framework/base_experiment.py +++ b/qiskit_experiments/framework/base_experiment.py @@ -275,10 +275,9 @@ def _max_circuits(self, backend: Backend = None): if self.backend is None: raise QiskitError("A backend must be provided.") backend = self.backend - self.backend = backend # Get max circuits for job splitting max_circuits_option = getattr(self.experiment_options, "max_circuits", None) - max_circuits_backend = self._backend_data.max_circuits + max_circuits_backend = BackendData(backend).max_circuits if max_circuits_option and max_circuits_backend: return min(max_circuits_option, max_circuits_backend) diff --git a/test/framework/test_framework.py b/test/framework/test_framework.py index 09335abcd2..674b54f850 100644 --- a/test/framework/test_framework.py +++ b/test/framework/test_framework.py @@ -268,7 +268,7 @@ def error_message(self): self.assertEqual(len(res), 0) self.assertEqual(expdata.analysis_status(), AnalysisStatus.CANCELLED) - @ddt.data(1, 10, 100) + @ddt.data(None, 1, 10, 100) def test_max_circuits(self, max_experiments): """Test running experiment with max_circuits"""