Skip to content

Commit

Permalink
fix source code error
Browse files Browse the repository at this point in the history
  • Loading branch information
xmgao committed Nov 25, 2024
1 parent 131bb2c commit fe63f5d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qns/network/protocol/entanglement_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from qns.models.epr import WernerStateEntanglement
from qns.simulator.ts import Time
import qns.utils.log as log
from qns.utils.rnd import get_rand


class Transmit():
Expand Down Expand Up @@ -209,10 +210,10 @@ def handle_response(self, packet: RecvClassicPacket):
transmit.first_epr_name)
second_epr: WernerStateEntanglement = self.memory.read(
transmit.second_epr_name)
#change code
#Check fidelitu before swapping
# change code
# Check fidelitu before swapping
if first_epr.fidelity < 0.7 or second_epr.fidelity < 0.7:
#Inroduce probability of decoherence based on fidelity
# Inroduce probability of decoherence based on fidelity
print("test")
decoherence_probability = 1 - min(first_epr.fidelity, second_epr.fidelity) / 0.7
if get_rand() < decoherence_probability:
Expand Down

0 comments on commit fe63f5d

Please sign in to comment.