[BUG] ERROR: MethodError: reducing over an empty collection is not allowed; consider supplying init
to the reducer
#559
Labels
bug
Something isn't working
SubspaceArrayReg{2, ComplexF64, Vector{ComplexF64}, Subspace{Int64, Vector{Int64}}}(1, ComplexF64[1.0 + 0.0im, 0.0 + 0.0im], Subspace{Int64,
Vector{Int64}}(1, Dict(0 => 1, 1 => 2), [0, 1]))ERROR: MethodError: reducing over an empty collection is not allowed; consider supplying
init
to the reducerStacktrace:
[1] reduce_empty(op::Base.MappingRF{BloqadeExpr.var"#27#28"{ComplexF64, Subspace{Int64, Vector{Int64}}}, typeof(+)}, #unused#::Type{AbstractBlock{2}})
@ Base .\reduce.jl:356
[2] reduce_empty_iter
@ .\reduce.jl:379 [inlined]
[3] mapreduce_empty_iter(f::Function, op::Function, itr::Vector{AbstractBlock{2}}, ItrEltype::Base.HasEltype)
@ Base .\reduce.jl:375
[4] _mapreduce(f::BloqadeExpr.var"#27#28"{ComplexF64, Subspace{Int64, Vector{Int64}}}, op::typeof(+), #unused#::IndexLinear, A::Vector{AbstractBlock{2}})
@ Base .\reduce.jl:427
[5] _mapreduce_dim
@ .\reducedim.jl:365 [inlined]
[6] #mapreduce#765
@ .\reducedim.jl:357 [inlined]
[7] mapreduce
@ .\reducedim.jl:357 [inlined]
[8] mat(#unused#::Type{ComplexF64}, x::Add{2}, s::Subspace{Int64, Vector{Int64}})
@ BloqadeExpr C:\Users\jwurtz.julia\packages\BloqadeExpr\7XHOo\src\mat.jl:59
[9] mat(#unused#::Type{ComplexF64}, h::RydInteract{2}, space::Subspace{Int64, Vector{Int64}})
@ BloqadeExpr C:\Users\jwurtz.julia\packages\BloqadeExpr\7XHOo\src\mat.jl:41
[10] mat(#unused#::Type{ComplexF64}, x::Scale{Int64, 2, RydInteract{2}}, s::Subspace{Int64, Vector{Int64}})
@ BloqadeExpr C:\Users\jwurtz.julia\packages\BloqadeExpr\7XHOo\src\mat.jl:55
[11] BloqadeExpr.Hamiltonian(::Type{ComplexF64}, ex::RydbergHamiltonian, space::Subspace{Int64, Vector{Int64}})
@ BloqadeExpr C:\Users\jwurtz.julia\packages\BloqadeExpr\7XHOo\src\lower.jl:169
[12] SchrodingerProblem(reg::SubspaceArrayReg{2, ComplexF64, Vector{ComplexF64}, Subspace{Int64, Vector{Int64}}}, tspan::Int64, expr::RydbergHamiltonian; algo::CompositeAlgorithm{Tuple{Vern9{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, Rodas5{0, false, Nothing, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}}, AutoSwitch{Vern9{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, Rodas5{0, false, Nothing, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}, Rational{Int64}, Int64}}, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ BloqadeODE C:\Users\jwurtz.julia\packages\BloqadeODE\JjdjV\src\problem.jl:89
[13] SchrodingerProblem(reg::SubspaceArrayReg{2, ComplexF64, Vector{ComplexF64}, Subspace{Int64, Vector{Int64}}}, tspan::Int64, expr::RydbergHamiltonian)
@ BloqadeODE C:\Users\jwurtz.julia\packages\BloqadeODE\JjdjV\src\problem.jl:79
[14] emulate_from_file(filename::String)
@ Main c:\Users\jwurtz\Documents\GITHUB\BP_EVchargers\BP_chargers\quantum\bloqadepy.jl:43
[15] top-level scope
@ REPL[24]:1
The text was updated successfully, but these errors were encountered: