Skip to content

Commit

Permalink
Localise py_op caching data in RefCell (Qiskit#12594)
Browse files Browse the repository at this point in the history
This localises the caching concerns of the `PackedInstruction::py_op`
field into a method `unpack_py_op`, which can now update the cache
through an immutable reference (if no other immutable references are
taken out).  Having the new method to encapsulate the `cache_pyops`
feature simplifies the large `#[cfg(feature = "cache_pyop")]` gates.
  • Loading branch information
jakelishman authored and Procatv committed Aug 1, 2024
1 parent f1033e3 commit fdbf962
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 343 deletions.
Loading

0 comments on commit fdbf962

Please sign in to comment.