Package evaluation to test QSWalk on Julia 1.14.0-DEV.2226 (797a5ef2b0*) started at 2026-05-23T17:34:27.611 ################################################################################ # Set-up # Installing PkgEval dependencies (TestEnv)... Activating project at `~/.julia/environments/v1.14` Set-up completed after 16.75s ################################################################################ # Installation # Installing QSWalk... Resolving package versions... Installed Expokit ─ v0.2.0 Installed QSWalk ── v1.1.1 Updating `~/.julia/environments/v1.14/Project.toml` [2ef04bfc] + QSWalk v1.1.1 Updating `~/.julia/environments/v1.14/Manifest.toml` [a1e7a1ef] + Expokit v0.2.0 [2ef04bfc] + QSWalk v1.1.1 [56f22d72] + Artifacts v1.11.0 [2a0f44e3] + Base64 v1.11.0 [b77e0a4c] + InteractiveUtils v1.11.0 [ac6e5ff7] + JuliaSyntaxHighlighting v1.13.0 [8f399da3] + Libdl v1.11.0 [37e2e46d] + LinearAlgebra v1.13.0 [56ddb016] + Logging v1.11.0 [d6f4376e] + Markdown v1.11.0 [9a3f8284] + Random v1.11.0 [ea8e919c] + SHA v1.13.0 [9e88b42a] + Serialization v1.11.0 [2f01184e] + SparseArrays v1.13.0 [f489334b] + StyledStrings v1.13.0 [8dfed614] + Test v1.11.0 [e66e0078] + CompilerSupportLibraries_jll v1.5.1+0 [4536629a] + OpenBLAS_jll v0.3.33+0 [bea87d4a] + SuiteSparse_jll v7.10.1+0 [8e850b90] + libblastrampoline_jll v5.15.0+0 Installation completed after 1.73s ################################################################################ # Precompilation # Precompiling PkgEval dependencies... Precompiling project... 5.0 s ✓ TestEnv 1 dependency successfully precompiled in 5 seconds. 27 already precompiled. Precompiling package dependencies... Precompiling project... 1.0 s ✓ Expokit ┌ Info: JuliaLowering threw given input: │ code = │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:276 =# Core.@doc "\n nm_glob_ham(A[, hamiltonians][, weights, epsilon])\n\nReturn global Hamiltonian for the moralization procedure. Matrix `A` should the\nadjacency matrix of a directed graph, for which one aims to construct the\nnonmoralizing dynamics. Here, `hamiltonians` is an optional argument which is a\nDictionary with keys of type `Tuple{Int, Int}` or `Tuple{Vertex, Vertex}`. The\nfirst collects the submatrices according to their shape, while the second\ncollects them according to each pair of vertices. As the default all-one\nsubmatrices are chosen. The last argument states that only those elements for\nwhich `abs(A[i, j]) >= epsilon` are considered.\n\n*Note:* The submatrices of the result matrix are scaled by corresponding `weights`\nargument, which should be a square matrix of the same dimension as `A`. If `weights`\nis not provided, then `weights[i,j]=A[i,j]`, if `A[i,j]` is nonzero and `A[j,i]`\nis zero, `weights[i,j]=A[j,i]`, if `A[i,j]` in reverse scenario,\n`weights[i,j]=(A[i,j]+A[j,i])/2` if both are nonzero, and zero otherwise.\n\n# Examples\n\n```jldoctest; setup = :(using QSWalk)\njulia> A = [ 0 1 0; 1 0 1; 0 1 0]\n3×3 Array{Int64,2}:\n 0 1 0\n 1 0 1\n 0 1 0\n\njulia> nm_glob_ham(A) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n\njulia> dict_deg = Dict{Tuple{Int,Int},Matrix{ComplexF64}}((1, 2) => (2+1im)*ones(1, 2), (2, 1) =>1im*ones(2, 1));\n\njulia> nm_glob_ham(A, dict_deg) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+1.0im 2.0+1.0im 0.0+0.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 0.0+0.0im 0.0-1.0im 0.0-1.0im 0.0+0.0im\n\njulia> v1, v2, v3 = vlist(make_vertex_set(A))\n3-element Array{Vertex,1}:\n Vertex([1])\n Vertex([2, 3])\n Vertex([4])\n\njulia> dict_vec = Dict{Tuple{Vertex,Vertex},Matrix{ComplexF64}}((v1, v2) =>2*ones(1, 2), (v2, v3) =>[1im 2im;]');\n\njulia> nm_glob_ham(A, dict_vec) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+0.0im 2.0+0.0im 0.0+0.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-1.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-2.0im\n 0.0+0.0im 0.0+1.0im 0.0+2.0im 0.0+0.0im\n```\n" (function nm_glob_ham(A::AbstractMatrix{<:Number}, hamiltonians::Dict{Tuple{Int, Int}, <:AbstractMatrix{<:Number}}; epsilon::Real = eps(), weights::AbstractMatrix{<:Number} = default_weights_glob_ham(A, epsilon)) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:336 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:340 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:340 =# @argumentcheck epsilon >= 0 "epsilon needs to be nonnegative" │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:342 =# │ revincidence_list = reversed_incidence_list(A, epsilon = epsilon) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:343 =# │ vset = revinc_to_vertexset(revincidence_list) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:345 =# │ H = spzeros(ComplexF64, vertexsetsize(vset), vertexsetsize(vset)) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:346 =# │ for (index, i) = enumerate(revincidence_list), j = i │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:347 =# │ (ind_min, ind_max) = sort([index, j]) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:348 =# │ hamiltonianshape = length.((subspace(vset[ind_min]), subspace(vset[ind_max]))) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:349 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:349 =# @argumentcheck hamiltonianshape in keys(hamiltonians) "hamiltonian of size $(hamiltonianshape) not found" │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:350 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:350 =# @argumentcheck hamiltonianshape == size(hamiltonians[hamiltonianshape]) "hamiltonian for key $(hamiltonianshape) shoud have shape $(hamiltonianshape)" │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:351 =# │ H[subspace(vset[ind_min]), subspace(vset[ind_max])] = weights[ind_min, ind_max] * hamiltonians[hamiltonianshape] │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:352 =# │ end │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:353 =# │ H + H' │ end, function nm_glob_ham(A::T; epsilon::Real = eps(), weights::AbstractMatrix{<:Number} = default_weights_glob_ham(A, epsilon)) where T <: AbstractMatrix{<:Number} │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:356 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:360 =# │ revindlist = reversed_incidence_list(A, epsilon = epsilon) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:361 =# │ alloneshamiltonians = Dict{Tuple{Int, Int}, T}() │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:362 =# │ for v = revindlist, w = v │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:363 =# │ w = revindlist[w] │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:364 =# │ length_w = max(1, length(w)) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:365 =# │ length_v = max(1, length(v)) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:366 =# │ alloneshamiltonians[(length_v, length_w)] = ones(length_v, length_w) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:367 =# │ alloneshamiltonians[(length_w, length_v)] = ones(length_w, length_v) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:368 =# │ end │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:369 =# │ nm_glob_ham(A, alloneshamiltonians, epsilon = epsilon) │ end, function nm_glob_ham(A::AbstractMatrix{<:Number}, hamiltonians::Dict{Tuple{Vertex, Vertex}, <:AbstractMatrix{<:Number}}; epsilon::Real = eps(), weights::AbstractMatrix{<:Number} = default_weights_glob_ham(A, epsilon)) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:372 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:376 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:376 =# @argumentcheck epsilon >= 0 "epsilon needs to be nonnegative" │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:377 =# │ revincidence_list = reversed_incidence_list(A, epsilon = epsilon) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:378 =# │ vset = revinc_to_vertexset(revincidence_list) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:380 =# │ H = spzeros(ComplexF64, vertexsetsize(vset), vertexsetsize(vset)) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:381 =# │ for (index, i) = enumerate(revincidence_list), j = i │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:382 =# │ (ind_min, ind_max) = sort([index, j]) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:383 =# │ key = (vset[ind_min], vset[ind_max]) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:384 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:384 =# @argumentcheck key in keys(hamiltonians) "hamiltonian for $(key) not found" │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:385 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:385 =# @argumentcheck length.(key) == size(hamiltonians[key]) "hamiltonian for key $(key) shoud have shape $(length.(key))" │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:386 =# │ H[subspace(vset[ind_min]), subspace(vset[ind_max])] = weights[ind_min, ind_max] * hamiltonians[key] │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:387 =# │ end │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:388 =# │ H + H' │ end)) │ st0 = │ SyntaxTree with attributes mod,kind,var_id,toplevel_pure,scope_type,macro_source,name_val,syntax_flags,meta,scope_layer,value,jl_source,is_toplevel_thunk,source,__macro_ctx__ │ [macrocall] │ │ @doc :: Identifier │ mod │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:276 =#) :: Value │ │ "\n nm_glob_ham(A[, hamiltonians][, weights, epsilon])\n\nReturn global Hamiltonian for the moralization procedure. Matrix `A` should the\nadjacency matrix of a directed graph, for which one aims to construct the\nnonmoralizing dynamics. Here, `hamiltonians` is an optional argument which is a\nDictionary with keys of type `Tuple{Int, Int}` or `Tuple{Vertex, Vertex}`. The\nfirst collects the submatrices according to their shape, while the second\ncollects them according to each pair of vertices. As the default all-one\nsubmatrices are chosen. The last argument states that only those elements for\nwhich `abs(A[i, j]) >= epsilon` are considered.\n\n*Note:* The submatrices of the result matrix are scaled by corresponding `weights`\nargument, which should be a square matrix of the same dimension as `A`. If `weights`\nis not provided, then `weights[i,j]=A[i,j]`, if `A[i,j]` is nonzero and `A[j,i]`\nis zero, `weights[i,j]=A[j,i]`, if `A[i,j]` in reverse scenario,\n`weights[i,j]=(A[i,j]+A[j,i])/2` if both are nonzero, and zero otherwise.\n\n# Examples\n\n```jldoctest; setup = :(using QSWalk)\njulia> A = [ 0 1 0; 1 0 1; 0 1 0]\n3×3 Array{Int64,2}:\n 0 1 0\n 1 0 1\n 0 1 0\n\njulia> nm_glob_ham(A) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n\njulia> dict_deg = Dict{Tuple{Int,Int},Matrix{ComplexF64}}((1, 2) => (2+1im)*ones(1, 2), (2, 1) =>1im*ones(2, 1));\n\njulia> nm_glob_ham(A, dict_deg) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+1.0im 2.0+1.0im 0.0+0.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 0.0+0.0im 0.0-1.0im 0.0-1.0im 0.0+0.0im\n\njulia> v1, v2, v3 = vlist(make_vertex_set(A))\n3-element Array{Vertex,1}:\n Vertex([1])\n Vertex([2, 3])\n Vertex([4])\n\njulia> dict_vec = Dict{Tuple{Vertex,Vertex},Matrix{ComplexF64}}((v1, v2) =>2*ones(1, 2), (v2, v3) =>[1im 2im;]');\n\njulia> nm_glob_ham(A, dict_vec) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+0.0im 2.0+0.0im 0.0+0.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-1.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-2.0im\n 0.0+0.0im 0.0+1.0im 0.0+2.0im 0.0+0.0im\n```\n" :: Value │ │ [tuple] │ │ [function] │ │ [call] │ │ nm_glob_ham :: Identifier │ │ [parameters] │ │ [kw] │ │ [::] │ │ epsilon :: Identifier │ │ Real :: Identifier │ │ [call] │ │ eps :: Identifier │ │ [kw] │ │ [::] │ │ weights :: Identifier │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [call] │ │ default_weights_glob_ham :: Identifier │ │ A :: Identifier │ │ epsilon :: Identifier │ │ [::] │ │ A :: Identifier │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [::] │ │ hamiltonians :: Identifier │ │ [curly] │ │ Dict :: Identifier │ │ [curly] │ │ Tuple :: Identifier │ │ Int :: Identifier │ │ Int :: Identifier │ │ [<:] │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [block] │ │ [macrocall] │ │ @argumentcheck :: Identifier │ │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:340 =#) :: Value │ │ [call] │ │ >= :: Identifier │ │ epsilon :: Identifier │ │ 0 :: Value │ │ "epsilon needs to be nonnegative" :: Value │ │ [=] │ │ revincidence_list :: Identifier │ │ [call] │ │ reversed_incidence_list :: Identifier │ │ A :: Identifier │ │ [kw] │ │ epsilon :: Identifier │ │ epsilon :: Identifier │ │ [=] │ │ vset :: Identifier │ │ [call] │ │ revinc_to_vertexset :: Identifier │ │ revincidence_list :: Identifier │ │ [=] │ │ H :: Identifier │ │ [call] │ │ spzeros :: Identifier │ │ ComplexF64 :: Identifier │ │ [call] │ │ vertexsetsize :: Identifier │ │ vset :: Identifier │ │ [call] │ │ vertexsetsize :: Identifier │ │ vset :: Identifier │ │ [for] │ │ [block] │ │ [=] │ │ [tuple] │ │ index :: Identifier │ │ i :: Identifier │ │ [call] │ │ enumerate :: Identifier │ │ revincidence_list :: Identifier │ │ [=] │ │ j :: Identifier │ │ i :: Identifier │ │ [block] │ │ [=] │ │ [tuple] │ │ ind_min :: Identifier │ │ ind_max :: Identifier │ │ [call] │ │ sort :: Identifier │ │ [vect] │ │ index :: Identifier │ │ j :: Identifier │ │ [=] │ │ hamiltonianshape :: Identifier │ │ [.] │ │ length :: Identifier │ │ [tuple] │ │ [tuple] │ │ [call] │ │ subspace :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_min :: Identifier │ │ [call] │ │ subspace :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_max :: Identifier │ │ [macrocall] │ │ @argumentcheck :: Identifier │ │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:349 =#) :: Value │ │ [call] │ │ in :: Identifier │ │ hamiltonianshape :: Identifier │ │ [call] │ │ keys :: Identifier │ │ hamiltonians :: Identifier │ │ [string] │ │ "hamiltonian of size " :: Value │ │ hamiltonianshape :: Identifier │ │ " not found" :: Value │ │ [macrocall] │ │ @argumentcheck :: Identifier │ │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:350 =#) :: Value │ │ [call] │ │ == :: Identifier │ │ hamiltonianshape :: Identifier │ │ [call] │ │ size :: Identifier │ │ [ref] │ │ hamiltonians :: Identifier │ │ hamiltonianshape :: Identifier │ │ [string] │ │ "hamiltonian for key " :: Value │ │ hamiltonianshape :: Identifier │ │ " shoud have shape " :: Value │ │ hamiltonianshape :: Identifier │ │ [=] │ │ [ref] │ │ H :: Identifier │ │ [call] │ │ subspace :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_min :: Identifier │ │ [call] │ │ subspace :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_max :: Identifier │ │ [call] │ │ * :: Identifier │ │ [ref] │ │ weights :: Identifier │ │ ind_min :: Identifier │ │ ind_max :: Identifier │ │ [ref] │ │ hamiltonians :: Identifier │ │ hamiltonianshape :: Identifier │ │ [call] │ │ + :: Identifier │ │ H :: Identifier │ │ ['] │ │ H :: Identifier │ │ [function] │ │ [where] │ │ [call] │ │ nm_glob_ham :: Identifier │ │ [parameters] │ │ [kw] │ │ [::] │ │ epsilon :: Identifier │ │ Real :: Identifier │ │ [call] │ │ eps :: Identifier │ │ [kw] │ │ [::] │ │ weights :: Identifier │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [call] │ │ default_weights_glob_ham :: Identifier │ │ A :: Identifier │ │ epsilon :: Identifier │ │ [::] │ │ A :: Identifier │ │ T :: Identifier │ │ [<:] │ │ T :: Identifier │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [block] │ │ [=] │ │ revindlist :: Identifier │ │ [call] │ │ reversed_incidence_list :: Identifier │ │ A :: Identifier │ │ [kw] │ │ epsilon :: Identifier │ │ epsilon :: Identifier │ │ [=] │ │ alloneshamiltonians :: Identifier │ │ [call] │ │ [curly] │ │ Dict :: Identifier │ │ [curly] │ │ Tuple :: Identifier │ │ Int :: Identifier │ │ Int :: Identifier │ │ T :: Identifier │ │ [for] │ │ [block] │ │ [=] │ │ v :: Identifier │ │ revindlist :: Identifier │ │ [=] │ │ w :: Identifier │ │ v :: Identifier │ │ [block] │ │ [=] │ │ w :: Identifier │ │ [ref] │ │ revindlist :: Identifier │ │ w :: Identifier │ │ [=] │ │ length_w :: Identifier │ │ [call] │ │ max :: Identifier │ │ 1 :: Value │ │ [call] │ │ length :: Identifier │ │ w :: Identifier │ │ [=] │ │ length_v :: Identifier │ │ [call] │ │ max :: Identifier │ │ 1 :: Value │ │ [call] │ │ length :: Identifier │ │ v :: Identifier │ │ [=] │ │ [ref] │ │ alloneshamiltonians :: Identifier │ │ [tuple] │ │ length_v :: Identifier │ │ length_w :: Identifier │ │ [call] │ │ ones :: Identifier │ │ length_v :: Identifier │ │ length_w :: Identifier │ │ [=] │ │ [ref] │ │ alloneshamiltonians :: Identifier │ │ [tuple] │ │ length_w :: Identifier │ │ length_v :: Identifier │ │ [call] │ │ ones :: Identifier │ │ length_w :: Identifier │ │ length_v :: Identifier │ │ [call] │ │ nm_glob_ham :: Identifier │ │ A :: Identifier │ │ alloneshamiltonians :: Identifier │ │ [kw] │ │ epsilon :: Identifier │ │ epsilon :: Identifier │ │ [function] │ │ [call] │ │ nm_glob_ham :: Identifier │ │ [parameters] │ │ [kw] │ │ [::] │ │ epsilon :: Identifier │ │ Real :: Identifier │ │ [call] │ │ eps :: Identifier │ │ [kw] │ │ [::] │ │ weights :: Identifier │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [call] │ │ default_weights_glob_ham :: Identifier │ │ A :: Identifier │ │ epsilon :: Identifier │ │ [::] │ │ A :: Identifier │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [::] │ │ hamiltonians :: Identifier │ │ [curly] │ │ Dict :: Identifier │ │ [curly] │ │ Tuple :: Identifier │ │ Vertex :: Identifier │ │ Vertex :: Identifier │ │ [<:] │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [block] │ │ [macrocall] │ │ @argumentcheck :: Identifier │ │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:376 =#) :: Value │ │ [call] │ │ >= :: Identifier │ │ epsilon :: Identifier │ │ 0 :: Value │ │ "epsilon needs to be nonnegative" :: Value │ │ [=] │ │ revincidence_list :: Identifier │ │ [call] │ │ reversed_incidence_list :: Identifier │ │ A :: Identifier │ │ [kw] │ │ epsilon :: Identifier │ │ epsilon :: Identifier │ │ [=] │ │ vset :: Identifier │ │ [call] │ │ revinc_to_vertexset :: Identifier │ │ revincidence_list :: Identifier │ │ [=] │ │ H :: Identifier │ │ [call] │ │ spzeros :: Identifier │ │ ComplexF64 :: Identifier │ │ [call] │ │ vertexsetsize :: Identifier │ │ vset :: Identifier │ │ [call] │ │ vertexsetsize :: Identifier │ │ vset :: Identifier │ │ [for] │ │ [block] │ │ [=] │ │ [tuple] │ │ index :: Identifier │ │ i :: Identifier │ │ [call] │ │ enumerate :: Identifier │ │ revincidence_list :: Identifier │ │ [=] │ │ j :: Identifier │ │ i :: Identifier │ │ [block] │ │ [=] │ │ [tuple] │ │ ind_min :: Identifier │ │ ind_max :: Identifier │ │ [call] │ │ sort :: Identifier │ │ [vect] │ │ index :: Identifier │ │ j :: Identifier │ │ [=] │ │ key :: Identifier │ │ [tuple] │ │ [ref] │ │ vset :: Identifier │ │ ind_min :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_max :: Identifier │ │ [macrocall] │ │ @argumentcheck :: Identifier │ │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:384 =#) :: Value │ │ [call] │ │ in :: Identifier │ │ key :: Identifier │ │ [call] │ │ keys :: Identifier │ │ hamiltonians :: Identifier │ │ [string] │ │ "hamiltonian for " :: Value │ │ key :: Identifier │ │ " not found" :: Value │ │ [macrocall] │ │ @argumentcheck :: Identifier │ │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:385 =#) :: Value │ │ [call] │ │ == :: Identifier │ │ [.] │ │ length :: Identifier │ │ [tuple] │ │ key :: Identifier │ │ [call] │ │ size :: Identifier │ │ [ref] │ │ hamiltonians :: Identifier │ │ key :: Identifier │ │ [string] │ │ "hamiltonian for key " :: Value │ │ key :: Identifier │ │ " shoud have shape " :: Value │ │ [.] │ │ length :: Identifier │ │ [tuple] │ │ key :: Identifier │ │ [=] │ │ [ref] │ │ H :: Identifier │ │ [call] │ │ subspace :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_min :: Identifier │ │ [call] │ │ subspace :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_max :: Identifier │ │ [call] │ │ * :: Identifier │ │ [ref] │ │ weights :: Identifier │ │ ind_min :: Identifier │ │ ind_max :: Identifier │ │ [ref] │ │ hamiltonians :: Identifier │ │ key :: Identifier │ │ [call] │ │ + :: Identifier │ │ H :: Identifier │ │ ['] │ │ H :: Identifier │ │ │ st1 = │ SyntaxTree with attributes mod,kind,var_id,toplevel_pure,scope_type,macro_source,name_val,syntax_flags,meta,scope_layer,value,jl_source,is_toplevel_thunk,source │ [block] │ │ [block] │ │ [=] │ │ val :: Identifier │ scope_layer=3 │ [function] │ │ [call] │ │ nm_glob_ham :: Identifier │ scope_layer=1 │ [parameters] │ │ [kw] │ │ [::] │ │ epsilon :: Identifier │ scope_layer=1 │ Real :: Identifier │ scope_layer=1 │ [call] │ │ eps :: Identifier │ scope_layer=1 │ [kw] │ │ [::] │ │ weights :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [call] │ │ default_weights_glob_ham :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [::] │ │ A :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [::] │ │ hamiltonians :: Identifier │ scope_layer=1 │ [curly] │ │ Dict :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ Int :: Identifier │ scope_layer=1 │ Int :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [block] │ │ [if] │ │ [call] │ │ >= :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ 0 :: Value │ macro_source=445 │ nothing :: Value │ macro_source=445 │ [call] │ │ throw :: Identifier │ mod,scope_layer=1 │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ ArgumentError :: Identifier │ │ "epsilon needs to be nonnegative" :: Value │ macro_source=445 │ [=] │ │ revincidence_list :: Identifier │ scope_layer=1 │ [call] │ │ reversed_incidence_list :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ [kw] │ │ epsilon :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [=] │ │ vset :: Identifier │ scope_layer=1 │ [call] │ │ revinc_to_vertexset :: Identifier │ scope_layer=1 │ revincidence_list :: Identifier │ scope_layer=1 │ [=] │ │ H :: Identifier │ scope_layer=1 │ [call] │ │ spzeros :: Identifier │ scope_layer=1 │ ComplexF64 :: Identifier │ scope_layer=1 │ [call] │ │ vertexsetsize :: Identifier │ scope_layer=1 │ vset :: Identifier │ scope_layer=1 │ [call] │ │ vertexsetsize :: Identifier │ scope_layer=1 │ vset :: Identifier │ scope_layer=1 │ [for] │ │ [block] │ │ [=] │ │ [tuple] │ │ index :: Identifier │ scope_layer=1 │ i :: Identifier │ scope_layer=1 │ [call] │ │ enumerate :: Identifier │ scope_layer=1 │ revincidence_list :: Identifier │ scope_layer=1 │ [=] │ │ j :: Identifier │ scope_layer=1 │ i :: Identifier │ scope_layer=1 │ [block] │ │ [=] │ │ [tuple] │ │ ind_min :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [call] │ │ sort :: Identifier │ scope_layer=1 │ [vect] │ │ index :: Identifier │ scope_layer=1 │ j :: Identifier │ scope_layer=1 │ [=] │ │ hamiltonianshape :: Identifier │ scope_layer=1 │ [.] │ │ length :: Identifier │ scope_layer=1 │ [tuple] │ │ [tuple] │ │ [call] │ │ subspace :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_min :: Identifier │ scope_layer=1 │ [call] │ │ subspace :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [if] │ │ [call] │ │ in :: Identifier │ scope_layer=1 │ hamiltonianshape :: Identifier │ scope_layer=1 │ [call] │ │ keys :: Identifier │ scope_layer=1 │ hamiltonians :: Identifier │ scope_layer=1 │ nothing :: Value │ macro_source=445 │ [call] │ │ throw :: Identifier │ mod,scope_layer=1 │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ ArgumentError :: Identifier │ │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ string :: Identifier │ │ [string] │ │ "hamiltonian of size " :: Value │ macro_source=445 │ hamiltonianshape :: Identifier │ scope_layer=1 │ " not found" :: Value │ macro_source=445 │ [if] │ │ [call] │ │ == :: Identifier │ scope_layer=1 │ hamiltonianshape :: Identifier │ scope_layer=1 │ [call] │ │ size :: Identifier │ scope_layer=1 │ [ref] │ │ hamiltonians :: Identifier │ scope_layer=1 │ hamiltonianshape :: Identifier │ scope_layer=1 │ nothing :: Value │ macro_source=445 │ [call] │ │ throw :: Identifier │ mod,scope_layer=1 │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ ArgumentError :: Identifier │ │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ string :: Identifier │ │ [string] │ │ "hamiltonian for key " :: Value │ macro_source=445 │ hamiltonianshape :: Identifier │ scope_layer=1 │ " shoud have shape " :: Value │ macro_source=445 │ hamiltonianshape :: Identifier │ scope_layer=1 │ [=] │ │ [ref] │ │ H :: Identifier │ scope_layer=1 │ [call] │ │ subspace :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_min :: Identifier │ scope_layer=1 │ [call] │ │ subspace :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [call] │ │ * :: Identifier │ scope_layer=1 │ [ref] │ │ weights :: Identifier │ scope_layer=1 │ ind_min :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [ref] │ │ hamiltonians :: Identifier │ scope_layer=1 │ hamiltonianshape :: Identifier │ scope_layer=1 │ [call] │ │ + :: Identifier │ scope_layer=1 │ H :: Identifier │ scope_layer=1 │ ['] │ scope_layer=1 │ H :: Identifier │ scope_layer=1 │ [call] │ │ Base.Docs.doc! :: Value │ macro_source=445 │ QSWalk :: Value │ macro_source=445 │ [call] │ │ Base.Docs.Binding :: Value │ macro_source=445 │ QSWalk :: Value │ │ [inert] │ jl_source=L65 │ nm_glob_ham :: Identifier │ │ [call] │ macro_source=445 │ Base.Docs.docstr :: Value │ macro_source=445 │ [call] │ macro_source=445 │ getindex :: Value │ macro_source=445 │ [call] │ macro_source=445 │ setindex! :: Value │ macro_source=445 │ Base.RefValue{Base.Docs.DocStr}(#undef) :: Value │ macro_source=445 │ [call] │ macro_source=445 │ Base.Docs.docstr :: Value │ macro_source=445 │ [call] │ macro_source=445 │ Core.svec :: Value │ macro_source=445 │ "\n nm_glob_ham(A[, hamiltonians][, weights, epsilon])\n\nReturn global Hamiltonian for the moralization procedure. Matrix `A` should the\nadjacency matrix of a directed graph, for which one aims to construct the\nnonmoralizing dynamics. Here, `hamiltonians` is an optional argument which is a\nDictionary with keys of type `Tuple{Int, Int}` or `Tuple{Vertex, Vertex}`. The\nfirst collects the submatrices according to their shape, while the second\ncollects them according to each pair of vertices. As the default all-one\nsubmatrices are chosen. The last argument states that only those elements for\nwhich `abs(A[i, j]) >= epsilon` are considered.\n\n*Note:* The submatrices of the result matrix are scaled by corresponding `weights`\nargument, which should be a square matrix of the same dimension as `A`. If `weights`\nis not provided, then `weights[i,j]=A[i,j]`, if `A[i,j]` is nonzero and `A[j,i]`\nis zero, `weights[i,j]=A[j,i]`, if `A[i,j]` in reverse scenario,\n`weights[i,j]=(A[i,j]+A[j,i])/2` if both are nonzero, and zero otherwise.\n\n# Examples\n\n```jldoctest; setup = :(using QSWalk)\njulia> A = [ 0 1 0; 1 0 1; 0 1 0]\n3×3 Array{Int64,2}:\n 0 1 0\n 1 0 1\n 0 1 0\n\njulia> nm_glob_ham(A) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n\njulia> dict_deg = Dict{Tuple{Int,Int},Matrix{ComplexF64}}((1, 2) => (2+1im)*ones(1, 2), (2, 1) =>1im*ones(2, 1));\n\njulia> nm_glob_ham(A, dict_deg) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+1.0im 2.0+1.0im 0.0+0.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 0.0+0.0im 0.0-1.0im 0.0-1.0im 0.0+0.0im\n\njulia> v1, v2, v3 = vlist(make_vertex_set(A))\n3-element Array{Vertex,1}:\n Vertex([1])\n Vertex([2, 3])\n Vertex([4])\n\njulia> dict_vec = Dict{Tuple{Vertex,Vertex},Matrix{ComplexF64}}((v1, v2) =>2*ones(1, 2), (v2, v3) =>[1im 2im;]');\n\njulia> nm_glob_ham(A, dict_vec) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+0.0im 2.0+0.0im 0.0+0.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-1.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-2.0im\n 0.0+0.0im 0.0+1.0im 0.0+2.0im 0.0+0.0im\n```\n" :: Value │ macro_source=445 │ [call] │ macro_source=445 │ Dict{Symbol, Any} :: Value │ macro_source=445 │ :path => "/home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl" :: Value │ macro_source=445 │ :linenumber => 276 :: Value │ macro_source=445 │ :module => QSWalk :: Value │ macro_source=445 │ [call] │ macro_source=445 │ Dict{Symbol, Any} :: Value │ macro_source=445 │ :path => "/home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl" :: Value │ macro_source=445 │ :linenumber => 276 :: Value │ macro_source=445 │ :module => QSWalk :: Value │ macro_source=445 │ [curly] │ │ Union :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [curly] │ │ Dict :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ Int :: Identifier │ scope_layer=1 │ Int :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ val :: Identifier │ scope_layer=3 │ [block] │ │ [=] │ │ val :: Identifier │ scope_layer=3 │ [function] │ │ [where] │ │ [call] │ │ nm_glob_ham :: Identifier │ scope_layer=1 │ [parameters] │ │ [kw] │ │ [::] │ │ epsilon :: Identifier │ scope_layer=1 │ Real :: Identifier │ scope_layer=1 │ [call] │ │ eps :: Identifier │ scope_layer=1 │ [kw] │ │ [::] │ │ weights :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [call] │ │ default_weights_glob_ham :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [::] │ │ A :: Identifier │ scope_layer=1 │ T :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ T :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [block] │ │ [=] │ │ revindlist :: Identifier │ scope_layer=1 │ [call] │ │ reversed_incidence_list :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ [kw] │ │ epsilon :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [=] │ │ alloneshamiltonians :: Identifier │ scope_layer=1 │ [call] │ │ [curly] │ │ Dict :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ Int :: Identifier │ scope_layer=1 │ Int :: Identifier │ scope_layer=1 │ T :: Identifier │ scope_layer=1 │ [for] │ │ [block] │ │ [=] │ │ v :: Identifier │ scope_layer=1 │ revindlist :: Identifier │ scope_layer=1 │ [=] │ │ w :: Identifier │ scope_layer=1 │ v :: Identifier │ scope_layer=1 │ [block] │ │ [=] │ │ w :: Identifier │ scope_layer=1 │ [ref] │ │ revindlist :: Identifier │ scope_layer=1 │ w :: Identifier │ scope_layer=1 │ [=] │ │ length_w :: Identifier │ scope_layer=1 │ [call] │ │ max :: Identifier │ scope_layer=1 │ 1 :: Value │ macro_source=445 │ [call] │ │ length :: Identifier │ scope_layer=1 │ w :: Identifier │ scope_layer=1 │ [=] │ │ length_v :: Identifier │ scope_layer=1 │ [call] │ │ max :: Identifier │ scope_layer=1 │ 1 :: Value │ macro_source=445 │ [call] │ │ length :: Identifier │ scope_layer=1 │ v :: Identifier │ scope_layer=1 │ [=] │ │ [ref] │ │ alloneshamiltonians :: Identifier │ scope_layer=1 │ [tuple] │ │ length_v :: Identifier │ scope_layer=1 │ length_w :: Identifier │ scope_layer=1 │ [call] │ │ ones :: Identifier │ scope_layer=1 │ length_v :: Identifier │ scope_layer=1 │ length_w :: Identifier │ scope_layer=1 │ [=] │ │ [ref] │ │ alloneshamiltonians :: Identifier │ scope_layer=1 │ [tuple] │ │ length_w :: Identifier │ scope_layer=1 │ length_v :: Identifier │ scope_layer=1 │ [call] │ │ ones :: Identifier │ scope_layer=1 │ length_w :: Identifier │ scope_layer=1 │ length_v :: Identifier │ scope_layer=1 │ [call] │ │ nm_glob_ham :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ alloneshamiltonians :: Identifier │ scope_layer=1 │ [kw] │ │ epsilon :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [call] │ │ Base.Docs.doc! :: Value │ macro_source=445 │ QSWalk :: Value │ macro_source=445 │ [call] │ │ Base.Docs.Binding :: Value │ macro_source=445 │ QSWalk :: Value │ │ [inert] │ jl_source=L65 │ nm_glob_ham :: Identifier │ │ [call] │ macro_source=445 │ Base.Docs.docstr :: Value │ macro_source=445 │ [call] │ macro_source=445 │ getindex :: Value │ macro_source=445 │ Base.RefValue{Base.Docs.DocStr}(#undef) :: Value │ macro_source=445 │ [call] │ macro_source=445 │ Dict{Symbol, Any} :: Value │ macro_source=445 │ :path => "/home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl" :: Value │ macro_source=445 │ :linenumber => 276 :: Value │ macro_source=445 │ :module => QSWalk :: Value │ macro_source=445 │ [where] │ │ [curly] │ │ Union :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ T :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ T :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ T :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ val :: Identifier │ scope_layer=3 │ [block] │ │ [=] │ │ val :: Identifier │ scope_layer=3 │ [function] │ │ [call] │ │ nm_glob_ham :: Identifier │ scope_layer=1 │ [parameters] │ │ [kw] │ │ [::] │ │ epsilon :: Identifier │ scope_layer=1 │ Real :: Identifier │ scope_layer=1 │ [call] │ │ eps :: Identifier │ scope_layer=1 │ [kw] │ │ [::] │ │ weights :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [call] │ │ default_weights_glob_ham :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [::] │ │ A :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [::] │ │ hamiltonians :: Identifier │ scope_layer=1 │ [curly] │ │ Dict :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ Vertex :: Identifier │ scope_layer=1 │ Vertex :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [block] │ │ [if] │ │ [call] │ │ >= :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ 0 :: Value │ macro_source=445 │ nothing :: Value │ macro_source=445 │ [call] │ │ throw :: Identifier │ mod,scope_layer=1 │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ ArgumentError :: Identifier │ │ "epsilon needs to be nonnegative" :: Value │ macro_source=445 │ [=] │ │ revincidence_list :: Identifier │ scope_layer=1 │ [call] │ │ reversed_incidence_list :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ [kw] │ │ epsilon :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [=] │ │ vset :: Identifier │ scope_layer=1 │ [call] │ │ revinc_to_vertexset :: Identifier │ scope_layer=1 │ revincidence_list :: Identifier │ scope_layer=1 │ [=] │ │ H :: Identifier │ scope_layer=1 │ [call] │ │ spzeros :: Identifier │ scope_layer=1 │ ComplexF64 :: Identifier │ scope_layer=1 │ [call] │ │ vertexsetsize :: Identifier │ scope_layer=1 │ vset :: Identifier │ scope_layer=1 │ [call] │ │ vertexsetsize :: Identifier │ scope_layer=1 │ vset :: Identifier │ scope_layer=1 │ [for] │ │ [block] │ │ [=] │ │ [tuple] │ │ index :: Identifier │ scope_layer=1 │ i :: Identifier │ scope_layer=1 │ [call] │ │ enumerate :: Identifier │ scope_layer=1 │ revincidence_list :: Identifier │ scope_layer=1 │ [=] │ │ j :: Identifier │ scope_layer=1 │ i :: Identifier │ scope_layer=1 │ [block] │ │ [=] │ │ [tuple] │ │ ind_min :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [call] │ │ sort :: Identifier │ scope_layer=1 │ [vect] │ │ index :: Identifier │ scope_layer=1 │ j :: Identifier │ scope_layer=1 │ [=] │ │ key :: Identifier │ scope_layer=1 │ [tuple] │ │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_min :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [if] │ │ [call] │ │ in :: Identifier │ scope_layer=1 │ key :: Identifier │ scope_layer=1 │ [call] │ │ keys :: Identifier │ scope_layer=1 │ hamiltonians :: Identifier │ scope_layer=1 │ nothing :: Value │ macro_source=445 │ [call] │ │ throw :: Identifier │ mod,scope_layer=1 │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ ArgumentError :: Identifier │ │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ string :: Identifier │ │ [string] │ │ "hamiltonian for " :: Value │ macro_source=445 │ key :: Identifier │ scope_layer=1 │ " not found" :: Value │ macro_source=445 │ [if] │ │ [call] │ │ == :: Identifier │ scope_layer=1 │ [.] │ │ length :: Identifier │ scope_layer=1 │ [tuple] │ │ key :: Identifier │ scope_layer=1 │ [call] │ │ size :: Identifier │ scope_layer=1 │ [ref] │ │ hamiltonians :: Identifier │ scope_layer=1 │ key :: Identifier │ scope_layer=1 │ nothing :: Value │ macro_source=445 │ [call] │ │ throw :: Identifier │ mod,scope_layer=1 │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ ArgumentError :: Identifier │ │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ string :: Identifier │ │ [string] │ │ "hamiltonian for key " :: Value │ macro_source=445 │ key :: Identifier │ scope_layer=1 │ " shoud have shape " :: Value │ macro_source=445 │ [.] │ │ length :: Identifier │ scope_layer=1 │ [tuple] │ │ key :: Identifier │ scope_layer=1 │ [=] │ │ [ref] │ │ H :: Identifier │ scope_layer=1 │ [call] │ │ subspace :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_min :: Identifier │ scope_layer=1 │ [call] │ │ subspace :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [call] │ │ * :: Identifier │ scope_layer=1 │ [ref] │ │ weights :: Identifier │ scope_layer=1 │ ind_min :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [ref] │ │ hamiltonians :: Identifier │ scope_layer=1 │ key :: Identifier │ scope_layer=1 │ [call] │ │ + :: Identifier │ scope_layer=1 │ H :: Identifier │ scope_layer=1 │ ['] │ scope_layer=1 │ H :: Identifier │ scope_layer=1 │ [call] │ │ Base.Docs.doc! :: Value │ macro_source=445 │ QSWalk :: Value │ macro_source=445 │ [call] │ │ Base.Docs.Binding :: Value │ macro_source=445 │ QSWalk :: Value │ │ [inert] │ jl_source=L65 │ nm_glob_ham :: Identifier │ │ [call] │ macro_source=445 │ Base.Docs.docstr :: Value │ macro_source=445 │ [call] │ macro_source=445 │ getindex :: Value │ macro_source=445 │ Base.RefValue{Base.Docs.DocStr}(#undef) :: Value │ macro_source=445 │ [call] │ macro_source=445 │ Dict{Symbol, Any} :: Value │ macro_source=445 │ :path => "/home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl" :: Value │ macro_source=445 │ :linenumber => 276 :: Value │ macro_source=445 │ :module => QSWalk :: Value │ macro_source=445 │ [curly] │ │ Union :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [curly] │ │ Dict :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ Vertex :: Identifier │ scope_layer=1 │ Vertex :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ val :: Identifier │ scope_layer=3 │ │ file = "/home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl" │ line = 276 └ mod = QSWalk ERROR: LoadError: internal lowering bug: #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:356 =# - `jl_assert(!(haskey(ssa_rewrites, lhs_id)), _)`: multiple assignments to ssavalue Expression:  (= #₄₉ (call core.TypeVar :#T1 #₅₄₉/Number)) Containing expressions:  (= #₄₉ (call core.TypeVar :#T1 #₅₄₉/Number))  Detailed provenance:  (= #₄₉ (call core.TypeVar :#T1 #₅₄₉/Number)) @#= /source/usr/share/julia/JuliaLowering/src/linear_ir.jl:366 =#  └─ (= #₄₉ (call core.TypeVar :#T1 #₁₃₀/Number)) @#= /source/usr/share/julia/JuliaLowering/src/closure_conversion.jl:197 =#  └─ (= #₄₉ (call core.TypeVar :#T1 #₁₃₀/Number)) @#= /source/usr/share/julia/JuliaLowering/src/desugaring.jl:231 =#  └─ (= #₄₉ (call core.TypeVar :#T1 Number)) @#= /source/usr/share/julia/JuliaLowering/src/desugaring.jl:231 =#  └─ (= #₄₉ (call core.TypeVar :#T1 Number))  └─ (call core.TypeVar :#T1 Number) @#= /source/usr/share/julia/JuliaLowering/src/desugaring.jl:3025 =#  └─ (<: Number)  └─ (<: Number)  └─ (<: Number)  └─ (<: Number)  ├─ @ /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:356  └─ (macrocall @doc :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:276 =#) "\n nm_glob_ham(A[, hamiltonians][, weights, epsilon])\n\nReturn global Hamiltonian for the moralization procedure. Matrix `A` should the\nadjacency matrix of a directed graph, for which one aims to construct the\nnonmoralizing dynamics. Here, `hamiltonians` is an optional argument which is a\nDictionary with keys of type `Tuple{Int, Int}` or `Tuple{Vertex, Vertex}`. The\nfirst collects the submatrices according to their shape, while the second\ncollects them according to each pair of vertices. As the default all-one\nsubmatrices are chosen. The last argument states that only those elements for\nwhich `abs(A[i, j]) >= epsilon` are considered.\n\n*Note:* The submatrices of the result matrix are scaled by corresponding `weights`\nargument, which should be a square matrix of the same dimension as `A`. If `weights`\nis not provided, then `weights[i,j]=A[i,j]`, if `A[i,j]` is nonzero and `A[j,i]`\nis zero, `weights[i,j]=A[j,i]`, if `A[i,j]` in reverse scenario,\n`weights[i,j]=(A[i,j]+A[j,i])/2` if both are nonzero, and zero otherwise.\n\n# Examples\n\n```jldoctest; setup = :(using QSWalk)\njulia> A = [ 0 1 0; 1 0 1; 0 1 0]\n3×3 Array{Int64,2}:\n 0 1 0\n 1 0 1\n 0 1 0\n\njulia> nm_glob_ham(A) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n\njulia> dict_deg = Dict{Tuple{Int,Int},Matrix{ComplexF64}}((1, 2) => (2+1im)*ones(1, 2), (2, 1) =>1im*ones(2, 1));\n\njulia> nm_glob_ham(A, dict_deg) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+1.0im 2.0+1.0im 0.0+0.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 0.0+0.0im 0.0-1.0im 0.0-1.0im 0.0+0.0im\n\njulia> v1, v2, v3 = vlist(make_vertex_set(A))\n3-element Array{Vertex,1}:\n Vertex([1])\n Vertex([2, 3])\n Vertex([4])\n\njulia> dict_vec = Dict{Tuple{Vertex,Vertex},Matrix{ComplexF64}}((v1, v2) =>2*ones(1, 2), (v2, v3) =>[1im 2im;]');\n\njulia> nm_glob_ham(A, dict_vec) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+0.0im 2.0+0.0im 0.0+0.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-1.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-2.0im\n 0.0+0.0im 0.0+1.0im 0.0+2.0im 0.0+0.0im\n```\n" (tuple (function (call nm_glob_ham (parameters (kw (:: epsilon Real) (call eps)) (kw (:: weights (curly AbstractMatrix (<: Number))) (call default_weights_glob_ham A epsilon))) (:: A (curly AbstractMatrix (<: Number))) (:: hamiltonians (curly Dict (curly Tuple Int Int) (<: (curly AbstractMatrix (<: Number)))))) (block (macrocall @argumentcheck :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:340 =#) (call >= epsilon 0) "epsilon needs to be nonnegative") (= revincidence_list (call reversed_incidence_list A (kw epsilon epsilon))) (= vset (call revinc_to_vertexset revincidence_list)) (= H (call spzeros ComplexF64 (call vertexsetsize vset) (call vertexsetsize vset))) (for (block (= (tuple index i) (call enumerate revincidence_list)) (= j i)) (block (= (tuple ind_min ind_max) (call sort (vect index j))) (= hamiltonianshape (. length (tuple (tuple (call subspace (ref vset ind_min)) (call subspace (ref vset ind_max)))))) (macrocall @argumentcheck :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:349 =#) (call in hamiltonianshape (call keys hamiltonians)) (string "hamiltonian of size " hamiltonianshape " not found")) (macrocall @argumentcheck :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:350 =#) (call == hamiltonianshape (call size (ref hamiltonians hamiltonianshape))) (string "hamiltonian for key " hamiltonianshape " shoud have shape " hamiltonianshape)) (= (ref H (call subspace (ref vset ind_min)) (call subspace (ref vset ind_max))) (call * (ref weights ind_min ind_max) (ref hamiltonians hamiltonianshape))))) (call + H (' H)))) (function (where (call nm_glob_ham (parameters (kw (:: epsilon Real) (call eps)) (kw (:: weights (curly AbstractMatrix (<: Number))) (call default_weights_glob_ham A epsilon))) (:: A T)) (<: T (curly AbstractMatrix (<: Number)))) (block (= revindlist (call reversed_incidence_list A (kw epsilon epsilon))) (= alloneshamiltonians (call (curly Dict (curly Tuple Int Int) T))) (for (block (= v revindlist) (= w v)) (block (= w (ref revindlist w)) (= length_w (call max 1 (call length w))) (= length_v (call max 1 (call length v))) (= (ref alloneshamiltonians (tuple length_v length_w)) (call ones length_v length_w)) (= (ref alloneshamiltonians (tuple length_w length_v)) (call ones length_w length_v)))) (call nm_glob_ham A alloneshamiltonians (kw epsilon epsilon)))) (function (call nm_glob_ham (parameters (kw (:: epsilon Real) (call eps)) (kw (:: weights (curly AbstractMatrix (<: Number))) (call default_weights_glob_ham A epsilon))) (:: A (curly AbstractMatrix (<: Number))) (:: hamiltonians (curly Dict (curly Tuple Vertex Vertex) (<: (curly AbstractMatrix (<: Number)))))) (block (macrocall @argumentcheck :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:376 =#) (call >= epsilon 0) "epsilon needs to be nonnegative") (= revincidence_list (call reversed_incidence_list A (kw epsilon epsilon))) (= vset (call revinc_to_vertexset revincidence_list)) (= H (call spzeros ComplexF64 (call vertexsetsize vset) (call vertexsetsize vset))) (for (block (= (tuple index i) (call enumerate revincidence_list)) (= j i)) (block (= (tuple ind_min ind_max) (call sort (vect index j))) (= key (tuple (ref vset ind_min) (ref vset ind_max))) (macrocall @argumentcheck :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:384 =#) (call in key (call keys hamiltonians)) (string "hamiltonian for " key " not found")) (macrocall @argumentcheck :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:385 =#) (call == (. length (tuple key)) (call size (ref hamiltonians key))) (string "hamiltonian for key " key " shoud have shape " (. length (tuple key)))) (= (ref H (call subspace (ref vset ind_min)) (call subspace (ref vset ind_max))) (call * (ref weights ind_min ind_max) (ref hamiltonians key))))) (call + H (' H))))))  └─ @ /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:276  Stacktrace:  [1] iterate(A::Base.JuliaSyntax.SyntaxList{Dict{Symbol, Dict{Int64, Any}}, Vector{Int64}})  @ Base /source/usr/share/julia/JuliaLowering/src/ast.jl:23 [inlined]  [2] renumber_body(ctx::Base.JuliaLowering.LinearIRContext{Dict{Symbol, Dict{Int64, Any}}}, input_code::Base.JuliaSyntax.SyntaxList{Dict{Symbol, Dict{Int64, Any}}, Vector{Int64}}, slot_rewrites::Dict{Int64, Int64})  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/linear_ir.jl:1106  [3] compile_lambda(outer_ctx::Base.JuliaLowering.LinearIRContext{Dict{Symbol, Dict{Int64, Any}}}, ex::Base.JuliaSyntax.SyntaxTree{Dict{Symbol, Dict{Int64, Any}}})  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/linear_ir.jl:1223  [4] linearize_ir(ctx::Base.JuliaLowering.ClosureConversionCtx{Dict{Symbol, Dict{Int64, Any}}}, ex::Base.JuliaSyntax.SyntaxTree{Dict{Symbol, Dict{Int64, Any}}})  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/linear_ir.jl:1253  [5] core_lowering_hook(code::Any, mod::Module, file::String, line::UInt64, world::UInt64, _warn::Bool)  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/hooks.jl:33  [6] include(mapexpr::Function, mod::Module, _path::String)  @ Base ./Base.jl:327  [7] top-level scope  @ ~/.julia/packages/QSWalk/jBcBb/src/QSWalk.jl:10  [8] include(mod::Module, _path::String)  @ Base ./Base.jl:326  [9] include_package_for_output(pkg::Base.PkgId, input::String, syntax_version::VersionNumber, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)  @ Base ./loading.jl:3271  [10] top-level scope  @ stdin:5  [11] eval(m::Module, e::Any)  @ Core ./boot.jl:517  [12] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)  @ Base ./loading.jl:3113  [13] push!(a::Vector{SubString{String}}, item::String)  @ Base ./loading.jl:3123 [inlined]  [14] exec_options(opts::Base.JLOptions)  @ Base ./client.jl:353  [15] _start()  @ Base ./client.jl:596 in expression starting at /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:276 in expression starting at /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/QSWalk.jl:1 in expression starting at stdin:5 ✗ QSWalk 1 dependency successfully precompiled in 73 seconds. 10 already precompiled. Precompilation completed after 103.3s ################################################################################ # Testing # Testing QSWalk Status `/tmp/jl_ryJkve/Project.toml` [a1e7a1ef] Expokit v0.2.0 [2ef04bfc] QSWalk v1.1.1 [37e2e46d] LinearAlgebra v1.13.0 [2f01184e] SparseArrays v1.13.0 [8dfed614] Test v1.11.0 Status `/tmp/jl_ryJkve/Manifest.toml` [a1e7a1ef] Expokit v0.2.0 [2ef04bfc] QSWalk v1.1.1 [56f22d72] Artifacts v1.11.0 [2a0f44e3] Base64 v1.11.0 [b77e0a4c] InteractiveUtils v1.11.0 [ac6e5ff7] JuliaSyntaxHighlighting v1.13.0 [8f399da3] Libdl v1.11.0 [37e2e46d] LinearAlgebra v1.13.0 [56ddb016] Logging v1.11.0 [d6f4376e] Markdown v1.11.0 [9a3f8284] Random v1.11.0 [ea8e919c] SHA v1.13.0 [9e88b42a] Serialization v1.11.0 [2f01184e] SparseArrays v1.13.0 [f489334b] StyledStrings v1.13.0 [8dfed614] Test v1.11.0 [e66e0078] CompilerSupportLibraries_jll v1.5.1+0 [4536629a] OpenBLAS_jll v0.3.33+0 [bea87d4a] SuiteSparse_jll v7.10.1+0 [8e850b90] libblastrampoline_jll v5.15.0+0 Testing Running tests... ┌ Info: JuliaLowering threw given input: │ code = │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:276 =# Core.@doc "\n nm_glob_ham(A[, hamiltonians][, weights, epsilon])\n\nReturn global Hamiltonian for the moralization procedure. Matrix `A` should the\nadjacency matrix of a directed graph, for which one aims to construct the\nnonmoralizing dynamics. Here, `hamiltonians` is an optional argument which is a\nDictionary with keys of type `Tuple{Int, Int}` or `Tuple{Vertex, Vertex}`. The\nfirst collects the submatrices according to their shape, while the second\ncollects them according to each pair of vertices. As the default all-one\nsubmatrices are chosen. The last argument states that only those elements for\nwhich `abs(A[i, j]) >= epsilon` are considered.\n\n*Note:* The submatrices of the result matrix are scaled by corresponding `weights`\nargument, which should be a square matrix of the same dimension as `A`. If `weights`\nis not provided, then `weights[i,j]=A[i,j]`, if `A[i,j]` is nonzero and `A[j,i]`\nis zero, `weights[i,j]=A[j,i]`, if `A[i,j]` in reverse scenario,\n`weights[i,j]=(A[i,j]+A[j,i])/2` if both are nonzero, and zero otherwise.\n\n# Examples\n\n```jldoctest; setup = :(using QSWalk)\njulia> A = [ 0 1 0; 1 0 1; 0 1 0]\n3×3 Array{Int64,2}:\n 0 1 0\n 1 0 1\n 0 1 0\n\njulia> nm_glob_ham(A) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n\njulia> dict_deg = Dict{Tuple{Int,Int},Matrix{ComplexF64}}((1, 2) => (2+1im)*ones(1, 2), (2, 1) =>1im*ones(2, 1));\n\njulia> nm_glob_ham(A, dict_deg) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+1.0im 2.0+1.0im 0.0+0.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 0.0+0.0im 0.0-1.0im 0.0-1.0im 0.0+0.0im\n\njulia> v1, v2, v3 = vlist(make_vertex_set(A))\n3-element Array{Vertex,1}:\n Vertex([1])\n Vertex([2, 3])\n Vertex([4])\n\njulia> dict_vec = Dict{Tuple{Vertex,Vertex},Matrix{ComplexF64}}((v1, v2) =>2*ones(1, 2), (v2, v3) =>[1im 2im;]');\n\njulia> nm_glob_ham(A, dict_vec) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+0.0im 2.0+0.0im 0.0+0.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-1.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-2.0im\n 0.0+0.0im 0.0+1.0im 0.0+2.0im 0.0+0.0im\n```\n" (function nm_glob_ham(A::AbstractMatrix{<:Number}, hamiltonians::Dict{Tuple{Int, Int}, <:AbstractMatrix{<:Number}}; epsilon::Real = eps(), weights::AbstractMatrix{<:Number} = default_weights_glob_ham(A, epsilon)) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:336 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:340 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:340 =# @argumentcheck epsilon >= 0 "epsilon needs to be nonnegative" │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:342 =# │ revincidence_list = reversed_incidence_list(A, epsilon = epsilon) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:343 =# │ vset = revinc_to_vertexset(revincidence_list) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:345 =# │ H = spzeros(ComplexF64, vertexsetsize(vset), vertexsetsize(vset)) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:346 =# │ for (index, i) = enumerate(revincidence_list), j = i │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:347 =# │ (ind_min, ind_max) = sort([index, j]) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:348 =# │ hamiltonianshape = length.((subspace(vset[ind_min]), subspace(vset[ind_max]))) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:349 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:349 =# @argumentcheck hamiltonianshape in keys(hamiltonians) "hamiltonian of size $(hamiltonianshape) not found" │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:350 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:350 =# @argumentcheck hamiltonianshape == size(hamiltonians[hamiltonianshape]) "hamiltonian for key $(hamiltonianshape) shoud have shape $(hamiltonianshape)" │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:351 =# │ H[subspace(vset[ind_min]), subspace(vset[ind_max])] = weights[ind_min, ind_max] * hamiltonians[hamiltonianshape] │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:352 =# │ end │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:353 =# │ H + H' │ end, function nm_glob_ham(A::T; epsilon::Real = eps(), weights::AbstractMatrix{<:Number} = default_weights_glob_ham(A, epsilon)) where T <: AbstractMatrix{<:Number} │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:356 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:360 =# │ revindlist = reversed_incidence_list(A, epsilon = epsilon) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:361 =# │ alloneshamiltonians = Dict{Tuple{Int, Int}, T}() │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:362 =# │ for v = revindlist, w = v │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:363 =# │ w = revindlist[w] │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:364 =# │ length_w = max(1, length(w)) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:365 =# │ length_v = max(1, length(v)) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:366 =# │ alloneshamiltonians[(length_v, length_w)] = ones(length_v, length_w) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:367 =# │ alloneshamiltonians[(length_w, length_v)] = ones(length_w, length_v) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:368 =# │ end │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:369 =# │ nm_glob_ham(A, alloneshamiltonians, epsilon = epsilon) │ end, function nm_glob_ham(A::AbstractMatrix{<:Number}, hamiltonians::Dict{Tuple{Vertex, Vertex}, <:AbstractMatrix{<:Number}}; epsilon::Real = eps(), weights::AbstractMatrix{<:Number} = default_weights_glob_ham(A, epsilon)) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:372 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:376 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:376 =# @argumentcheck epsilon >= 0 "epsilon needs to be nonnegative" │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:377 =# │ revincidence_list = reversed_incidence_list(A, epsilon = epsilon) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:378 =# │ vset = revinc_to_vertexset(revincidence_list) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:380 =# │ H = spzeros(ComplexF64, vertexsetsize(vset), vertexsetsize(vset)) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:381 =# │ for (index, i) = enumerate(revincidence_list), j = i │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:382 =# │ (ind_min, ind_max) = sort([index, j]) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:383 =# │ key = (vset[ind_min], vset[ind_max]) │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:384 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:384 =# @argumentcheck key in keys(hamiltonians) "hamiltonian for $(key) not found" │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:385 =# │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:385 =# @argumentcheck length.(key) == size(hamiltonians[key]) "hamiltonian for key $(key) shoud have shape $(length.(key))" │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:386 =# │ H[subspace(vset[ind_min]), subspace(vset[ind_max])] = weights[ind_min, ind_max] * hamiltonians[key] │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:387 =# │ end │ #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:388 =# │ H + H' │ end)) │ st0 = │ SyntaxTree with attributes mod,kind,var_id,toplevel_pure,scope_type,macro_source,name_val,syntax_flags,meta,scope_layer,value,jl_source,is_toplevel_thunk,source,__macro_ctx__ │ [macrocall] │ │ @doc :: Identifier │ mod │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:276 =#) :: Value │ │ "\n nm_glob_ham(A[, hamiltonians][, weights, epsilon])\n\nReturn global Hamiltonian for the moralization procedure. Matrix `A` should the\nadjacency matrix of a directed graph, for which one aims to construct the\nnonmoralizing dynamics. Here, `hamiltonians` is an optional argument which is a\nDictionary with keys of type `Tuple{Int, Int}` or `Tuple{Vertex, Vertex}`. The\nfirst collects the submatrices according to their shape, while the second\ncollects them according to each pair of vertices. As the default all-one\nsubmatrices are chosen. The last argument states that only those elements for\nwhich `abs(A[i, j]) >= epsilon` are considered.\n\n*Note:* The submatrices of the result matrix are scaled by corresponding `weights`\nargument, which should be a square matrix of the same dimension as `A`. If `weights`\nis not provided, then `weights[i,j]=A[i,j]`, if `A[i,j]` is nonzero and `A[j,i]`\nis zero, `weights[i,j]=A[j,i]`, if `A[i,j]` in reverse scenario,\n`weights[i,j]=(A[i,j]+A[j,i])/2` if both are nonzero, and zero otherwise.\n\n# Examples\n\n```jldoctest; setup = :(using QSWalk)\njulia> A = [ 0 1 0; 1 0 1; 0 1 0]\n3×3 Array{Int64,2}:\n 0 1 0\n 1 0 1\n 0 1 0\n\njulia> nm_glob_ham(A) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n\njulia> dict_deg = Dict{Tuple{Int,Int},Matrix{ComplexF64}}((1, 2) => (2+1im)*ones(1, 2), (2, 1) =>1im*ones(2, 1));\n\njulia> nm_glob_ham(A, dict_deg) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+1.0im 2.0+1.0im 0.0+0.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 0.0+0.0im 0.0-1.0im 0.0-1.0im 0.0+0.0im\n\njulia> v1, v2, v3 = vlist(make_vertex_set(A))\n3-element Array{Vertex,1}:\n Vertex([1])\n Vertex([2, 3])\n Vertex([4])\n\njulia> dict_vec = Dict{Tuple{Vertex,Vertex},Matrix{ComplexF64}}((v1, v2) =>2*ones(1, 2), (v2, v3) =>[1im 2im;]');\n\njulia> nm_glob_ham(A, dict_vec) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+0.0im 2.0+0.0im 0.0+0.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-1.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-2.0im\n 0.0+0.0im 0.0+1.0im 0.0+2.0im 0.0+0.0im\n```\n" :: Value │ │ [tuple] │ │ [function] │ │ [call] │ │ nm_glob_ham :: Identifier │ │ [parameters] │ │ [kw] │ │ [::] │ │ epsilon :: Identifier │ │ Real :: Identifier │ │ [call] │ │ eps :: Identifier │ │ [kw] │ │ [::] │ │ weights :: Identifier │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [call] │ │ default_weights_glob_ham :: Identifier │ │ A :: Identifier │ │ epsilon :: Identifier │ │ [::] │ │ A :: Identifier │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [::] │ │ hamiltonians :: Identifier │ │ [curly] │ │ Dict :: Identifier │ │ [curly] │ │ Tuple :: Identifier │ │ Int :: Identifier │ │ Int :: Identifier │ │ [<:] │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [block] │ │ [macrocall] │ │ @argumentcheck :: Identifier │ │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:340 =#) :: Value │ │ [call] │ │ >= :: Identifier │ │ epsilon :: Identifier │ │ 0 :: Value │ │ "epsilon needs to be nonnegative" :: Value │ │ [=] │ │ revincidence_list :: Identifier │ │ [call] │ │ reversed_incidence_list :: Identifier │ │ A :: Identifier │ │ [kw] │ │ epsilon :: Identifier │ │ epsilon :: Identifier │ │ [=] │ │ vset :: Identifier │ │ [call] │ │ revinc_to_vertexset :: Identifier │ │ revincidence_list :: Identifier │ │ [=] │ │ H :: Identifier │ │ [call] │ │ spzeros :: Identifier │ │ ComplexF64 :: Identifier │ │ [call] │ │ vertexsetsize :: Identifier │ │ vset :: Identifier │ │ [call] │ │ vertexsetsize :: Identifier │ │ vset :: Identifier │ │ [for] │ │ [block] │ │ [=] │ │ [tuple] │ │ index :: Identifier │ │ i :: Identifier │ │ [call] │ │ enumerate :: Identifier │ │ revincidence_list :: Identifier │ │ [=] │ │ j :: Identifier │ │ i :: Identifier │ │ [block] │ │ [=] │ │ [tuple] │ │ ind_min :: Identifier │ │ ind_max :: Identifier │ │ [call] │ │ sort :: Identifier │ │ [vect] │ │ index :: Identifier │ │ j :: Identifier │ │ [=] │ │ hamiltonianshape :: Identifier │ │ [.] │ │ length :: Identifier │ │ [tuple] │ │ [tuple] │ │ [call] │ │ subspace :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_min :: Identifier │ │ [call] │ │ subspace :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_max :: Identifier │ │ [macrocall] │ │ @argumentcheck :: Identifier │ │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:349 =#) :: Value │ │ [call] │ │ in :: Identifier │ │ hamiltonianshape :: Identifier │ │ [call] │ │ keys :: Identifier │ │ hamiltonians :: Identifier │ │ [string] │ │ "hamiltonian of size " :: Value │ │ hamiltonianshape :: Identifier │ │ " not found" :: Value │ │ [macrocall] │ │ @argumentcheck :: Identifier │ │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:350 =#) :: Value │ │ [call] │ │ == :: Identifier │ │ hamiltonianshape :: Identifier │ │ [call] │ │ size :: Identifier │ │ [ref] │ │ hamiltonians :: Identifier │ │ hamiltonianshape :: Identifier │ │ [string] │ │ "hamiltonian for key " :: Value │ │ hamiltonianshape :: Identifier │ │ " shoud have shape " :: Value │ │ hamiltonianshape :: Identifier │ │ [=] │ │ [ref] │ │ H :: Identifier │ │ [call] │ │ subspace :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_min :: Identifier │ │ [call] │ │ subspace :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_max :: Identifier │ │ [call] │ │ * :: Identifier │ │ [ref] │ │ weights :: Identifier │ │ ind_min :: Identifier │ │ ind_max :: Identifier │ │ [ref] │ │ hamiltonians :: Identifier │ │ hamiltonianshape :: Identifier │ │ [call] │ │ + :: Identifier │ │ H :: Identifier │ │ ['] │ │ H :: Identifier │ │ [function] │ │ [where] │ │ [call] │ │ nm_glob_ham :: Identifier │ │ [parameters] │ │ [kw] │ │ [::] │ │ epsilon :: Identifier │ │ Real :: Identifier │ │ [call] │ │ eps :: Identifier │ │ [kw] │ │ [::] │ │ weights :: Identifier │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [call] │ │ default_weights_glob_ham :: Identifier │ │ A :: Identifier │ │ epsilon :: Identifier │ │ [::] │ │ A :: Identifier │ │ T :: Identifier │ │ [<:] │ │ T :: Identifier │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [block] │ │ [=] │ │ revindlist :: Identifier │ │ [call] │ │ reversed_incidence_list :: Identifier │ │ A :: Identifier │ │ [kw] │ │ epsilon :: Identifier │ │ epsilon :: Identifier │ │ [=] │ │ alloneshamiltonians :: Identifier │ │ [call] │ │ [curly] │ │ Dict :: Identifier │ │ [curly] │ │ Tuple :: Identifier │ │ Int :: Identifier │ │ Int :: Identifier │ │ T :: Identifier │ │ [for] │ │ [block] │ │ [=] │ │ v :: Identifier │ │ revindlist :: Identifier │ │ [=] │ │ w :: Identifier │ │ v :: Identifier │ │ [block] │ │ [=] │ │ w :: Identifier │ │ [ref] │ │ revindlist :: Identifier │ │ w :: Identifier │ │ [=] │ │ length_w :: Identifier │ │ [call] │ │ max :: Identifier │ │ 1 :: Value │ │ [call] │ │ length :: Identifier │ │ w :: Identifier │ │ [=] │ │ length_v :: Identifier │ │ [call] │ │ max :: Identifier │ │ 1 :: Value │ │ [call] │ │ length :: Identifier │ │ v :: Identifier │ │ [=] │ │ [ref] │ │ alloneshamiltonians :: Identifier │ │ [tuple] │ │ length_v :: Identifier │ │ length_w :: Identifier │ │ [call] │ │ ones :: Identifier │ │ length_v :: Identifier │ │ length_w :: Identifier │ │ [=] │ │ [ref] │ │ alloneshamiltonians :: Identifier │ │ [tuple] │ │ length_w :: Identifier │ │ length_v :: Identifier │ │ [call] │ │ ones :: Identifier │ │ length_w :: Identifier │ │ length_v :: Identifier │ │ [call] │ │ nm_glob_ham :: Identifier │ │ A :: Identifier │ │ alloneshamiltonians :: Identifier │ │ [kw] │ │ epsilon :: Identifier │ │ epsilon :: Identifier │ │ [function] │ │ [call] │ │ nm_glob_ham :: Identifier │ │ [parameters] │ │ [kw] │ │ [::] │ │ epsilon :: Identifier │ │ Real :: Identifier │ │ [call] │ │ eps :: Identifier │ │ [kw] │ │ [::] │ │ weights :: Identifier │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [call] │ │ default_weights_glob_ham :: Identifier │ │ A :: Identifier │ │ epsilon :: Identifier │ │ [::] │ │ A :: Identifier │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [::] │ │ hamiltonians :: Identifier │ │ [curly] │ │ Dict :: Identifier │ │ [curly] │ │ Tuple :: Identifier │ │ Vertex :: Identifier │ │ Vertex :: Identifier │ │ [<:] │ │ [curly] │ │ AbstractMatrix :: Identifier │ │ [<:] │ │ Number :: Identifier │ │ [block] │ │ [macrocall] │ │ @argumentcheck :: Identifier │ │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:376 =#) :: Value │ │ [call] │ │ >= :: Identifier │ │ epsilon :: Identifier │ │ 0 :: Value │ │ "epsilon needs to be nonnegative" :: Value │ │ [=] │ │ revincidence_list :: Identifier │ │ [call] │ │ reversed_incidence_list :: Identifier │ │ A :: Identifier │ │ [kw] │ │ epsilon :: Identifier │ │ epsilon :: Identifier │ │ [=] │ │ vset :: Identifier │ │ [call] │ │ revinc_to_vertexset :: Identifier │ │ revincidence_list :: Identifier │ │ [=] │ │ H :: Identifier │ │ [call] │ │ spzeros :: Identifier │ │ ComplexF64 :: Identifier │ │ [call] │ │ vertexsetsize :: Identifier │ │ vset :: Identifier │ │ [call] │ │ vertexsetsize :: Identifier │ │ vset :: Identifier │ │ [for] │ │ [block] │ │ [=] │ │ [tuple] │ │ index :: Identifier │ │ i :: Identifier │ │ [call] │ │ enumerate :: Identifier │ │ revincidence_list :: Identifier │ │ [=] │ │ j :: Identifier │ │ i :: Identifier │ │ [block] │ │ [=] │ │ [tuple] │ │ ind_min :: Identifier │ │ ind_max :: Identifier │ │ [call] │ │ sort :: Identifier │ │ [vect] │ │ index :: Identifier │ │ j :: Identifier │ │ [=] │ │ key :: Identifier │ │ [tuple] │ │ [ref] │ │ vset :: Identifier │ │ ind_min :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_max :: Identifier │ │ [macrocall] │ │ @argumentcheck :: Identifier │ │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:384 =#) :: Value │ │ [call] │ │ in :: Identifier │ │ key :: Identifier │ │ [call] │ │ keys :: Identifier │ │ hamiltonians :: Identifier │ │ [string] │ │ "hamiltonian for " :: Value │ │ key :: Identifier │ │ " not found" :: Value │ │ [macrocall] │ │ @argumentcheck :: Identifier │ │ :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:385 =#) :: Value │ │ [call] │ │ == :: Identifier │ │ [.] │ │ length :: Identifier │ │ [tuple] │ │ key :: Identifier │ │ [call] │ │ size :: Identifier │ │ [ref] │ │ hamiltonians :: Identifier │ │ key :: Identifier │ │ [string] │ │ "hamiltonian for key " :: Value │ │ key :: Identifier │ │ " shoud have shape " :: Value │ │ [.] │ │ length :: Identifier │ │ [tuple] │ │ key :: Identifier │ │ [=] │ │ [ref] │ │ H :: Identifier │ │ [call] │ │ subspace :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_min :: Identifier │ │ [call] │ │ subspace :: Identifier │ │ [ref] │ │ vset :: Identifier │ │ ind_max :: Identifier │ │ [call] │ │ * :: Identifier │ │ [ref] │ │ weights :: Identifier │ │ ind_min :: Identifier │ │ ind_max :: Identifier │ │ [ref] │ │ hamiltonians :: Identifier │ │ key :: Identifier │ │ [call] │ │ + :: Identifier │ │ H :: Identifier │ │ ['] │ │ H :: Identifier │ │ │ st1 = │ SyntaxTree with attributes mod,kind,var_id,toplevel_pure,scope_type,macro_source,name_val,syntax_flags,meta,scope_layer,value,jl_source,is_toplevel_thunk,source │ [block] │ │ [block] │ │ [=] │ │ val :: Identifier │ scope_layer=3 │ [function] │ │ [call] │ │ nm_glob_ham :: Identifier │ scope_layer=1 │ [parameters] │ │ [kw] │ │ [::] │ │ epsilon :: Identifier │ scope_layer=1 │ Real :: Identifier │ scope_layer=1 │ [call] │ │ eps :: Identifier │ scope_layer=1 │ [kw] │ │ [::] │ │ weights :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [call] │ │ default_weights_glob_ham :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [::] │ │ A :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [::] │ │ hamiltonians :: Identifier │ scope_layer=1 │ [curly] │ │ Dict :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ Int :: Identifier │ scope_layer=1 │ Int :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [block] │ │ [if] │ │ [call] │ │ >= :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ 0 :: Value │ macro_source=445 │ nothing :: Value │ macro_source=445 │ [call] │ │ throw :: Identifier │ mod,scope_layer=1 │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ ArgumentError :: Identifier │ │ "epsilon needs to be nonnegative" :: Value │ macro_source=445 │ [=] │ │ revincidence_list :: Identifier │ scope_layer=1 │ [call] │ │ reversed_incidence_list :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ [kw] │ │ epsilon :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [=] │ │ vset :: Identifier │ scope_layer=1 │ [call] │ │ revinc_to_vertexset :: Identifier │ scope_layer=1 │ revincidence_list :: Identifier │ scope_layer=1 │ [=] │ │ H :: Identifier │ scope_layer=1 │ [call] │ │ spzeros :: Identifier │ scope_layer=1 │ ComplexF64 :: Identifier │ scope_layer=1 │ [call] │ │ vertexsetsize :: Identifier │ scope_layer=1 │ vset :: Identifier │ scope_layer=1 │ [call] │ │ vertexsetsize :: Identifier │ scope_layer=1 │ vset :: Identifier │ scope_layer=1 │ [for] │ │ [block] │ │ [=] │ │ [tuple] │ │ index :: Identifier │ scope_layer=1 │ i :: Identifier │ scope_layer=1 │ [call] │ │ enumerate :: Identifier │ scope_layer=1 │ revincidence_list :: Identifier │ scope_layer=1 │ [=] │ │ j :: Identifier │ scope_layer=1 │ i :: Identifier │ scope_layer=1 │ [block] │ │ [=] │ │ [tuple] │ │ ind_min :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [call] │ │ sort :: Identifier │ scope_layer=1 │ [vect] │ │ index :: Identifier │ scope_layer=1 │ j :: Identifier │ scope_layer=1 │ [=] │ │ hamiltonianshape :: Identifier │ scope_layer=1 │ [.] │ │ length :: Identifier │ scope_layer=1 │ [tuple] │ │ [tuple] │ │ [call] │ │ subspace :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_min :: Identifier │ scope_layer=1 │ [call] │ │ subspace :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [if] │ │ [call] │ │ in :: Identifier │ scope_layer=1 │ hamiltonianshape :: Identifier │ scope_layer=1 │ [call] │ │ keys :: Identifier │ scope_layer=1 │ hamiltonians :: Identifier │ scope_layer=1 │ nothing :: Value │ macro_source=445 │ [call] │ │ throw :: Identifier │ mod,scope_layer=1 │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ ArgumentError :: Identifier │ │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ string :: Identifier │ │ [string] │ │ "hamiltonian of size " :: Value │ macro_source=445 │ hamiltonianshape :: Identifier │ scope_layer=1 │ " not found" :: Value │ macro_source=445 │ [if] │ │ [call] │ │ == :: Identifier │ scope_layer=1 │ hamiltonianshape :: Identifier │ scope_layer=1 │ [call] │ │ size :: Identifier │ scope_layer=1 │ [ref] │ │ hamiltonians :: Identifier │ scope_layer=1 │ hamiltonianshape :: Identifier │ scope_layer=1 │ nothing :: Value │ macro_source=445 │ [call] │ │ throw :: Identifier │ mod,scope_layer=1 │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ ArgumentError :: Identifier │ │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ string :: Identifier │ │ [string] │ │ "hamiltonian for key " :: Value │ macro_source=445 │ hamiltonianshape :: Identifier │ scope_layer=1 │ " shoud have shape " :: Value │ macro_source=445 │ hamiltonianshape :: Identifier │ scope_layer=1 │ [=] │ │ [ref] │ │ H :: Identifier │ scope_layer=1 │ [call] │ │ subspace :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_min :: Identifier │ scope_layer=1 │ [call] │ │ subspace :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [call] │ │ * :: Identifier │ scope_layer=1 │ [ref] │ │ weights :: Identifier │ scope_layer=1 │ ind_min :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [ref] │ │ hamiltonians :: Identifier │ scope_layer=1 │ hamiltonianshape :: Identifier │ scope_layer=1 │ [call] │ │ + :: Identifier │ scope_layer=1 │ H :: Identifier │ scope_layer=1 │ ['] │ scope_layer=1 │ H :: Identifier │ scope_layer=1 │ [call] │ │ Base.Docs.doc! :: Value │ macro_source=445 │ QSWalk :: Value │ macro_source=445 │ [call] │ │ Base.Docs.Binding :: Value │ macro_source=445 │ QSWalk :: Value │ │ [inert] │ jl_source=L65 │ nm_glob_ham :: Identifier │ │ [call] │ macro_source=445 │ Base.Docs.docstr :: Value │ macro_source=445 │ [call] │ macro_source=445 │ getindex :: Value │ macro_source=445 │ [call] │ macro_source=445 │ setindex! :: Value │ macro_source=445 │ Base.RefValue{Base.Docs.DocStr}(#undef) :: Value │ macro_source=445 │ [call] │ macro_source=445 │ Base.Docs.docstr :: Value │ macro_source=445 │ [call] │ macro_source=445 │ Core.svec :: Value │ macro_source=445 │ "\n nm_glob_ham(A[, hamiltonians][, weights, epsilon])\n\nReturn global Hamiltonian for the moralization procedure. Matrix `A` should the\nadjacency matrix of a directed graph, for which one aims to construct the\nnonmoralizing dynamics. Here, `hamiltonians` is an optional argument which is a\nDictionary with keys of type `Tuple{Int, Int}` or `Tuple{Vertex, Vertex}`. The\nfirst collects the submatrices according to their shape, while the second\ncollects them according to each pair of vertices. As the default all-one\nsubmatrices are chosen. The last argument states that only those elements for\nwhich `abs(A[i, j]) >= epsilon` are considered.\n\n*Note:* The submatrices of the result matrix are scaled by corresponding `weights`\nargument, which should be a square matrix of the same dimension as `A`. If `weights`\nis not provided, then `weights[i,j]=A[i,j]`, if `A[i,j]` is nonzero and `A[j,i]`\nis zero, `weights[i,j]=A[j,i]`, if `A[i,j]` in reverse scenario,\n`weights[i,j]=(A[i,j]+A[j,i])/2` if both are nonzero, and zero otherwise.\n\n# Examples\n\n```jldoctest; setup = :(using QSWalk)\njulia> A = [ 0 1 0; 1 0 1; 0 1 0]\n3×3 Array{Int64,2}:\n 0 1 0\n 1 0 1\n 0 1 0\n\njulia> nm_glob_ham(A) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n\njulia> dict_deg = Dict{Tuple{Int,Int},Matrix{ComplexF64}}((1, 2) => (2+1im)*ones(1, 2), (2, 1) =>1im*ones(2, 1));\n\njulia> nm_glob_ham(A, dict_deg) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+1.0im 2.0+1.0im 0.0+0.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 0.0+0.0im 0.0-1.0im 0.0-1.0im 0.0+0.0im\n\njulia> v1, v2, v3 = vlist(make_vertex_set(A))\n3-element Array{Vertex,1}:\n Vertex([1])\n Vertex([2, 3])\n Vertex([4])\n\njulia> dict_vec = Dict{Tuple{Vertex,Vertex},Matrix{ComplexF64}}((v1, v2) =>2*ones(1, 2), (v2, v3) =>[1im 2im;]');\n\njulia> nm_glob_ham(A, dict_vec) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+0.0im 2.0+0.0im 0.0+0.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-1.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-2.0im\n 0.0+0.0im 0.0+1.0im 0.0+2.0im 0.0+0.0im\n```\n" :: Value │ macro_source=445 │ [call] │ macro_source=445 │ Dict{Symbol, Any} :: Value │ macro_source=445 │ :path => "/home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl" :: Value │ macro_source=445 │ :linenumber => 276 :: Value │ macro_source=445 │ :module => QSWalk :: Value │ macro_source=445 │ [call] │ macro_source=445 │ Dict{Symbol, Any} :: Value │ macro_source=445 │ :path => "/home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl" :: Value │ macro_source=445 │ :linenumber => 276 :: Value │ macro_source=445 │ :module => QSWalk :: Value │ macro_source=445 │ [curly] │ │ Union :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [curly] │ │ Dict :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ Int :: Identifier │ scope_layer=1 │ Int :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ val :: Identifier │ scope_layer=3 │ [block] │ │ [=] │ │ val :: Identifier │ scope_layer=3 │ [function] │ │ [where] │ │ [call] │ │ nm_glob_ham :: Identifier │ scope_layer=1 │ [parameters] │ │ [kw] │ │ [::] │ │ epsilon :: Identifier │ scope_layer=1 │ Real :: Identifier │ scope_layer=1 │ [call] │ │ eps :: Identifier │ scope_layer=1 │ [kw] │ │ [::] │ │ weights :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [call] │ │ default_weights_glob_ham :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [::] │ │ A :: Identifier │ scope_layer=1 │ T :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ T :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [block] │ │ [=] │ │ revindlist :: Identifier │ scope_layer=1 │ [call] │ │ reversed_incidence_list :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ [kw] │ │ epsilon :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [=] │ │ alloneshamiltonians :: Identifier │ scope_layer=1 │ [call] │ │ [curly] │ │ Dict :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ Int :: Identifier │ scope_layer=1 │ Int :: Identifier │ scope_layer=1 │ T :: Identifier │ scope_layer=1 │ [for] │ │ [block] │ │ [=] │ │ v :: Identifier │ scope_layer=1 │ revindlist :: Identifier │ scope_layer=1 │ [=] │ │ w :: Identifier │ scope_layer=1 │ v :: Identifier │ scope_layer=1 │ [block] │ │ [=] │ │ w :: Identifier │ scope_layer=1 │ [ref] │ │ revindlist :: Identifier │ scope_layer=1 │ w :: Identifier │ scope_layer=1 │ [=] │ │ length_w :: Identifier │ scope_layer=1 │ [call] │ │ max :: Identifier │ scope_layer=1 │ 1 :: Value │ macro_source=445 │ [call] │ │ length :: Identifier │ scope_layer=1 │ w :: Identifier │ scope_layer=1 │ [=] │ │ length_v :: Identifier │ scope_layer=1 │ [call] │ │ max :: Identifier │ scope_layer=1 │ 1 :: Value │ macro_source=445 │ [call] │ │ length :: Identifier │ scope_layer=1 │ v :: Identifier │ scope_layer=1 │ [=] │ │ [ref] │ │ alloneshamiltonians :: Identifier │ scope_layer=1 │ [tuple] │ │ length_v :: Identifier │ scope_layer=1 │ length_w :: Identifier │ scope_layer=1 │ [call] │ │ ones :: Identifier │ scope_layer=1 │ length_v :: Identifier │ scope_layer=1 │ length_w :: Identifier │ scope_layer=1 │ [=] │ │ [ref] │ │ alloneshamiltonians :: Identifier │ scope_layer=1 │ [tuple] │ │ length_w :: Identifier │ scope_layer=1 │ length_v :: Identifier │ scope_layer=1 │ [call] │ │ ones :: Identifier │ scope_layer=1 │ length_w :: Identifier │ scope_layer=1 │ length_v :: Identifier │ scope_layer=1 │ [call] │ │ nm_glob_ham :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ alloneshamiltonians :: Identifier │ scope_layer=1 │ [kw] │ │ epsilon :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [call] │ │ Base.Docs.doc! :: Value │ macro_source=445 │ QSWalk :: Value │ macro_source=445 │ [call] │ │ Base.Docs.Binding :: Value │ macro_source=445 │ QSWalk :: Value │ │ [inert] │ jl_source=L65 │ nm_glob_ham :: Identifier │ │ [call] │ macro_source=445 │ Base.Docs.docstr :: Value │ macro_source=445 │ [call] │ macro_source=445 │ getindex :: Value │ macro_source=445 │ Base.RefValue{Base.Docs.DocStr}(#undef) :: Value │ macro_source=445 │ [call] │ macro_source=445 │ Dict{Symbol, Any} :: Value │ macro_source=445 │ :path => "/home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl" :: Value │ macro_source=445 │ :linenumber => 276 :: Value │ macro_source=445 │ :module => QSWalk :: Value │ macro_source=445 │ [where] │ │ [curly] │ │ Union :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ T :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ T :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ T :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ val :: Identifier │ scope_layer=3 │ [block] │ │ [=] │ │ val :: Identifier │ scope_layer=3 │ [function] │ │ [call] │ │ nm_glob_ham :: Identifier │ scope_layer=1 │ [parameters] │ │ [kw] │ │ [::] │ │ epsilon :: Identifier │ scope_layer=1 │ Real :: Identifier │ scope_layer=1 │ [call] │ │ eps :: Identifier │ scope_layer=1 │ [kw] │ │ [::] │ │ weights :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [call] │ │ default_weights_glob_ham :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [::] │ │ A :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [::] │ │ hamiltonians :: Identifier │ scope_layer=1 │ [curly] │ │ Dict :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ Vertex :: Identifier │ scope_layer=1 │ Vertex :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [block] │ │ [if] │ │ [call] │ │ >= :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ 0 :: Value │ macro_source=445 │ nothing :: Value │ macro_source=445 │ [call] │ │ throw :: Identifier │ mod,scope_layer=1 │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ ArgumentError :: Identifier │ │ "epsilon needs to be nonnegative" :: Value │ macro_source=445 │ [=] │ │ revincidence_list :: Identifier │ scope_layer=1 │ [call] │ │ reversed_incidence_list :: Identifier │ scope_layer=1 │ A :: Identifier │ scope_layer=1 │ [kw] │ │ epsilon :: Identifier │ scope_layer=1 │ epsilon :: Identifier │ scope_layer=1 │ [=] │ │ vset :: Identifier │ scope_layer=1 │ [call] │ │ revinc_to_vertexset :: Identifier │ scope_layer=1 │ revincidence_list :: Identifier │ scope_layer=1 │ [=] │ │ H :: Identifier │ scope_layer=1 │ [call] │ │ spzeros :: Identifier │ scope_layer=1 │ ComplexF64 :: Identifier │ scope_layer=1 │ [call] │ │ vertexsetsize :: Identifier │ scope_layer=1 │ vset :: Identifier │ scope_layer=1 │ [call] │ │ vertexsetsize :: Identifier │ scope_layer=1 │ vset :: Identifier │ scope_layer=1 │ [for] │ │ [block] │ │ [=] │ │ [tuple] │ │ index :: Identifier │ scope_layer=1 │ i :: Identifier │ scope_layer=1 │ [call] │ │ enumerate :: Identifier │ scope_layer=1 │ revincidence_list :: Identifier │ scope_layer=1 │ [=] │ │ j :: Identifier │ scope_layer=1 │ i :: Identifier │ scope_layer=1 │ [block] │ │ [=] │ │ [tuple] │ │ ind_min :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [call] │ │ sort :: Identifier │ scope_layer=1 │ [vect] │ │ index :: Identifier │ scope_layer=1 │ j :: Identifier │ scope_layer=1 │ [=] │ │ key :: Identifier │ scope_layer=1 │ [tuple] │ │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_min :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [if] │ │ [call] │ │ in :: Identifier │ scope_layer=1 │ key :: Identifier │ scope_layer=1 │ [call] │ │ keys :: Identifier │ scope_layer=1 │ hamiltonians :: Identifier │ scope_layer=1 │ nothing :: Value │ macro_source=445 │ [call] │ │ throw :: Identifier │ mod,scope_layer=1 │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ ArgumentError :: Identifier │ │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ string :: Identifier │ │ [string] │ │ "hamiltonian for " :: Value │ macro_source=445 │ key :: Identifier │ scope_layer=1 │ " not found" :: Value │ macro_source=445 │ [if] │ │ [call] │ │ == :: Identifier │ scope_layer=1 │ [.] │ │ length :: Identifier │ scope_layer=1 │ [tuple] │ │ key :: Identifier │ scope_layer=1 │ [call] │ │ size :: Identifier │ scope_layer=1 │ [ref] │ │ hamiltonians :: Identifier │ scope_layer=1 │ key :: Identifier │ scope_layer=1 │ nothing :: Value │ macro_source=445 │ [call] │ │ throw :: Identifier │ mod,scope_layer=1 │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ ArgumentError :: Identifier │ │ [call] │ │ [.] │ │ [.] │ │ Main :: Identifier │ mod,scope_layer=1 │ [inert] │ │ Base :: Identifier │ │ [inert] │ │ string :: Identifier │ │ [string] │ │ "hamiltonian for key " :: Value │ macro_source=445 │ key :: Identifier │ scope_layer=1 │ " shoud have shape " :: Value │ macro_source=445 │ [.] │ │ length :: Identifier │ scope_layer=1 │ [tuple] │ │ key :: Identifier │ scope_layer=1 │ [=] │ │ [ref] │ │ H :: Identifier │ scope_layer=1 │ [call] │ │ subspace :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_min :: Identifier │ scope_layer=1 │ [call] │ │ subspace :: Identifier │ scope_layer=1 │ [ref] │ │ vset :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [call] │ │ * :: Identifier │ scope_layer=1 │ [ref] │ │ weights :: Identifier │ scope_layer=1 │ ind_min :: Identifier │ scope_layer=1 │ ind_max :: Identifier │ scope_layer=1 │ [ref] │ │ hamiltonians :: Identifier │ scope_layer=1 │ key :: Identifier │ scope_layer=1 │ [call] │ │ + :: Identifier │ scope_layer=1 │ H :: Identifier │ scope_layer=1 │ ['] │ scope_layer=1 │ H :: Identifier │ scope_layer=1 │ [call] │ │ Base.Docs.doc! :: Value │ macro_source=445 │ QSWalk :: Value │ macro_source=445 │ [call] │ │ Base.Docs.Binding :: Value │ macro_source=445 │ QSWalk :: Value │ │ [inert] │ jl_source=L65 │ nm_glob_ham :: Identifier │ │ [call] │ macro_source=445 │ Base.Docs.docstr :: Value │ macro_source=445 │ [call] │ macro_source=445 │ getindex :: Value │ macro_source=445 │ Base.RefValue{Base.Docs.DocStr}(#undef) :: Value │ macro_source=445 │ [call] │ macro_source=445 │ Dict{Symbol, Any} :: Value │ macro_source=445 │ :path => "/home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl" :: Value │ macro_source=445 │ :linenumber => 276 :: Value │ macro_source=445 │ :module => QSWalk :: Value │ macro_source=445 │ [curly] │ │ Union :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ [curly] │ │ Dict :: Identifier │ scope_layer=1 │ [curly] │ │ Tuple :: Identifier │ scope_layer=1 │ Vertex :: Identifier │ scope_layer=1 │ Vertex :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ [curly] │ │ AbstractMatrix :: Identifier │ scope_layer=1 │ [<:] │ scope_layer=1 │ Number :: Identifier │ scope_layer=1 │ val :: Identifier │ scope_layer=3 │ │ file = "/home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl" │ line = 276 └ mod = QSWalk ERROR: LoadError: internal lowering bug: #= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:356 =# - `jl_assert(!(haskey(ssa_rewrites, lhs_id)), _)`: multiple assignments to ssavalue Expression:  (= #₄₉ (call core.TypeVar :#T1 #₅₄₉/Number)) Containing expressions:  (= #₄₉ (call core.TypeVar :#T1 #₅₄₉/Number))  Detailed provenance:  (= #₄₉ (call core.TypeVar :#T1 #₅₄₉/Number)) @#= /source/usr/share/julia/JuliaLowering/src/linear_ir.jl:366 =#  └─ (= #₄₉ (call core.TypeVar :#T1 #₁₃₀/Number)) @#= /source/usr/share/julia/JuliaLowering/src/closure_conversion.jl:197 =#  └─ (= #₄₉ (call core.TypeVar :#T1 #₁₃₀/Number)) @#= /source/usr/share/julia/JuliaLowering/src/desugaring.jl:231 =#  └─ (= #₄₉ (call core.TypeVar :#T1 Number)) @#= /source/usr/share/julia/JuliaLowering/src/desugaring.jl:231 =#  └─ (= #₄₉ (call core.TypeVar :#T1 Number))  └─ (call core.TypeVar :#T1 Number) @#= /source/usr/share/julia/JuliaLowering/src/desugaring.jl:3025 =#  └─ (<: Number)  └─ (<: Number)  └─ (<: Number)  └─ (<: Number)  ├─ @ /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:356  └─ (macrocall @doc :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:276 =#) "\n nm_glob_ham(A[, hamiltonians][, weights, epsilon])\n\nReturn global Hamiltonian for the moralization procedure. Matrix `A` should the\nadjacency matrix of a directed graph, for which one aims to construct the\nnonmoralizing dynamics. Here, `hamiltonians` is an optional argument which is a\nDictionary with keys of type `Tuple{Int, Int}` or `Tuple{Vertex, Vertex}`. The\nfirst collects the submatrices according to their shape, while the second\ncollects them according to each pair of vertices. As the default all-one\nsubmatrices are chosen. The last argument states that only those elements for\nwhich `abs(A[i, j]) >= epsilon` are considered.\n\n*Note:* The submatrices of the result matrix are scaled by corresponding `weights`\nargument, which should be a square matrix of the same dimension as `A`. If `weights`\nis not provided, then `weights[i,j]=A[i,j]`, if `A[i,j]` is nonzero and `A[j,i]`\nis zero, `weights[i,j]=A[j,i]`, if `A[i,j]` in reverse scenario,\n`weights[i,j]=(A[i,j]+A[j,i])/2` if both are nonzero, and zero otherwise.\n\n# Examples\n\n```jldoctest; setup = :(using QSWalk)\njulia> A = [ 0 1 0; 1 0 1; 0 1 0]\n3×3 Array{Int64,2}:\n 0 1 0\n 1 0 1\n 0 1 0\n\njulia> nm_glob_ham(A) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 1.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im\n 0.0+0.0im 1.0+0.0im 1.0+0.0im 0.0+0.0im\n\njulia> dict_deg = Dict{Tuple{Int,Int},Matrix{ComplexF64}}((1, 2) => (2+1im)*ones(1, 2), (2, 1) =>1im*ones(2, 1));\n\njulia> nm_glob_ham(A, dict_deg) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+1.0im 2.0+1.0im 0.0+0.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 2.0-1.0im 0.0+0.0im 0.0+0.0im 0.0+1.0im\n 0.0+0.0im 0.0-1.0im 0.0-1.0im 0.0+0.0im\n\njulia> v1, v2, v3 = vlist(make_vertex_set(A))\n3-element Array{Vertex,1}:\n Vertex([1])\n Vertex([2, 3])\n Vertex([4])\n\njulia> dict_vec = Dict{Tuple{Vertex,Vertex},Matrix{ComplexF64}}((v1, v2) =>2*ones(1, 2), (v2, v3) =>[1im 2im;]');\n\njulia> nm_glob_ham(A, dict_vec) |> Matrix\n4×4 Array{Complex{Float64},2}:\n 0.0+0.0im 2.0+0.0im 2.0+0.0im 0.0+0.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-1.0im\n 2.0+0.0im 0.0+0.0im 0.0+0.0im 0.0-2.0im\n 0.0+0.0im 0.0+1.0im 0.0+2.0im 0.0+0.0im\n```\n" (tuple (function (call nm_glob_ham (parameters (kw (:: epsilon Real) (call eps)) (kw (:: weights (curly AbstractMatrix (<: Number))) (call default_weights_glob_ham A epsilon))) (:: A (curly AbstractMatrix (<: Number))) (:: hamiltonians (curly Dict (curly Tuple Int Int) (<: (curly AbstractMatrix (<: Number)))))) (block (macrocall @argumentcheck :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:340 =#) (call >= epsilon 0) "epsilon needs to be nonnegative") (= revincidence_list (call reversed_incidence_list A (kw epsilon epsilon))) (= vset (call revinc_to_vertexset revincidence_list)) (= H (call spzeros ComplexF64 (call vertexsetsize vset) (call vertexsetsize vset))) (for (block (= (tuple index i) (call enumerate revincidence_list)) (= j i)) (block (= (tuple ind_min ind_max) (call sort (vect index j))) (= hamiltonianshape (. length (tuple (tuple (call subspace (ref vset ind_min)) (call subspace (ref vset ind_max)))))) (macrocall @argumentcheck :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:349 =#) (call in hamiltonianshape (call keys hamiltonians)) (string "hamiltonian of size " hamiltonianshape " not found")) (macrocall @argumentcheck :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:350 =#) (call == hamiltonianshape (call size (ref hamiltonians hamiltonianshape))) (string "hamiltonian for key " hamiltonianshape " shoud have shape " hamiltonianshape)) (= (ref H (call subspace (ref vset ind_min)) (call subspace (ref vset ind_max))) (call * (ref weights ind_min ind_max) (ref hamiltonians hamiltonianshape))))) (call + H (' H)))) (function (where (call nm_glob_ham (parameters (kw (:: epsilon Real) (call eps)) (kw (:: weights (curly AbstractMatrix (<: Number))) (call default_weights_glob_ham A epsilon))) (:: A T)) (<: T (curly AbstractMatrix (<: Number)))) (block (= revindlist (call reversed_incidence_list A (kw epsilon epsilon))) (= alloneshamiltonians (call (curly Dict (curly Tuple Int Int) T))) (for (block (= v revindlist) (= w v)) (block (= w (ref revindlist w)) (= length_w (call max 1 (call length w))) (= length_v (call max 1 (call length v))) (= (ref alloneshamiltonians (tuple length_v length_w)) (call ones length_v length_w)) (= (ref alloneshamiltonians (tuple length_w length_v)) (call ones length_w length_v)))) (call nm_glob_ham A alloneshamiltonians (kw epsilon epsilon)))) (function (call nm_glob_ham (parameters (kw (:: epsilon Real) (call eps)) (kw (:: weights (curly AbstractMatrix (<: Number))) (call default_weights_glob_ham A epsilon))) (:: A (curly AbstractMatrix (<: Number))) (:: hamiltonians (curly Dict (curly Tuple Vertex Vertex) (<: (curly AbstractMatrix (<: Number)))))) (block (macrocall @argumentcheck :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:376 =#) (call >= epsilon 0) "epsilon needs to be nonnegative") (= revincidence_list (call reversed_incidence_list A (kw epsilon epsilon))) (= vset (call revinc_to_vertexset revincidence_list)) (= H (call spzeros ComplexF64 (call vertexsetsize vset) (call vertexsetsize vset))) (for (block (= (tuple index i) (call enumerate revincidence_list)) (= j i)) (block (= (tuple ind_min ind_max) (call sort (vect index j))) (= key (tuple (ref vset ind_min) (ref vset ind_max))) (macrocall @argumentcheck :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:384 =#) (call in key (call keys hamiltonians)) (string "hamiltonian for " key " not found")) (macrocall @argumentcheck :(#= /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:385 =#) (call == (. length (tuple key)) (call size (ref hamiltonians key))) (string "hamiltonian for key " key " shoud have shape " (. length (tuple key)))) (= (ref H (call subspace (ref vset ind_min)) (call subspace (ref vset ind_max))) (call * (ref weights ind_min ind_max) (ref hamiltonians key))))) (call + H (' H))))))  └─ @ /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:276  Stacktrace:  [1] iterate(A::Base.JuliaSyntax.SyntaxList{Dict{Symbol, Dict{Int64, Any}}, Vector{Int64}})  @ Base /source/usr/share/julia/JuliaLowering/src/ast.jl:23 [inlined]  [2] renumber_body(ctx::Base.JuliaLowering.LinearIRContext{Dict{Symbol, Dict{Int64, Any}}}, input_code::Base.JuliaSyntax.SyntaxList{Dict{Symbol, Dict{Int64, Any}}, Vector{Int64}}, slot_rewrites::Dict{Int64, Int64})  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/linear_ir.jl:1106  [3] compile_lambda(outer_ctx::Base.JuliaLowering.LinearIRContext{Dict{Symbol, Dict{Int64, Any}}}, ex::Base.JuliaSyntax.SyntaxTree{Dict{Symbol, Dict{Int64, Any}}})  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/linear_ir.jl:1223  [4] linearize_ir(ctx::Base.JuliaLowering.ClosureConversionCtx{Dict{Symbol, Dict{Int64, Any}}}, ex::Base.JuliaSyntax.SyntaxTree{Dict{Symbol, Dict{Int64, Any}}})  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/linear_ir.jl:1253  [5] core_lowering_hook(code::Any, mod::Module, file::String, line::UInt64, world::UInt64, _warn::Bool)  @ Base.JuliaLowering /source/usr/share/julia/JuliaLowering/src/hooks.jl:33  [6] include(mapexpr::Function, mod::Module, _path::String)  @ Base ./Base.jl:327  [7] top-level scope  @ ~/.julia/packages/QSWalk/jBcBb/src/QSWalk.jl:10  [8] include(mod::Module, _path::String)  @ Base ./Base.jl:326  [9] include_package_for_output(pkg::Base.PkgId, input::String, syntax_version::VersionNumber, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)  @ Base ./loading.jl:3271  [10] top-level scope  @ stdin:5  [11] eval(m::Module, e::Any)  @ Core ./boot.jl:517  [12] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)  @ Base ./loading.jl:3113  [13] push!(a::Vector{SubString{String}}, item::String)  @ Base ./loading.jl:3123 [inlined]  [14] exec_options(opts::Base.JLOptions)  @ Base ./client.jl:353  [15] _start()  @ Base ./client.jl:596 in expression starting at /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/demoralization.jl:276 in expression starting at /home/pkgeval/.julia/packages/QSWalk/jBcBb/src/QSWalk.jl:1 in expression starting at stdin:5 1 dependency had output during precompilation: ┌ QSWalk │ [Output was shown above] └ ERROR: LoadError: The following 1 package failed to precompile: QSWalk Failed to precompile QSWalk [2ef04bfc-99ca-5394-8b07-22b12ff94927] to "/home/pkgeval/.julia/compiled/v1.14/QSWalk/jl_Kca1Xl" (ProcessExited(1)). in expression starting at /home/pkgeval/.julia/packages/QSWalk/jBcBb/test/runtests.jl:2 Testing failed after 85.12s ERROR: LoadError: Package QSWalk errored during testing Stacktrace: [1] pkgerror(msg::String) @ Pkg.Types /opt/julia/share/julia/stdlib/v1.14/Pkg/src/Types.jl:68 [2] test(ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool) @ Pkg.Operations /opt/julia/share/julia/stdlib/v1.14/Pkg/src/Operations.jl:3247 [3] Cmd(cmd::Cmd) @ Base /opt/julia/share/julia/stdlib/v1.14/Pkg/src/Operations.jl:3110 [inlined] [4] test(ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool, kwargs::@Kwargs{io::IOContext{IO}}) @ Pkg.API /opt/julia/share/julia/stdlib/v1.14/Pkg/src/API.jl:587 [5] test(pkgs::Vector{PackageSpec}; io::IOContext{IO}, kwargs::@Kwargs{julia_args::Cmd}) @ Pkg.API /opt/julia/share/julia/stdlib/v1.14/Pkg/src/API.jl:172 [6] test(pkgs::Vector{String}; kwargs::@Kwargs{julia_args::Cmd}) @ Pkg.API /opt/julia/share/julia/stdlib/v1.14/Pkg/src/API.jl:160 [7] test @ /opt/julia/share/julia/stdlib/v1.14/Pkg/src/API.jl:160 [inlined] [8] test(pkg::String; kwargs::@Kwargs{julia_args::Cmd}) @ Pkg.API /opt/julia/share/julia/stdlib/v1.14/Pkg/src/API.jl:159 [inlined] [9] top-level scope @ /PkgEval.jl/scripts/evaluate.jl:223 [10] include(mod::Module, _path::String) @ Base ./Base.jl:326 [11] exec_options(opts::Base.JLOptions) @ Base ./client.jl:355 [12] _start() @ Base ./client.jl:596 in expression starting at /PkgEval.jl/scripts/evaluate.jl:214 PkgEval failed after 229.87s: package fails to precompile