Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance of RB circuit generation (qiskit-community#1317)
### Summary In this PR we improve performance of the RB circuit generation. ### Details and comments The main performance bottleneck is the repeat application of `append` of sequence elements to a circuit. We can improve performance by using the `_append` for the `Barrier` gate. For the appending of the Clifford gates we could also use `_append` (in particular if the sequence elements are integral, in which case the internal generation using `_to_instruction` guarantees the elements to not need checking), but since the `StandardRB` is subclassed we have no full information about the elements in the sequence and have chosen not to do this. Profiling on main: ![image](https://github.com/Qiskit-Extensions/qiskit-experiments/assets/883786/23ddd6b3-e3cb-4ade-914f-45e197b0d0c7) PR: ![image](https://github.com/Qiskit-Extensions/qiskit-experiments/assets/883786/81714750-6f33-4410-aa4f-c14287bc8dd8) ### PR checklist (delete when all criteria are met) - [x] I have read the contributing guide `CONTRIBUTING.md`. - [x] I have added the tests to cover my changes. - [x] I have updated the documentation accordingly. - [x] I have added a release note file using `reno` if this change needs to be documented in the release notes. Internal change, no release notes needed
- Loading branch information