|
Ran
|
Jobs
1
|
Files
914
|
Run time
11min
|
Badge
README BADGES
|
push
github
Remove need for mutable reference to static (backport #13705) (#13712) * Remove need for mutable reference to static (#13705) Mutable references to static data are inherently unsafe and typically unsound in Rust, because statics are implicitly shared between threads, and the borrow checker can only enforce the shared/exclusive reference limitations within a single thread here. This just moves the thread-exclusion logic into the individual elements of the `static`, where the `GILOnceCell` can correctly handle the runtime exclusion of multiple threads. (The GIL is no longer suitable for thread exclusion if we were doing a freethreaded Python build, but that's a problem we have all over Qiskit, and would need to change to `OnceLock` or the like.) (cherry picked from commit 7b0b6fcdb) # Conflicts: # crates/circuit/src/imports.rs * Update imports.rs * Fix for older PyO3 --------- Co-authored-by: Jake Lishman <jake.lishman@ibm.com> Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
6 of 6 new or added lines in 2 files covered. (100.0%)
5 existing lines in 3 files now uncovered.79171 of 89023 relevant lines covered (88.93%)
358781.67 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
91.96 |
-0.06% | crates/accelerate/src/two_qubit_decompose.rs |
| 1 |
93.21 |
0.0% | crates/accelerate/src/unitary_synthesis.rs |
| 3 |
92.23 |
0.5% | crates/qasm2/src/lex.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 12907052116.1 | 914 |
88.93 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|