diff --git a/qiskit_experiments/library/randomized_benchmarking/rb_experiment.py b/qiskit_experiments/library/randomized_benchmarking/rb_experiment.py index ecd4e83c05..af2ab1bc70 100644 --- a/qiskit_experiments/library/randomized_benchmarking/rb_experiment.py +++ b/qiskit_experiments/library/randomized_benchmarking/rb_experiment.py @@ -145,6 +145,11 @@ def _default_experiment_options(cls) -> Options: return options + @classmethod + def _default_transpile_options(cls) -> Options: + """Default transpiler options for transpilation of RB circuits""" + return Options(optimization_level=1) + def _set_backend(self, backend: Backend): """Set the backend V2 for RB experiments since RB experiments only support BackendV2 except for simulators. If BackendV1 is provided, it is converted to V2 and stored. @@ -340,7 +345,7 @@ def _transpiled_circuits(self) -> List[QuantumCircuit]: """Return a list of experiment circuits, transpiled.""" has_custom_transpile_option = ( not set(vars(self.transpile_options)).issubset({"basis_gates", "optimization_level"}) - or self.transpile_options.get("optimization_level", 0) != 0 + or self.transpile_options.get("optimization_level", 1) != 1 ) has_no_undirected_2q_basis = self._get_basis_gates() is None if self.num_qubits > 2 or has_custom_transpile_option or has_no_undirected_2q_basis: