# Quasi-Shor Algorithms for Global Benchmarking of Universal Quantum Processors
## 3 Witness the Density Matrices  
The initial states of the three controlling qubits and the two computing qubits are set as \(|0\rangle\otimes^{3}\!|00\rangle\). The quantum states \(\phi_{1},\phi_{2},\phi_{3},\phi_{4}\) are calculated analytically by matrices multiplications. To demonstrate the evolution of quantum states in Bell-Shor processing, Figure 2a-d display the density matrices \(\rho_{1},\rho_{2},\rho_{3},\rho_{4}\) corresponding to \(\phi_{1},\phi_{2},\phi_{3},\phi_{4}\), respectively. The elements marked with dark colors are zero (with accuracy \(\leq 10^{-4}|E_{\rm max}|\), where \(E_{\rm max}\) is the value of the element with the maximum absolute value). Running along the quantum circuit, it is noticeable that the states are becoming more complex and entangled. The zero elements are distributed as horizontal and vertical grids. The calculated results of the other three different input states \(|01\rangle,|10\rangle,|11\rangle\) of computing qubits (i.e., the second register qubits) are shown in Appendix A. Applying the QFT\({}^{\dagger}\) operation to state \(\phi_{4}\), density matrices \(\rho_{5}\) of \(\phi_{5}\) constructed with complex elements are shown in Figure 3. Here, the zero elements are marked with black color. In contrast to Figure 2, the translational symmetry of the g  
Figure 1: Schematic quantum circuit for quasi-Shor algorithms (**a**) and Bell-Shor algorithm (**b**). Figure 2: Density matrices for a series of quantum states during the processing ahead of QFT\({}^{\dagger}\). (The input state is \(|0\rangle\otimes^{3}\!|00\rangle\)). (**a**) The density matrix \(\rho_{1}\) of \(\phi_{1}\). (**b**) The density matrix \(\rho_{2}\) of \(\phi_{2}\). (**c**) The density matrix \(\rho_{3}\) of \(\phi_{3}\). (**d**) The density matrix \(\rho_{4}\) of \(\phi_{4}\). local rotational symmetry emerges. The real parts of the density matrices remain symmetric about the main diagonal just as the density matrices before QFT\({}^{\dagger}\), and the elements in the main diagonal are all positive. The zero elements of the imaginary parts of the density matrices are also symmetric about the main diagonal, whereas the other elements are all conjugate with each other about the main diagonal. Moreover, the elements in the main diagonal are all zero. The number of zero elements in the real and imaginary parts are counted for in each quantum state. Denoting the number of zero elements as \(n\), the ratio \(n/1024\) as a function of the quantum circuit depth is illustrated in Figure 4. The ratio is decreasing during the whole process. At first, 93.75% of the 1024 elements are zero, then with the operations of C-Bell and QFT\({}^{\dagger}\), \(n\) decreases to 16-20 finally. The zero elements drop to just a few dark points in the real density matrices and generate imaginary parts after the operation of QFT\({}^{\dagger}\). In Table 1, the coordinates of the maximum elements and zero elements in the real parts of density matrices \(\rho_{5}\) are listed specifically. There are obvious distinctions among these four input states. Designating \(|00000\rangle\langle 00000|\) as (1,1) and \(|11111\rangle\langle 11111|\) as (32,32), the coordinate of the maximum is (1,1) for both \(|0\rangle^{\otimes 3}|00\rangle\) and \(|0\rangle^{\otimes 3}|10\rangle\), while (2,2) for \(|0\rangle^{\otimes 3}|01\rangle\) and \(|0\rangle^{\otimes 3}|11\rangle\). The landscapes of these density matrices are spectacular with remarkable features. For the zero entries, there are about 16-20 elements with unique distributions for different input cases. In contrast to the real parts, the imaginary parts have a lot of zero entries and most are degenerated for different input states, i.e., the patterns of zero entries are nearly identical. Appendix A presents calculations of the reduced density matrices and the coordinates of the maximum element and zero entries.