Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BB84 QKD algorithm #7898

Merged
merged 9 commits into from Nov 8, 2022
Merged

Conversation

abhishekchak52
Copy link
Contributor

@abhishekchak52 abhishekchak52 commented Oct 30, 2022

Describe your change:

Added an algorithm that simulates the BB84 quantum key-distribution protocol.

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@algorithms-keeper algorithms-keeper bot added the awaiting reviews This PR is ready to be reviewed. label Oct 30, 2022
@cclauss cclauss added ON HOLD: Final hours of Hacktoberfest 2022 We review this after Hacktoberfest has ended and removed ON HOLD: Final hours of Hacktoberfest 2022 We review this after Hacktoberfest has ended labels Oct 30, 2022
@cclauss
Copy link
Member

cclauss commented Nov 2, 2022

Waiting for qiskit to be compatible with Python v3.11...

@abhishekchak52
Copy link
Contributor Author

abhishekchak52 commented Nov 7, 2022

Qiskit 0.39.2 is the first release to support Python v3.11. The associated PR was recently merged.

@cclauss
Copy link
Member

cclauss commented Nov 7, 2022

Can you please rebase to the current master and then edit https://github.com/TheAlgorithms/Python/blob/master/requirements.txt#L11 to remove the qiskit; python_version < "3.11" next to qiskit?

quantum/bb84.py Outdated Show resolved Hide resolved
abhishekchak52 and others added 3 commits Nov 7, 2022
abhishekchak52 and others added 2 commits Nov 7, 2022
Co-authored-by: Christian Clauss <cclauss@me.com>
@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label Nov 7, 2022
@abhishekchak52
Copy link
Contributor Author

abhishekchak52 commented Nov 7, 2022

Sorry about the mess. I messed up the rebase initially. I've accepted your suggested change and removed the python version restriction from qiskit.

@cclauss
Copy link
Member

cclauss commented Nov 7, 2022

BB84() --> bb84()

Copy link
Contributor

@CaedenPH CaedenPH left a comment

Looks really good

@abhishekchak52
Copy link
Contributor Author

abhishekchak52 commented Nov 7, 2022

BB84() --> bb84()

Done as an amended commit. Sorry I chose the wrong line in a previous merge.

quantum/bb84.py Outdated Show resolved Hide resolved
@algorithms-keeper algorithms-keeper bot removed the tests are failing Do not merge until tests pass label Nov 8, 2022
Correct typo in `default_rng()` call

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
cclauss
cclauss approved these changes Nov 8, 2022
Copy link
Member

@cclauss cclauss left a comment

Let's do this!!!

@cclauss cclauss merged commit 8951d85 into TheAlgorithms:master Nov 8, 2022
2 checks passed
@algorithms-keeper algorithms-keeper bot removed awaiting reviews This PR is ready to be reviewed. labels Nov 8, 2022
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.

None yet

4 participants