Skip to content

BB84 QKD algorithm#7898

Merged
cclauss merged 9 commits intoTheAlgorithms:masterfrom
abhishekchak52:BB84_QKD_Algorithm
Nov 8, 2022
Merged

BB84 QKD algorithm#7898
cclauss merged 9 commits intoTheAlgorithms:masterfrom
abhishekchak52:BB84_QKD_Algorithm

Conversation

@abhishekchak52
Copy link
Copy Markdown
Contributor

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 We will review this PR after Hacktoberfest has ended and removed ON HOLD: Final hours of Hacktoberfest We will review this PR after Hacktoberfest has ended labels Oct 30, 2022
@cclauss
Copy link
Copy Markdown
Member

cclauss commented Nov 2, 2022

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

@abhishekchak52
Copy link
Copy Markdown
Contributor Author

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

@cclauss
Copy link
Copy Markdown
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?

abhishekchak52 and others added 5 commits November 7, 2022 10:16
@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label Nov 7, 2022
@abhishekchak52
Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Member

cclauss commented Nov 7, 2022

BB84() --> bb84()

Copy link
Copy Markdown
Contributor

@CaedenPH CaedenPH left a comment

Choose a reason for hiding this comment

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

Looks really good

@abhishekchak52
Copy link
Copy Markdown
Contributor Author

BB84() --> bb84()

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

@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>
Copy link
Copy Markdown
Member

@cclauss cclauss left a comment

Choose a reason for hiding this comment

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

Let's do this!!!

@cclauss cclauss merged commit 8951d85 into TheAlgorithms:master Nov 8, 2022
@algorithms-keeper algorithms-keeper bot removed awaiting reviews This PR is ready to be reviewed labels Nov 8, 2022
Cjkjvfnby pushed a commit to Cjkjvfnby/Python that referenced this pull request Mar 13, 2023
* Added BB84 algorithm.

* Function name lowercase + imports fix

I thought uppercase was appropriate because they're initials.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update quantum/bb84.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Removed python < 3.11 restriction from qiskit

* Removed python < 3.11 restriction from qiskit

* scikit-learn

* Update quantum/bb84.py

Correct typo in `default_rng()` call

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
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.

4 participants