From 9d5ac70120bddbc92ef2cbbca3b36957959d509e Mon Sep 17 00:00:00 2001 From: Toshinari Itoko Date: Mon, 1 Apr 2024 15:54:13 +0900 Subject: [PATCH] Make the method for evaluating result quality possible to override --- .../randomized_benchmarking/layer_fidelity_analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qiskit_experiments/library/randomized_benchmarking/layer_fidelity_analysis.py b/qiskit_experiments/library/randomized_benchmarking/layer_fidelity_analysis.py index 0ae7da6c6b..8508863ad8 100644 --- a/qiskit_experiments/library/randomized_benchmarking/layer_fidelity_analysis.py +++ b/qiskit_experiments/library/randomized_benchmarking/layer_fidelity_analysis.py @@ -147,7 +147,7 @@ def _create_analysis_results( alpha = fit_data.ufloat_params["alpha"] pf = (1 + (d * d - 1) * alpha) / (d * d) - quality, reason = self.__evaluate_quality(fit_data) + quality, reason = self._evaluate_quality_with_reason(fit_data) metadata["qubits"] = self._physical_qubits metadata["reason"] = reason @@ -187,7 +187,7 @@ def _get_experiment_components(self, experiment_data: ExperimentData): """Set physical qubits to the experiment components.""" return [device.Qubit(qubit) for qubit in self._physical_qubits] - def __evaluate_quality( + def _evaluate_quality_with_reason( self, fit_data: curve.CurveFitResult, ) -> Tuple[str, Union[str, None]]: