Skip to content

Commit

Permalink
add new protocol to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ba2tro committed Nov 6, 2024
1 parent 66ae3a4 commit f344058
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion test/test_controlplane.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testitem "Control Protocol" tags=[:controlplane] begin
@testitem "Control Protocols" tags=[:controlplane] begin

using QuantumSavory
using QuantumSavory.ProtocolZoo
Expand Down Expand Up @@ -57,4 +57,38 @@ for i in 1:length(consumer.log)
@test consumer.log[i][3] 1.0
end

#### Connection less controller

net = RegisterNet(graph, [Register(regsize) for i in 1:8])
sim = get_time_tracker(net)

# controller
controller = CLController(sim, net, 6)
@process controller()

# RequestGenerator for the user pair (1,8)
req_gen = RequestGenerator(sim, net, 1, 8, 6)
@process req_gen()

# consumer
consumer = EntanglementConsumer(sim, net, 1, 8)
@process consumer()

# entanglement and request trackers, cutoff protocol
for v in 1:8
etracker = EntanglementTracker(sim, net, v)
rtracker = RequestTracker(sim, net, v)
cutoff = CutoffProt(sim, net, v)
@process etracker()
@process rtracker()
@process cutoff()
end

run(sim, 1000)

for i in 1:length(consumer.log)
@test consumer.log[i][2] 1.0
@test consumer.log[i][3] 1.0
end

end

0 comments on commit f344058

Please sign in to comment.