i try to compare between the factorization time between : 1) classical algorithm function:
def is_prime1(n):
if n<2:
return False
for i in range(2,n):
if n % i ==0:
return False
return True
def output_prime_factors(num):
num=round(num)
p=0
while p < num:
p +=1
if num % p==0 and is_prime1(p)==True:
print (p)
Shor's algorithm on Qiskit (IBM) but the output is Unexpected that the quantum is slower how this happen )
N = 15
shor = Shor(N)
backend = BasicAer.get_backend('qasm_simulator')
quantum_instance = QuantumInstance(backend, shots=1024)
result = shor.run(quantum_instance)
print(f"The list of factors of {N} as computed by the Shor's algorithm is
{result['factors'][0]}.")
the qiskit is slower than the classical function