Skip to content

Commit

Permalink
convert zmeas and xmeas in swapper to Int explicitly (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
ba2tro authored Oct 18, 2024
1 parent b8721ad commit 9ace582
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ProtocolZoo/swapping.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ end
xmeas, zmeas = swapcircuit(q1, q2)
# send from here to new entanglement counterpart:
# tag with EntanglementUpdateX past_local_node, past_local_slot_idx past_remote_slot_idx new_remote_node, new_remote_slot, correction
msg1 = Tag(EntanglementUpdateX, prot.node, q1.idx, tag1[3], tag2[2], tag2[3], xmeas)
msg1 = Tag(EntanglementUpdateX, prot.node, q1.idx, tag1[3], tag2[2], tag2[3], Int(xmeas))
put!(channel(prot.net, prot.node=>tag1[2]; permit_forward=true), msg1)
@debug "SwapperProt @$(prot.node)|round $(round): Send message to $(tag1[2]) | message=`$msg1` | time = $(now(prot.sim))"
# send from here to new entanglement counterpart:
# tag with EntanglementUpdateZ past_local_node, past_local_slot_idx past_remote_slot_idx new_remote_node, new_remote_slot, correction
msg2 = Tag(EntanglementUpdateZ, prot.node, q2.idx, tag2[3], tag1[2], tag1[3], zmeas)
msg2 = Tag(EntanglementUpdateZ, prot.node, q2.idx, tag2[3], tag1[2], tag1[3], Int(zmeas))
put!(channel(prot.net, prot.node=>tag2[2]; permit_forward=true), msg2)
@debug "SwapperProt @$(prot.node)|round $(round): Send message to $(tag2[2]) | message=`$msg2` | time = $(now(prot.sim))"
@yield timeout(prot.sim, prot.local_busy_time)
Expand Down

0 comments on commit 9ace582

Please sign in to comment.