Skip to content

Commit

Permalink
Fix JET tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BKaperick committed Sep 24, 2024
1 parent 3013fba commit b41c5bf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/ProtocolZoo/switches.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ julia> let
function promponas_bruteforce_choice(M,N,backlog,eprobs) # TODO mark as public but unexported
@warn "The switch optimization routine is using a random placeholder optimization method due to issues with installing the BlossomV algorithm. Do not rely on this code to validate research results."
return randperm(N)[1:M]
# TODO-MATCHING due to the dependence on BlossomV.jl this has trouble installing. See https://github.com/JuliaGraphs/GraphsMatching.jl/issues/14
#= TODO-MATCHING due to the dependence on BlossomV.jl this has trouble installing. See https://github.com/JuliaGraphs/GraphsMatching.jl/issues/14
best_weight = 0.0
best_assignment = zeros(Int, M)
graphs = [complete_graph(i) for i in 1:M] # preallocating them to avoid expensive allocations in the inner loop
Expand All @@ -91,8 +91,10 @@ function promponas_bruteforce_choice(M,N,backlog,eprobs) # TODO mark as public b
end
end
return found ? best_assignment : nothing
=#
end

#= TODO-MATCHING due to the dependence on BlossomV.jl this has trouble installing. See https://github.com/JuliaGraphs/GraphsMatching.jl/issues/14
"""
Perform the match of clients in `entangled_nodes` based on matching weights from `backlog`.
`g` and `w` are just preallocated buffers.
Expand All @@ -111,6 +113,7 @@ function match_entangled_pattern(backlog, entangled_nodes, g, w)
mate = [(entangled_nodes[i],entangled_nodes[j]) for (i,j) in enumerate(match.mate) if i<j]
return (;weight, mate)
end
=#

"""Some of the external optimizers we use create a ton of junk console output. This function redirects stdout to hide the junk."""
function capture_stdout(f)
Expand Down
1 change: 1 addition & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
JumpProcesses = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Expand Down
3 changes: 2 additions & 1 deletion test/test_jet.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@testitem "JET" tags=[:jet] begin
using JET
using DiffEqBase, Graphs, JumpProcesses, Makie, ResumableFunctions, ConcurrentSim, QuantumOptics, QuantumOpticsBase, QuantumClifford, Symbolics, WignerSymbols, SumTypes
using DiffEqBase, Graphs, JumpProcesses, Makie, ResumableFunctions, ConcurrentSim, QuantumOptics, QuantumOpticsBase, QuantumClifford, Symbolics, WignerSymbols, JuMP, SumTypes

rep = report_package("QuantumSavory";
ignored_modules=(
Expand All @@ -16,6 +16,7 @@ rep = report_package("QuantumSavory";
AnyFrameModule(ResumableFunctions),
AnyFrameModule(ConcurrentSim),
AnyFrameModule(WignerSymbols),
AnyFrameModule(JuMP.Containers),
AnyFrameModule(SumTypes),
))

Expand Down

0 comments on commit b41c5bf

Please sign in to comment.