Skip to content

[unitaryHACK] Added BB84 protocol example using QuNetSim #90#102

Merged
stephendiadamo merged 3 commits intotqsd:masterfrom
RamAIbot:add-bb84-protocol
May 21, 2021
Merged

[unitaryHACK] Added BB84 protocol example using QuNetSim #90#102
stephendiadamo merged 3 commits intotqsd:masterfrom
RamAIbot:add-bb84-protocol

Conversation

@RamAIbot
Copy link
Copy Markdown
Contributor

Issue: #90
I have added the BB84 protocol example using the QuNetSim components. Here we have two host which can communicate with each other (Alice and Bob). They have bidirectional classical and quantum communication network. Their communication is intercepted by Eve host and retransmitted so that the packets looks normal.
The BB84 protocol helps to find out whether there is an interceptor. The protocol is implemented and when there is no interception ,it then encodes and sends the message which can be decoded at other end. If there is an interception it stops without sending the message and we can start the protocol once again and check.

If you want to discuss any of this, feel free to reach out to me on the Unitary Fund Discord server.

@stephendiadamo stephendiadamo self-requested a review May 16, 2021 09:01
Copy link
Copy Markdown
Collaborator

@stephendiadamo stephendiadamo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good so far!

I would suggest the following as a start to the review:

  • Can you run this code through a PEP8 Linter to get the styling aligned with the rest of the project?
  • In QuNetSim, data is generally routed through other nodes. I would suggest removing the connection from Alice to Bob so that all data goes through Eve. You can then use the built in eavesdropping features of QuNetSim to get a cleaner implementation.

@RamAIbot
Copy link
Copy Markdown
Contributor Author

Hi,
I have edited the network as mentioned and linted using PEP8. The modified network now has Eve in between Bob and Alice and the simulation routes through Eve. Unfortunately I am not able to add Sniffing option available in the QuNetSim using the function 'q_relay_sniffing' as once I measure in the Eve's side the Qubit is destroyed in the Bob Side and I am not able to resend it. I have committed the modification in the same PR. Please check and confirm.

@stephendiadamo
Copy link
Copy Markdown
Collaborator

stephendiadamo commented May 16, 2021

In the qubit measure, you can use the flag 'non_destructive=True' so they qubit isn't destroyed.

@stephendiadamo
Copy link
Copy Markdown
Collaborator

Thanks! I'll review the code this week if you want to make that change mentioned above.

@RamAIbot
Copy link
Copy Markdown
Contributor Author

Hi,
I have added the Eve's eavesdropping using Sniffing function which is prebuilt in the QuNetSim. Please check and confirm.

@stephendiadamo stephendiadamo merged commit 63c86bd into tqsd:master May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants