Shor¶
-
class
Shor
(quantum_instance=None)[source]¶ Bases:
object
Shor’s factoring algorithm.
Shor’s Factoring algorithm is one of the most well-known quantum algorithms and finds the prime factors for input integer \(N\) in polynomial time.
Adapted from https://github.com/ttlion/ShorAlgQiskit
See also https://arxiv.org/abs/quant-ph/0205095
- Parameters
quantum_instance (
Union
[Backend
,BaseBackend
,QuantumInstance
,None
]) – Quantum Instance or Backend
Methods
Construct quantum part of the algorithm.
Execute the algorithm.
Returns the modular multiplicative inverse of a with respect to the modulus m.
Attributes
-
quantum_instance
¶ Returns quantum instance.
- Return type
Optional
[QuantumInstance
]