Closed d-bharadwaj closed 1 week ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
qiskit_research/utils/pauli_twirling.py | 41 | 42 | 97.62% | ||
<!-- | Total: | 41 | 42 | 97.62% | --> |
Totals | |
---|---|
Change from base Build 11055740630: | 1.2% |
Covered Lines: | 675 |
Relevant Lines: | 988 |
Thank you!
Of course!
This pull request enhances the
pauli_twirling
utility by adding support for more two-qubit gates and refactoring the code to be more modular. It also includes comprehensive tests for the newly supported gates.Enhancements to
pauli_twirling
utility:qiskit_research/utils/pauli_twirling.py
: Added support for multiple two-qubit gates by importing additional gate classes and defining corresponding gate instances.qiskit_research/utils/pauli_twirling.py
: Introduced thecreate_pauli_twirling_sets
function to dynamically generate Pauli twirling sets for any two-qubit gate, and updated theTWIRL_GATES
dictionary to use this function.Testing enhancements:
test/utils/test_pauli_twirling.py
: Added imports for the new gate classes to be tested.test/utils/test_pauli_twirling.py
: Added test cases for each newly supported two-qubit gate to verify correct implementation of Pauli twirling.Additionally, I have run the tests using tox locally and have added some more tests for the utilities introduced. Also thanks to this repo that helped me out with this. This enhancement was discussed in Issue #120, where I brought it up, and @kevinsung requested me to open a pull request.