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
30 stars 11 forks source link

ResumableFunctions compat #89

Closed ba2tro closed 6 months ago

ba2tro commented 7 months ago

With the new release of ResumbaleFunctions(v0.6.7) in https://github.com/JuliaDynamics/ResumableFunctions.jl/pull/81 and the new Julia v1.10.0 release, we have some breakage:

using QuantumSavory
using QuantumSavory.ProtocolZoo: EntanglementTracker

using ConcurrentSim
using ResumableFunctions
using Graphs

net = RegisterNet([Register(3) for i in 1:3])
sim = get_time_tracker(net)

for v in vertices(net)
    tracker = EntanglementTracker(sim, net, v)
    @process tracker()
end
julia> run(sim, 100)

ERROR: MethodError: Cannot `convert` an object of type Nothing to an object of type String

Closest candidates are:
  convert(::Type{String}, ::Base.JuliaSyntax.Kind)
   @ Base C:\workdir\base\JuliaSyntax\src\kinds.jl:975
  convert(::Type{String}, ::String)
   @ Base essentials.jl:321
  convert(::Type{T}, ::T) where T<:AbstractString
   @ Base strings\basic.jl:231
  ...

Stacktrace:
  [1] setproperty!(x::QuantumSavory.ProtocolZoo.var"##prot::EntanglementTracker_FSMI#258", f::Symbol, v::Nothing)
    @ Base .\Base.jl:40
  [2] macro expansion
    @ C:\Users\abhishek_bhatt\.julia\dev\ResumableFunctions\src\transforms.jl:254 [inlined]
  [3] macro expansion
    @ C:\Users\abhishek_bhatt\.julia\dev\QuantumSavory\src\ProtocolZoo\ProtocolZoo.jl:82 [inlined]
  [4] (::QuantumSavory.ProtocolZoo.var"##prot::EntanglementTracker_FSMI#258")(_arg::Nothing)
    @ QuantumSavory.ProtocolZoo C:\Users\abhishek_bhatt\.julia\dev\ResumableFunctions\src\macro.jl:248
  [5] execute(ev::ConcurrentSim.Initialize, proc::Process)
    @ ConcurrentSim C:\Users\abhishek_bhatt\.julia\dev\ConcurrentSim\src\processes.jl:32
  [6] (::ConcurrentSim.var"#1#2"{typeof(ConcurrentSim.execute), ConcurrentSim.Initialize, Tuple{Process}})()
    @ ConcurrentSim C:\Users\abhishek_bhatt\.julia\dev\ConcurrentSim\src\base.jl:51
  [7] step(sim::Simulation)
    @ ConcurrentSim C:\Users\abhishek_bhatt\.julia\dev\ConcurrentSim\src\simulations.jl:39
  [8] run(env::Simulation, until::ConcurrentSim.Timeout)
    @ ConcurrentSim C:\Users\abhishek_bhatt\.julia\dev\ConcurrentSim\src\base.jl:91
  [9] run(env::Simulation, until::Int64)
    @ ConcurrentSim C:\Users\abhishek_bhatt\.julia\dev\ConcurrentSim\src\events.jl:29
 [10] top-level scope
    @ c:\Users\abhishek_bhatt\.julia\dev\buffer2.jl:23

The compat bound for RF has been lowered in #87 for now.

Krastanov commented 7 months ago

should be fixed in https://github.com/JuliaDynamics/ResumableFunctions.jl/pull/88 which will be released as 0.6.8

Krastanov commented 6 months ago

It is now released https://github.com/JuliaRegistries/General/pull/100667

Please update the compat and make a new release so that we can close this. Minimal dependency should be 0.6.8