From d30259a6e59aaa6c930f538d5857c32eb7c03192 Mon Sep 17 00:00:00 2001 From: Will Shanks Date: Fri, 27 Oct 2023 11:01:55 -0400 Subject: [PATCH 1/2] Allow StandardRB to handle a V2 backend without a coupling map --- .../library/randomized_benchmarking/standard_rb.py | 3 +++ 1 file changed, 3 insertions(+) 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. From d54c89fe331b707c02423b5605d0dcffe256a0d1 Mon Sep 17 00:00:00 2001 From: Will Shanks Date: Mon, 30 Oct 2023 12:18:28 -0400 Subject: [PATCH 2/2] Add release note --- .../notes/rb-v2-none-coupling-fda2b22afdef507b.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 releasenotes/notes/rb-v2-none-coupling-fda2b22afdef507b.yaml 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 `__.