|
Ran
|
Jobs
1
|
Files
923
|
Run time
4min
|
Badge
README BADGES
|
github
Fix Statevector.evolve modifying input state in-place (Fixes 15750) (#15905) * [quantum_info.states] Add tests (1 failing) for Statevector.evolve modifying original state Statevector.evolve() is meant to return the evolved state, with the original state remaining unmodified. However, some instructions result in the state being modified. The added tests validate Statevector.evolve() with various gates, Operator, and QuantumCircuit. The only instance where the original state is modified is with DiagonalGate. * [quantum_info.states] Use new _data array when applying global phase The _data array of Statevector may be a shallow copy of another Statevector. Applying a global phase in-place would modify the other instances. A deep copy doesn't work as this breaks another test: - test.python.primitives.test_statevector_estimator.TestStatevectorEstimator.test_reset * [reno] Add bugfix releasenote * Update releasenotes/notes/fix-statevector-evolve-inplace-modification-be2f31976d5a2e1d.yaml Co-authored-by: Julien Gacon <gaconju@gmail.com> * Update releasenotes/notes/fix-statevector-evolve-inplace-modification-be2f31976d5a2e1d.yaml Co-authored-by: Julien Gacon <gaconju@gmail.com> * [tests] Fix test names not being snake-case * [tests] Fix lint black failing --------- Co-authored-by: Julien Gacon <gaconju@gmail.com> (cherry picked from commit a8d3aefae)
1 of 1 new or added line in 1 file covered. (100.0%)
18 existing lines in 4 files now uncovered.78139 of 87973 relevant lines covered (88.82%)
1365084.92 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 7 |
91.26 |
-1.29% | crates/qasm2/src/lex.rs |
| 6 |
97.15 |
-0.47% | crates/qasm2/src/parse.rs |
| 4 |
74.38 |
-0.12% | crates/circuit/src/parameter/symbol_expr.rs |
| 1 |
90.53 |
0.0% | crates/circuit/src/parameter/parameter_expression.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 26231217034.1 | 923 |
87.67 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|