Skip to content

Commit d7df5f0

Browse files
authored
fix rb_analysis (#1457)
### Summary Fixes a counting error in rb_analysis because it doesn't take into account the inverse
1 parent ce485f8 commit d7df5f0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

qiskit_experiments/library/randomized_benchmarking/rb_analysis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def _initialize(
244244
"This analysis cannot compute error per gates. "
245245
"Please disable this with 'gate_error_ratio=False'."
246246
) from ex
247-
nclif = circ_result["metadata"]["xval"]
247+
nclif = circ_result["metadata"]["xval"] + 1
248248
for (qinds, gate), count in count_ops:
249249
formatted_key = tuple(sorted(qinds)), gate
250250
avg_gpc[formatted_key] += count / nclif / n_circs
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
fixes:
3+
- |
4+
The gate counting for epg in the RB analysis code was not including the
5+
inverse so that the total number of operations per Clifford was incorrect
6+
leading to incorrect reporting of EPG from EPC. Fixed by adding +1 for the
7+
inverse gate

0 commit comments

Comments
 (0)