Skip to content

Commit

Permalink
fix critical bug in the computation of process fidelity
Browse files Browse the repository at this point in the history
  • Loading branch information
itoko committed Jan 19, 2024
1 parent 6917daf commit 9e7bfac
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 9e7bfac

Please sign in to comment.