arXiv ScienceSearch

arXiv · 2306.09122

Shor's Factoring Algorithm and Modular Exponentiation Operators

Abstract

These are pedagogical notes on Shor's factoring algorithm, which is a quantum algorithm for factoring very large numbers (of order of hundreds to thousands of bits) in polynomial time. In contrast, all known classical algorithms for the factoring problem take an exponential time to factor large numbers. In these notes, we assume no prior knowledge of Shor's algorithm beyond a basic familiarity with the circuit model of quantum computing. The literature is thick with derivations and expositions of Shor's algorithm, but most of them seem to be lacking in essential details, and none of them provide a pedagogical presentation. We develop the theory of modular exponentiation (ME) operators in some detail, one of the fundamental components of Shor's algorithm, and the place where most of the quantum resources are deployed. We also discuss the post-quantum processing and the method of continued fractions, which is used to extract the exact period of the modular exponential function from the approximately measured phase angles of the ME operator. The manuscript then moves on to a series of examples. We first verify the formalism by factoring N=15, the smallest number accessible to Shor's algorithm. We then proceed to factor larger numbers, developing a systematic procedure that will find the ME operators for any semi-prime $N = p \times q$ (where $q$ and~$p$ are prime). Finally, we factor the numbers N=21, 33, 35, 143, 247 using the Qiskit simulator. It is observed that the ME operators are somewhat forgiving, and truncated approximate forms are able to extract factors just as well as the exact operators. This is because the method of continued fractions only requires an approximate phase value for its input, which suggests that implementing Shor's algorithm might not be as difficult as first suspected.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Robert L Singleton Jr. 2023-09-18. Shor's Factoring Algorithm and Modular Exponentiation Operators. https://doi.org/10.12743/quanta.v12i1.235

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Single-Ensemble Multiparameter Squeezing with Qudits

Conventional spin squeezing enhances a single sensing channel. Here, we show how internal qudit levels enable simultaneous multiparameter squeezing within one ensemble. In two-component magnetometry, a qutrit sensor provides two orthogonal and weakly compatible channels. A collective twisting interaction squeezes both responses while preserving joint attainability of the ultimate sensitivity. The sensing gain is quantified by using a matrix generalization of the Wineland sensitivity that retains both noise correlations and cross-channel response. An interaction-based echo amplifies the signal to overcome noise from a fixed local joint readout, yielding a simulated $13~\mathrm{dB}$ gain over the product-state standard quantum limit for $N=128$ qutrits. More generally, we use the single-site quantum Fisher information matrix to select reference states and channel quadratures for prescribed sensing tasks. The tangent geometry permits at most $d-1$ independent, weakly compatible channels around a common pure reference state for a $d$-level sensor. Our work provides a constructive task-to-protocol map for multiparameter squeezing in a single qudit ensemble.

quant-ph

A Design Space Study of Density Matrix Parameterizations for Diffusion-Based Quantum State Tomography

Diffusion-based quantum state tomography (QST) has shown promising results, but all existing methods implicitly adopt a single parameterization (typically Cholesky) without systematic evaluation. We present the first design space study of density matrix parameterizations for diffusion QST, introducing a geometric framework based on the Jacobian Gram matrix $\mathbf{J}^\top\mathbf{J}$. Our calibration of seven parameterizations at 2- and 3-qubit scales, validated by end-to-end training, reveals that \emph{geometric conditioning alone does not predict end-to-end performance}: at 3-qubit scale, Hermitian direct ($κ= 2.0\times$) performs worse than Cholesky ($κ= 27\times$) at all shot levels---a $13.5\times$ isotropy advantage that translates into a fidelity \emph{disadvantage} of up to $+0.51$. The 2-qubit ranking (Hermitian $>$ Bloch) reverses at 3 qubits (Bloch 0.907 vs.\ Hermitian 0.394). We provide a geometric explanation: unbounded parameterizations suffer projection-induced information loss because the PSD constraint couples diagonal and off-diagonal coordinates in ways the unconstrained model cannot respect, whereas the Bloch representation places the maximally mixed state at the center of the valid region, minimizing projection loss.

quant-ph

Entanglement free Metrology Exploiting Multimode Hong Ou Mandel Sensor Advantage

The Hong-Ou-Mandel (HOM) interference in the multimode frequency domain has been explored for precision metrology, with several experimental demonstrations exploiting its robustness against dispersion and phase noise, as well as its large dynamic range and compatibility with fragile samples. Conventional multimode HOM metrology exploits frequency-entangled states, which naturally satisfy bosonic exchange symmetry under any centered symmetric joint spectral distribution, to provide these advantages. However, these entangled states are typically generated via spontaneous parametric down-conversion (SPDC), requiring strong pump lasers that hinder practical implementation. In this paper, we employ frequency product states, which do not possess entanglement or path-mode exchange symmetry, as the probe state and post-select measurement outcomes exhibiting frequency anti-correlation. Our results demonstrate that these advantages,peak narrowing, dispersion cancellation, phase-noise immunity, a large dynamic range, and compatibility with fragile samples, arise neither from entanglement nor from bosonic exchange symmetry, but rather from spectral anti-correlation. We further show that entanglement is not the source of the measurement precision: the entanglement-free approach attains the same quantum Fisher information as the entangled-state scheme, indicating that the fundamental precision limit does not originate from entanglement.

quant-ph