Contains the quantum algorithm for period finding, e.g. for Shor's algorithm. This algorithm uses quantum phase estimation to find the period of a modular exponentiation function.
Contains the quantum algorithm for period finding, e.g. for Shor's algorithm. This algorithm uses quantum phase estimation to find the period of a modular exponentiation function.
(quantum-period-circuit n-qubits n-target-qubits a N)
Create a quantum circuit for period finding using quantum phase estimation.
This circuit implements the quantum subroutine for Shor's algorithm to find the period of the function f(x) = a^x mod N. It uses controlled modular exponentiation and the Quantum Fourier Transform (QFT).
Parameters:
Returns: A complete quantum circuit implementing the period finding subroutine.
Create a quantum circuit for period finding using quantum phase estimation. This circuit implements the quantum subroutine for Shor's algorithm to find the period of the function f(x) = a^x mod N. It uses controlled modular exponentiation and the Quantum Fourier Transform (QFT). Parameters: - n-qubits: Number of qubits in the control register (should be ~2*log₂(N)) - n-target-qubits: Number of qubits in the target register (should be ~log₂(N)) - a: Base for the function f(x) = a^x mod N - N: Modulus Returns: A complete quantum circuit implementing the period finding subroutine.
(quantum-period-finding backend a N n-qubits)
(quantum-period-finding backend a N n-qubits n-measurements)
(quantum-period-finding backend a N n-qubits n-measurements options)
Quantum subroutine for finding the period of f(x) = a^x mod N.
This is the quantum heart of Shor's algorithm. It uses quantum phase estimation with the QFT to find the period r such that a^r ≡ 1 (mod N).
Parameters:
Returns: Map containing:
Quantum subroutine for finding the period of f(x) = a^x mod N. This is the quantum heart of Shor's algorithm. It uses quantum phase estimation with the QFT to find the period r such that a^r ≡ 1 (mod N). Parameters: - backend: Quantum backend implementing the QuantumBackend protocol to execute the circuit - a: Base for the function f(x) = a^x mod N - N: Modulus - n-qubits: Number of qubits for the quantum register (should be ~2*log₂(N)) - hardware-compatible: (optional) Use hardware-compatible implementation - n-measurements: (optional) Number of measurements to perform for statistical analysis - options: (optional) Map containing additional backend options: - :shots - Number of shots for each measurement (default: 512) Returns: Map containing: - :measured-values - List of measured values from quantum circuit executions - :estimated-period - Estimated period based on continued fractions - :circuit - The quantum circuit used - :success - Whether a valid period was found - :confidence - Statistical confidence in the result (only with multiple measurements)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close