Skip to main content

How to crack the uncrackable shor algorithm

Project description

ShorAlgoForAllNumbers

contains solution of uncrackable shor's algorithm using data structures and parallel processing

import shor_package
from shor_package import runShorAlgo
NEWLINE_CHAR = "\n"
for string in ["4","6","10","19","9992","999999992","1234","1234567898"]:
    # print(string)
    out = runShorAlgo.parallel_for_loop_factor(int(string))
    print(f"Factors of {string} using for loop: {out}")
    print(NEWLINE_CHAR)

for string in ["2"*10,"2"*20,"2"*50,"2"*100,"2"*200]:
    print(len(string))
    fast_out = runShorAlgo.parallel_for_loop_factor(int(string))
    print(f"Factors of {string} using parallel for loop: {fast_out}")
    print(NEWLINE_CHAR)
length = 100
string = ""
for i in range(1, length+1):
    string += str(random.randint(1,9))
n=len(string)
if int(string[n-1])%2==1:
    string = string[:-1] + "2"
print(string)
print(len(string))
fast_out = runShorAlgo.parallel_for_loop_factor(int(string))
print(f"Factors of {string} using parallel for loop: {fast_out}")

for length in [10, 11, 12, 13, 14, 15, 16]:
    string = ""
    for i in range(1, length+1):
        string += str(9)
    n=len(string)
    if int(string[n-1])%2==1:
        string = string[:-1] + "2"
    print(string)
    print(len(string))
    fast_out = runShorAlgo.parallel_for_loop_factor(int(string))
    print(f"Factors of {string} using parallel for loop: {fast_out}")

    print("\n\n")

for length in [20]:
    string = ""
    for i in range(1, length+1):
        string += str(9)
    n=len(string)
    if int(string[n-1])%2==1:
        string = string[:-1] + "2"
    print(string)
    print(len(string))
    fast_out = runShorAlgo.parallel_for_loop_factor(int(string))
    print(f"Factors of {string} using parallel for loop: {fast_out}")

    print("\n\n")

string = "11"
print(string)
out = runShorAlgo.parallel_for_loop_factor(int(string))
print(f"Factors of {string} using for loop: {out}")

length = 100
string = ""
for i in range(1, length+1):
    string += str(random.randint(1,9))
n=len(string)
if int(string[n-1])%2==1:
    string = string[:-1] + "1"
print(string)
print(len(string))
fast_out = runShorAlgo.parallel_for_loop_factor(int(string))
print(f"Factors of {string} using parallel for loop: {fast_out}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

my_shor_package-4.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

my_shor_package-4.0.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file my_shor_package-4.0.0.tar.gz.

File metadata

  • Download URL: my_shor_package-4.0.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for my_shor_package-4.0.0.tar.gz
Algorithm Hash digest
SHA256 1fef3141b5088023c7ac161c0e18b2d2a047742083d0b05f955d8331c4423df2
MD5 d239c4c83f9a241da9372598016b1a8b
BLAKE2b-256 93bc1f3be7587b877b1ee57ca05aebd13a002b72222024175ec786d45788291d

See more details on using hashes here.

File details

Details for the file my_shor_package-4.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for my_shor_package-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c009845b89d7f2a3c9c64214e5f807011c9dc9a9a35c20d7a8faf31acdd3093
MD5 ef065e078b4dfca86211f007ec054d05
BLAKE2b-256 57ce13c259b8d848a4a658f692686ee66cb47b8a967393b44fbedfa91fb4567b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page