https://github.com/dethada/quantum-cryptography
😺 Classical implementation of shor's and grover's algorithm to help with understanding.
https://github.com/dethada/quantum-cryptography
grovers-algorithm quantum-cryptography shors-algorithm
Last synced: 8 months ago
JSON representation
😺 Classical implementation of shor's and grover's algorithm to help with understanding.
- Host: GitHub
- URL: https://github.com/dethada/quantum-cryptography
- Owner: Dethada
- License: mit
- Created: 2018-05-09T13:12:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-15T03:32:49.000Z (over 7 years ago)
- Last Synced: 2025-04-21T10:57:34.933Z (8 months ago)
- Topics: grovers-algorithm, quantum-cryptography, shors-algorithm
- Language: Jupyter Notebook
- Homepage:
- Size: 91.8 KB
- Stars: 33
- Watchers: 1
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Quantum Cryptography
## Shor's Algorithm
Please do not actually use classical_shor.py to try to factorize large numbers, it is a really inefficient way of factorization for a classical computer.
```bash
python3 -m timeit -s 'import classical_shor' 'classical_shor.solve(80609)'
100 loops, best of 3: 3.11 msec per loop ((3.11 * 10^-3) seconds)
```
pure_factorizatrion.py is a much better algorithm for finding primes on a classical computer.
```bash
python3 -m timeit -s 'import pure_factorization' 'pure_factorization.factorize(80609)'
100000 loops, best of 3: 3.56 usec per loop ((3.56 * 10^-6) seconds)
```
* classical_shor.py
* Shor's algorithm implemented purely with classical algorithm
* pure_factorization.py
* Classical way of finding prime factors
## Grover's Algorithm
Reduces the time complexity of finding the input to a black box(Oracle) function that produces a particular output from O(N) to O(sqrt(N)).