Demystifying Q-day with a graphical quantum simulator
The anticipated arrival of Q-Day, when quantum computers may become capable of breaking widely deployed public-key cryptographic systems, has renewed interest in Shor's algorithm and its practical implementation on quantum hardware and simulators. This work presents a pedagogical study of Shor's algorithm using the graphical quantum circuit simulator Quirk and its extended version Quirk-e. The focus is placed on the explicit construction and visualization of the modular-exponentiation operators required for quantum phase estimation. Two scenarios are analyzed. First, the special case N=2n-1 is examined through the factorization of N=15, where all admissible values of a are studied and both gate-based and block-based implementations are compared, including optimal and suboptimal circuit designs. Second, the general case N != 2n-1 is investigated through the factorization of N=21, for which five different approaches are developed: Easy solution, Using qutrits, Complete sum, Generative group, and Truncated generative group. The results show that substantial reductions in circuit complexity can be achieved by exploiting algebraic properties of the modular-exponentiation operators. In particular, approximate implementations are shown to be sufficient for successful period finding, provided that the quantum phase-estimation register offers enough precision for the continued-fraction expansion to recover the correct period. Furthermore, the figures illustrating the different cases analyzed, together with the links to the corresponding Quirk implementations, enhance the pedagogical value of this work and facilitate the reproduction of the results.
Authors
- Katja Gilly (ORCID: https://orcid.org/0000-0002-8985-0639)
- Pedro Juan Roig (ORCID: https://orcid.org/0000-0002-8391-8946)
- Cristina Bernad (ORCID: https://orcid.org/0000-0001-9537-415X)
- Salvador Alcaraz (ORCID: https://orcid.org/0000-0003-3701-5583)
- Blas Trigueros
Institutions
- Universitat de Miguel Hernández d'Elx (ES)
Publication Details
- Journal
- Research Square
- Published
- 2026-11-30
- DOI
- https://doi.org/10.21203/rs.3.rs-10268145/v1
- Primary Topic
- Quantum Computing Algorithms and Architecture
- Type
- preprint