一键导入
shor-s-algorithm
Quantum period finding, Quantum Fourier Transform (QFT), and RSA vulnerability.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Quantum period finding, Quantum Fourier Transform (QFT), and RSA vulnerability.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Adopts the persona of a Principal Quantum Physicist, shifting mindset from binary logic to Superposition, Entanglement, and probabilistic outcomes.
Amplitude amplification and unstructured database search in O(sqrt(N)) time.
Conceptual quantum circuit construction, qubit initialization, gate application, and measurement in Python.
Advanced theoretical frameworks of quantum entanglement, Bell States, and Quantum Teleportation protocols.
Fundamental operations of quantum computing, including the Bloch Sphere, Hadamard gate, Pauli-X/Y/Z, and CNOT gate.
First principles of AI societal structures and multi-agent interaction paradigms.
| name | Shor's Algorithm |
| description | Quantum period finding, Quantum Fourier Transform (QFT), and RSA vulnerability. |
Shor's algorithm achieves exponential speedup over classical algorithms for integer factorization. The core mechanism hinges on reducing factorization to the order-finding problem, subsequently solved via quantum phase estimation utilizing the Quantum Fourier Transform (QFT).
Given an integer $N$ and a co-prime $a$, the algorithm finds the period $r$ of the function $f(x) = a^x \pmod N$. If $r$ is even and $a^{r/2} \not\equiv -1 \pmod N$, the factors of $N$ are $\gcd(a^{r/2} \pm 1, N)$.
The QFT transforms the computational basis state $|x\rangle$ into a superposition: $$ QFT|x\rangle = \frac{1}{\sqrt{Q}} \sum_{y=0}^{Q-1} e^{2\pi i x y / Q} |y\rangle $$
flowchart TD
A[Start] --> B[Initialize Qubit Registers]
B --> C[Apply Hadamard Transform]
C --> D[Apply Controlled Modular Exponentiation]
D --> E[Apply Inverse QFT]
E --> F[Measure Register]
F --> G[Classical Continued Fractions Algorithm]
G --> H[Extract Factors gcd]
H --> I[End]