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

Hmm #3319

Open
m7mdragab opened this issue Mar 18, 2025 · 1 comment
Open

Hmm #3319

m7mdragab opened this issue Mar 18, 2025 · 1 comment

Comments

@m7mdragab
Copy link

def ShorsAlgorithm(N):
# Step 1: Initialize two auxiliary qubits a and b, such that N = 2^a * 2^b.
# Step 2: Perform a number of iterations of the following two-qubit procedure.
while True:
# Step 2.1: Perform the addition-subtraction method of modular arithmetic to obtain the period r of a^N.
# Step 2.2: Use the discrete logarithm to find a primitive root, g.
# Step 2.3: Apply the Gaussian elimination to obtain a non-singular linear combination of g and N.
# Step 2.4: Calculate the two partial factors, F1 and F2.
# Step 2.5: Apply a binary quadratic form (BQF) reduction to factor N further.
# If the remaining value of N is small, output the factors found.
if is_small(N):
return factorize(N)

@Khushiyant
Copy link
Contributor

Please refrain from creating unrelated issues. It is advised to close this one

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

No branches or pull requests

2 participants