diff --git a/qiskit_experiments/library/randomized_benchmarking/standard_rb.py b/qiskit_experiments/library/randomized_benchmarking/standard_rb.py index 3da209f07a..97e8e71ea2 100644 --- a/qiskit_experiments/library/randomized_benchmarking/standard_rb.py +++ b/qiskit_experiments/library/randomized_benchmarking/standard_rb.py @@ -241,6 +241,9 @@ def _get_basis_gates(self) -> Optional[Tuple[str, ...]]: return tuple(sorted(basis_gates)) if basis_gates else None def is_bidirectional(coupling_map): + if coupling_map is None: + # None for a coupling map implies all-to-all coupling + return True return len(coupling_map.reduce(self.physical_qubits).get_edges()) == 2 # 2 qubits case: Return all basis gates except for one-way directed 2q-gates. diff --git a/releasenotes/notes/rb-v2-none-coupling-fda2b22afdef507b.yaml b/releasenotes/notes/rb-v2-none-coupling-fda2b22afdef507b.yaml new file mode 100644 index 0000000000..4df8316ac8 --- /dev/null +++ b/releasenotes/notes/rb-v2-none-coupling-fda2b22afdef507b.yaml @@ -0,0 +1,12 @@ +--- +fixes: + - | + Changed :class:`.StandardRB` to treat two qubit operations in the + :class:`qiskit.transpiler.Target` as having all-to-all connectivity if + there is no set of specific pairs of coupled qubits. Most importantly, this + change allows :class:`.StandardRB` to work with + :class:`qiskit_aer.AerSimulator` for multi-qubit benchmarking after + ``qiskit-aer`` 0.13.0. Version 0.13.0 of ``qiskit-aer`` changed + the default :class:`qiskit_aer.AerSimulator` to have such a + :class:`qiskit.transpiler.Target` without specific coupled pairs. + See `#1292 `__.