5 DISCUSSION AND
CONCLUSION
Mathematically speaking, the visualization of an en-
tangled n-qubit state corresponds to the visualization
of a point in the complex plane CP
2
n
−1
. In this paper,
we showed that it can be reduced to a set visualiza-
tion problem. We visualized those sets using rainbow
boxes, and we demonstrated the proposed approach
on the well-known algorithm for quantum teleporta-
tion. Our visualization of a quantum state is unique,
i.e. a given state can be represented in a single man-
ner, contrary to the vectors commonly used in quan-
tum computing.
Our visual approach could be very interesting for
teaching quantum computing. Many programmers
may be interested in quantum programming in the fu-
ture, but many of them do not necessarily have the
mathematical background required for reading most
books on that topic. Moreover, it is well known that
quantum theory is not intuitive at all and almost im-
possible to understand, although it can be used to
predict the evolution of a system accurately and it
has been widely validated experimentally. Since we
still do not understand fully how quantum algorithms
work, being able to visualize it during runtime is a
step forward. In particular, it greatly helped the au-
thor to better apprehend quantum computing.
This visual tool allows an empirical and experi-
mental approach to quantum computing, through the
“trial and error” method. It permit testing an algo-
rithm with various initial values or algorithmic vari-
ants, and observe how the states of the system are
changed. For example, one may visualize quantum
teleportation of diverse states |ψi and observe how
changing |ψi impacts the state of the system at each
step. One can also observe how the system states dif-
fer when different values are measured for q
1
and q
2
.
Finally, one can test variants, in order to answer to
questions such as “What about performing the two
measurements in step 5 and 6 in reverse order?” or
“What about performing step 7 and 8 in reverse or-
der?”. Through experiments, one would conclude that
measurements can be performed in any order, while
step 7 and 8 must be performed in order.
In rainbow boxes, finding the optimal column or-
der is usually a complex problem. On the contrary,
in this particular application of rainbow boxes, it was
not, because of the small number of qubits. Most
quantum algorithms use only a few qubits, or a vari-
able number of qubits but can be demonstrated with
few of them. Here, we presented the qubits in their
order in the registry, without performing optimiza-
tion at all. It worked well, because, in many algo-
rithm, qubits are already “sorted” in order to put next
to each other qubits that are entangled with multiple-
qubit gates such as CNOT. If entangled qubits were
not next to each other (e.g. if we swap q1 and q2 in
Figure 6), holes would appear in the boxes.
To determine which quantum states are separable,
we traced entanglement during the program execu-
tion. This method works well for simple algorithms,
including quantum teleportation. However, it cannot
identify all separable states. For example, a second
CNOT gate may be used to unentangle an entangled
state. A more robust method would consist in per-
forming tensor product factorization from the state
vector. But deciding whether a state is separable (i.e.
the separability problem) is, in the general case, NP-
hard (Gharibian S, 2010).
In order to represent the evolution of a quantum
state, we juxtaposed several rainbow boxes views.
A similar approach was proposed by Masoodian et
al. (Masoodian and Koivunen, 2018) with linear dia-
grams for the temporal visualization of sets.
Perspectives of this work include (a) the use of
proposed visualization with students in computer sci-
ence and its evaluation in this context, (b) its improve-
ment by implementing automatic tensor product fac-
torization and by integrating it more deeply with Pro-
jectQ to provide a visual platform for quantum com-
puting, and (c) its extension to other quantum com-
puting paradigms beyond quantum circuits, such as
adiabatic quantum computation and one-way quan-
tum computation.
REFERENCES
Alsallakh, B., Micallef, L., Aigner, W., Hauser, H., Miksch,
S., and Rodgers, P. (2016). The State-of-the-Art of Set
Visualization. Computer Graphics Forum, 35(1):234–
260.
Bassil, S. and Keller, R. K. (2001). Software Visualization
Tools: Survey and Analysis. In International Work-
shop on Program Comprehension (IWPC), pages 7–
17.
Bellucci, F., Moktefi, A., and Pietarinen, A. V. (2014). Di-
agrammatic autarchy: linear diagrams in the 17th and
18th centuries.
Cross, A. W., Bishop, L. S., Smolin, J. A., and Gambetta,
J. M. (2017). Open quantum assembly language.
arXiv preprint, arXiv:1707.03429.
De Pauw, W., Jensen, E., Mitchell, N., Sevitsky, G., Vlis-
sides, J., and Yang, J. (2001). Visualizing the execu-
tion of Java programs. In Revised Lectures on Soft-
ware Visualization, pages 151–162 .
Francik J (2002). Quantum software. Studia informatica,
23(2A):48.
IVAPP 2019 - 10th International Conference on Information Visualization Theory and Applications
162