From e06d1278b23508ef185e9f11f1f180dae649b57e Mon Sep 17 00:00:00 2001 From: xmgao Date: Mon, 25 Nov 2024 16:21:01 +0800 Subject: [PATCH] unchange the code --- qns/network/protocol/entanglement_distribution.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/qns/network/protocol/entanglement_distribution.py b/qns/network/protocol/entanglement_distribution.py index 9dbb1ad..3d324ef 100644 --- a/qns/network/protocol/entanglement_distribution.py +++ b/qns/network/protocol/entanglement_distribution.py @@ -209,18 +209,6 @@ 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 - if first_epr.fidelity < 0.7 or second_epr.fidelity < 0.7: - #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: - log.debug(f"{self.own}:Decoherence occurred, revoking entanglement.") - self.revoke_entanglement(transmit, from_node, cchannel) - self.restart_request(transmit) - return - # new_epr = first_epr.swapping(second_epr, name=uuid.uuid4().hex) log.debug( f"{self.own}:perform swap use {first_epr} and {second_epr}")