Shor¶
- class Shor(quantum_instance=None)[source]¶
Bases:
object
The deprecated Shor’s factoring algorithm.
The Shor class is deprecated as of Qiskit Terra 0.22.0 and will be removed no sooner than 3 months after the release date. It is replaced by the tutorial at Shor
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
,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
]