QuantumSavory / QuantumSavory.jl

A full stack simulator of quantum hardware, from the low-level analog physics to high-level network dynamics. Includes discrete event simulator, symbolic representation for quantum object, and works with many backend simulators.
https://quantumsavory.github.io/QuantumSavory.jl/
MIT License
37 stars 15 forks source link

an atomic tag-update function #72

Open Krastanov opened 11 months ago

Krastanov commented 11 months ago

Frequently we do

slot, tag = query(...)
pop!(slot, tag)
tag!(slot, tag)

This is fine as long as the pop! and tag! are next to each other, but it is prone to race conditions if there is a @yield between them. An atomic version of this operation would be very valuable.

Krastanov commented 10 months ago

we have querydelete! in #81 , but there is no an atomic queryupdate! function yet