|
Ran
|
Jobs
1
|
Files
933
|
Run time
3min
|
Badge
README BADGES
|
push
github
Improve commutation checking of Pauli product rotations and measurements (#15815) * Coercing integer types to floats when appending a PPR to a circuit * Extending RemoveIdentityEquiv and CommutativeOptimization to handle PPRs * reno * Improve commutation checking of PPRs and PPMs For pairs of PPRs/PPMs we can construct generators as Paulis rather than SparseObservables, and we can check commutativity by checking the commutativity of Paulis. * reno * canonicalizing PPM instruction as well * faster method based on comparing two sorted vectors * Revert "faster method based on comparing two sorted vectors" This reverts commit 087362f15. * moving the efficient check to commutative optimization * More tests for commutations of pauli-based gates * Improved tests for commutations between different types of pauli-based gates * Added tests with varying qubit indices * Adding CommutativeOptimization tests * enforcing PPM & PPR types for sorted checking * Replacing vec by hash_map The complexity should not scale with the number of qubits in the circuit. * sorting arguments before pauli-based check * Addressing review comments by Janani * improving comments and docstrings * improving release note * adding more tests * removing gates equivalent to identity In the initial implementation we have decided that CommutativeOptimization should not remove gates equivalent to identity, as in the full transpiler pipeline this would be done by RemoveIdentityEquivalent pass. However, if CommutativeOptimization runs in standalone, keeping identity-equivalent gates leads to a degradation in performance since they obviously commute with everything. This is important in the context of this PR since to apply the efficient generator-based check for two PauliProductRotations (more generally Pauli-based gates), we need to know that neither gate is equivalent to identity; while checking this on every call to the commutation checker ... (continued)
123 of 125 new or added lines in 2 files covered. (98.4%)
26 existing lines in 4 files now uncovered.104783 of 119764 relevant lines covered (87.49%)
981815.83 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 2 |
96.88 |
0.03% | crates/transpiler/src/passes/commutative_optimization.rs |
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 12 |
97.15 |
0.0% | crates/qasm2/src/parse.rs |
| 9 |
73.88 |
-0.37% | crates/circuit/src/parameter/symbol_expr.rs |
| 4 |
91.77 |
-0.51% | crates/qasm2/src/lex.rs |
| 1 |
90.53 |
0.0% | crates/circuit/src/parameter/parameter_expression.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 24834692837.1 | 933 |
87.49 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|