shor.algorithms package¶
Submodules¶
shor.algorithms.shor module¶
-
shor.algorithms.shor.
factor
(N: int) → Tuple[int, int][source]¶ WIP not currently functioning.
The classical part seems to be correct, but the quantum period finding function is incorrect at the moment.
-
shor.algorithms.shor.
find_period
(a, N)[source]¶ WIP: Quantum subroutine for shor’s algorithm. Finds the period of a function of the form: f(x) = a^x % N
This uses the quantum fourier transform.
-
shor.algorithms.shor.
gcd
(a: int, b: int) → int[source]¶ Finds greatest common divisor between positive integers a and b Efficient, using Euclidean algorithm.
Example: >>> greatest_common_divisor(15, 25) 5
-
shor.algorithms.shor.
qft
(qubits: List[int]) → shor.quantum.QuantumCircuit[source]¶
-
shor.algorithms.shor.
quantum_amod_15
(a: int) → shor.quantum.QuantumCircuit[source]¶