Research2017ICVRV

ShorVis

Combines circuit diagrams, Bloch-sphere animations, and probability distributions to walk through the registers and operations of Shor's factoring algorithm.

1 publication

Visualization labels

03 / Visualization

A closer look

2 figures
Figure 1. Figure 13 (ICVRV 2017). ShorVis displays both registers during modular exponentiation, with individual Bloch spheres and a shared-disc entanglement indicator.Zewei Tao, Yun Pan, Anying Chen, and Licheng Wang (2017), ShorVis. Courtesy of the authors. Source

Figure 1

Two register displays containing rows of Bloch spheres and a shared-disc indicator, preserved from the source paper.

Figure 13 (ICVRV 2017). ShorVis displays both registers during modular exponentiation, with individual Bloch spheres and a shared-disc entanglement indicator.

Zewei Tao, Yun Pan, Anying Chen, and Licheng Wang (2017), ShorVis. Courtesy of the authors.

Open full-size image
Figure 2. Figure 8 (ICVRV 2017). ShorVis's high-level circuit for factoring 15 shows Hadamard preparation, controlled modular operations, inverse QFT, and measurement.Zewei Tao, Yun Pan, Anying Chen, and Licheng Wang (2017), ShorVis. Courtesy of the authors. Source

Figure 2

A twelve-wire circuit with Hadamard gates, controlled modular blocks, inverse Fourier transform, and measurement symbols.

Figure 8 (ICVRV 2017). ShorVis's high-level circuit for factoring 15 shows Hadamard preparation, controlled modular operations, inverse QFT, and measurement.

Zewei Tao, Yun Pan, Anying Chen, and Licheng Wang (2017), ShorVis. Courtesy of the authors.

Open full-size image
01Publication · 2017

ShorVis: A comprehensive case study of quantum computing visualization

Zewei Tao, Yun Pan, Anying Chen, Licheng Wang

We introduce an open-source web-based platform that integrated multiple methods for visualizing Shor’s algorithm. We mainly focus on three different approaches which are widely used in the field of visualizing qubit and quantum algorithms. These methods include Bloch sphere, quantum circuit and probability distribution map. We combine these geometrical methods and abstract the level of quantum circuit in order to introduce the well-known Shor’s algorithm more explicitly. Our platform provides a direct and comprehensible perspective for better understanding the basic principles of quantum computation and how the features of quantum algorithms reduce the time complexity of certain problems. It also provides an interactive way for users to easily test the Shor’s factoring algorithm. With further improvement and development, potential capacity can be proved in the field of visualization of quantum computation.

From the survey collection
Background and motivation

ShorVis is a browser-based educational visualization of Shor’s integer-factorization algorithm. Its central concern is how to connect an algorithm’s circuit, the evolving quantum registers, and measurement outcomes so that learners can follow the quantum part of the computation. The underlying educational problem is established: quantum algorithms combine unfamiliar physical concepts with mathematical transformations, and a circuit diagram alone does not explain the states on which its gates operate. The paper addresses this problem through an implemented integration of existing visual representations, rather than through a new factoring algorithm or a new mathematical theory of quantum states.

The related-work discussion positions ShorVis against the tools available when the paper was written. The authors describe ProjectQ, LIQUi|>, and QuTiP as emphasizing simulation and mathematical computation, discuss IBM Quantum Experience as a way to construct and execute circuits, and recognize Quirk’s interactive drag-and-drop circuit editing. Their stated gap is the need for additional visual perspectives that explain an algorithm’s intermediate behavior. This is a qualitative motivation, not a measured comparison establishing that those systems are ineffective for education. For visual representations, the paper draws on the single-qubit Bloch sphere and previous research on depicting entanglement, especially Walck and Hansell’s representation of a pair of spins using two spheres and a shared disc. Figure 1 presents these antecedents; it is background material rather than a ShorVis interface screenshot.

Algorithmic scope and system organization

The explanation follows the period-finding portion of Shor’s algorithm. Factoring a composite integer NN is reduced to finding a period of modular exponentiation, after which classical arithmetic can obtain candidate factors. ShorVis concentrates on the quantum sequence: initialize two registers, apply Hadamard gates to the first register, perform modular exponentiation, measure the second register, apply the inverse quantum Fourier transform to the first register, and measure that register before classical continued-fraction processing. The visualization therefore joins high-level circuit operations with state changes without expanding every operation into a fully decomposed elementary-gate circuit. Figure 8 makes this abstraction visible through the large inverse-QFT block and the repeated controlled modular-operation blocks.

The implementation uses JavaScript and three modules, shown in Figure 2. The Controller accepts input such as the number to factor, initializes variables, and handles presentation settings such as color and rotation speed. The Drawer tracks the current algorithmic step, constructs the circuit and its position marker, and generates gates and Bloch-sphere state graphics using predefined drawing methods. The Display renders the two registers and the circuit in three HTML canvas elements, with accompanying text for register size and state value. This organization separates input and settings, algorithm-dependent drawing, and rendering, while shared variables maintain connections between the modules. The paper describes the drawing functions as modifiable and extensible; it does not evaluate the cost of extending them to other algorithms.

Visual encodings and interaction

Each register is depicted as a horizontal row of Bloch spheres, with a vector used to illustrate the state of an individual qubit. The north and south poles correspond to ∣0⟩|0\rangle and ∣1⟩|1\rangle. Initialization places vectors at ∣0⟩|0\rangle, while gate animations show their movement on the spheres. Figures 3 and 5 illustrate an initialized sphere and successive frames of a Hadamard transformation, respectively. The circuit supplies the operation sequence, and a step marker connects the displayed state with the algorithm’s current location. Register labels and numerical text complement the geometry, so learners can relate bit-level depictions to a register-level value.

Hadamard animation uses Rodrigues’ rotation formula to move a vector about a chosen axis:

vrot=cos⁡θ v+(1−cos⁡θ)(k⋅v)k+sin⁡θ(k×v),\mathbf{v}_{\mathrm{rot}}=\cos\theta\,\mathbf{v}+(1-\cos\theta)(\mathbf{k}\cdot\mathbf{v})\mathbf{k}+\sin\theta(\mathbf{k}\times\mathbf{v}),

where k\mathbf{k} is a unit rotation axis and θ\theta is the rotation angle. The geometric construction in Figure 4 explains this standard formula; the formula itself is not a new contribution of ShorVis. Users can choose a gradual animation or an instantaneous transformation and adjust rotation speed and colors. The paper also describes mathematical and textual explanations for circuit operations, a simplified debugging facility that preserves intermediate variables, and support for users to create operations and observe changes to the registers and probability histogram. These features are reported capabilities of the platform, without a separate evaluation of their usability.

The authors emphasize forward and reverse illustration of unitary operations, with applying Hadamard twice as a simple example of returning to the original state. This does not mean that measurement is reversible: the introduction explicitly treats measurement as an exception because it collapses the state. The ability to revisit unitary transformations is part of the educational interaction design, while the authors’ claim of being the first whole-procedure Shor visualization with this support is a positioning claim rather than the result of a systematic comparative study.

To show correlations between the two registers, ShorVis adapts the shared-disc idea from the earlier two-spin visualization. A reddish disc is placed between the rows of spheres when the registers become entangled. Figures 6 and 12 depict partially filled and fully filled discs and a sequence in which the colored region grows, while Figure 13 places this indicator within the register display. The paper describes the filled color as conveying the extent of entanglement. It does not specify a general entanglement measure or a mathematically defined mapping from an arbitrary multiqubit state to the disc’s fill, so this should be understood as the paper’s explanatory indicator rather than an established quantitative visualization of every inter-register correlation. Its novelty lies in adapting the visual idea to the two-register algorithm walkthrough, not in originating the shared-disc representation.

The paper also recognizes a limitation of using a separate sphere for every qubit: after measuring the second register, the remaining superposition in the first register cannot generally be conveyed by assembling independent single-qubit pictures. The authors therefore describe dynamic graphs for showing the sequence of values retained in that register. This supplies an additional explanatory device, but the paper does not provide a complete formal encoding of the joint state through these animations. For the inverse QFT, Figure 7 shows a schematic probability distribution with regularly spaced peaks related to the period. That figure is attributed to an earlier account of Shor’s algorithm and is not a measured performance plot or a screenshot of ShorVis output.

Demonstration and evidence

The concrete demonstration factors N=15N=15 and uses eight qubits in the first register and four in the second. Figures 8 and 9 show the generated circuit and register layout, Figure 10 adds the initialized state vectors, and Figure 11 shows the first register after the Hadamard operations. The modular-exponentiation stage is illustrated through the evolving shared disc and the register display in Figures 12 and 13. The second-register measurement is described as selecting among ∣1⟩|1\rangle, ∣2⟩|2\rangle, ∣4⟩|4\rangle, and ∣8⟩|8\rangle, with Figure 14 captioned as the result ∣4⟩|4\rangle in that register. The prose then describes inverse-QFT processing, first-register measurement, and continued fractions as the route to period information, with the numerical computation performed by the implementation behind the display. Figure 14 should consequently not be interpreted as a quantitative result demonstrating the final factorization step or inverse-QFT accuracy.

Figures 8 and 9 from the paper show the circuit’s high-level blocks and the eight-qubit and four-qubit register layouts used in the demonstration.

The paper’s evidence is this illustrated implementation walkthrough and a qualitative discussion of features. It reports no controlled learner study, participant sample, learning-gain measurements, usability results, runtime benchmark, or quantitative comparison with another tool. Its educational value and the benefits of interaction are therefore proposed benefits of the design, not demonstrated improvements in learning. Likewise, the small factoring example establishes the scope of the illustrated workflow without establishing scalability to large factorization instances.

Contributions, limitations, and future work

The main contribution is an open-source educational system that brings circuit structure, geometric qubit depictions, an inter-register correlation indicator, and probability-based explanations into one account of Shor’s algorithm. The stepwise abstraction, adjustable gate animation, and support for illustrating unitary operations in both directions are concrete interaction choices intended to help learners connect mathematical operations with visual change. The architecture and worked example document how these choices were implemented. The work is best read as a visualization design and implementation case study, with its claimed educational effectiveness remaining to be tested.

The paper explicitly identifies the difficulty of representing multiqubit superpositions and entanglement with Bloch spheres. Its dynamic presentation and shared disc address aspects of that explanatory problem, but do not establish that separate spheres plus one disc are a complete representation of a general register state. The absence of a specified quantitative disc mapping, a learning evaluation, and a larger-scale demonstration further limits what can be concluded from the reported system. These are boundaries of the evidence, rather than experimentally demonstrated failures of the software.

The authors propose applying additional Bloch-sphere-based visualization methods, adapting the platform to other quantum algorithms with similar structures, and building a database of quantum-algorithm visualizations for education. Those are future development goals; the paper demonstrates Shor’s algorithm and does not report a completed multi-algorithm database.

Download .bib
@inproceedings{tao_shorvis_2017,
  author = {Tao, Zewei and others},
  publisher = {IEEE},
  booktitle = {2017 {International} {Conference} on {Virtual} {Reality} and {Visualization} ({ICVRV})},
  doi = {10.1109/ICVRV.2017.00082},
  isbn = {978-1-5386-2636-8},
  month = oct,
  pages = {360--365},
  shorttitle = {{ShorVis}},
  title = {{ShorVis}: {A} {Comprehensive} {Case} {Study} of {Quantum} {Computing} {Visualization}},
  urldate = {2025-10-18},
  year = {2017},
}