From d07da23d41830ee122408e758d9ec2f14e336ee4 Mon Sep 17 00:00:00 2001 From: Toshinari Itoko Date: Fri, 22 Dec 2023 23:46:39 +0900 Subject: [PATCH] fix critical bug in the computation of process fidelity --- .../library/randomized_benchmarking/layer_fidelity_analysis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qiskit_experiments/library/randomized_benchmarking/layer_fidelity_analysis.py b/qiskit_experiments/library/randomized_benchmarking/layer_fidelity_analysis.py index 68d2b5c035..8da06a0ccb 100644 --- a/qiskit_experiments/library/randomized_benchmarking/layer_fidelity_analysis.py +++ b/qiskit_experiments/library/randomized_benchmarking/layer_fidelity_analysis.py @@ -136,10 +136,11 @@ def _create_analysis_results( """ outcomes = super()._create_analysis_results(fit_data, quality, **metadata) num_qubits = len(self._physical_qubits) + d = 2**num_qubits # Calculate process fidelity alpha = fit_data.ufloat_params["alpha"] - pf = (1 + (2**num_qubits - 1) * alpha) / (2**num_qubits) + pf = (1 + (d**2 - 1) * alpha) / (d**2) quality, reason = self.__evaluate_quality(fit_data)