Skip to content

Commit

Permalink
fix rb_analysis (qiskit-community#1457)
Browse files Browse the repository at this point in the history
### Summary

Fixes a counting error in rb_analysis because it doesn't take into
account the inverse
  • Loading branch information
dcmckayibm authored May 28, 2024
1 parent ce485f8 commit d7df5f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def _initialize(
"This analysis cannot compute error per gates. "
"Please disable this with 'gate_error_ratio=False'."
) from ex
nclif = circ_result["metadata"]["xval"]
nclif = circ_result["metadata"]["xval"] + 1
for (qinds, gate), count in count_ops:
formatted_key = tuple(sorted(qinds)), gate
avg_gpc[formatted_key] += count / nclif / n_circs
Expand Down
7 changes: 7 additions & 0 deletions releasenotes/notes/fix-epg-gatecount-60777f7a3f3566bc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fixes:
- |
The gate counting for epg in the RB analysis code was not including the
inverse so that the total number of operations per Clifford was incorrect
leading to incorrect reporting of EPG from EPC. Fixed by adding +1 for the
inverse gate

0 comments on commit d7df5f0

Please sign in to comment.