Quantum Algorithms for Matrix Operations of Row Addition, Row Swapping, Trace Calculation and Transpose
Yu-Hang Liu, Yuan-Hong Tao, Jing-Run Lan, Shao-Ming Fei · 2025
Read Quantum Algorithms for Matrix Operations of Row Addition, Row Swapping, Trace Calculation and Transpose by Yu-Hang Liu, Yuan-Hong Tao, Jing-Run Lan, Shao-Ming Fei (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2501-15137.txt.
Introduction
Quantum routines for basic matrix moves are built by Yu-Hang Liu and co-authors in a 2025 arXiv paper whose head gives a broader title on unitary maps. Matrix work sits at the core of much science and tech. The team builds quantum steps for four moves: add one row to another, swap two rows, sum the diagonal, and flip a matrix on its side.
The steps rest on multi-qubit Toffoli gates and plain single-qubit acts, plus checks on helper states. Costs are worked out for each routine. The set gives builders tested blocks for larger quantum line-math tools. Such blocks matter as quantum hardware grows.
Catalog record
| CREATOR | Yu-Hang Liu, Yuan-Hong Tao, Jing-Run Lan, Shao-Ming Fei |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 41 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2501-15137
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Quantum Algorithms for Matrix Operations of Row Addition, Row Swapping, Trace Calculation and Transpose Yu-Hang Liu, Yuan-Hong Tao, Jing-Run Lan, Shao-Ming Fei Abstract Quantum algorithms of matrix operations are of great significance in many fields in science and technology. In this paper, by leveraging multi-qubit Toffoli gates and basic single-qubit operations, the quantum algorithms of matrix operations of row addition, row swapping, trace calculation and transpose are obtained. In particular, the complexities of these quantum algorithms are presented, too. Keywords: quantum algorithm, quantum circuit, matrix operation, row addition, row swapping, quantum measurement 1 Introduction Quantum computations offer exponential speedups over their classical counterparts by leveraging the principles of quantum mechanics. In 1980 Benioff and Manin [ 1 ] proposed the concept of quantum computing, and Feynman [ 2 ] introduced the theoretical framework of a quantum computer in 1982. In 1985 Deutsch [ 3 ] proposed the quantum parallel algorithm, showcasing the significant computational advantages of quantum computing over classical methods. In 1994 Shor [ 4 , 5 ] presented a quantum algorithm for prime factorization, drawing widespread attention to the advantages of quantum computing in solving certain problems. Grover [ 6 ] followed in 1996 with a quantum search algorithm, further demonstrating quantum computing’s potential in data search applications. In 2009 the HHL algorithm [ 7 , 8 ] was developed for solving linear systems of equations, greatly advancing the quantum algorithm researches. Several renowned quantum operations, such as quantum Fourier transform [ 9 , 10 , 11 ] and quantum phase estimation [ 11 , 12 ] , have significantly contributed to the field. Matrix operations serve as the core computational power support for quantum algorithms. The efficient quantum implementation of its basic operations (including row transformation, transposition, and trace calculation, etc.) holds significant theoretical and practical value. In quantum chemistry simulations [ 13 ] , the elementary row transformation of matrices can rapidly simplify the Hamiltonian matrix, reducing the time complexity of solving molecular energy spectra from the polynomial level of classical algorithms to the logarithmic level. Matrix Transpose operation enables the efficient analysis of molecular symmetry, while the calculation of the matrix trace can directly yield key physical quantities such as the number of electrons. In quantum cryptography [ 14 ] , elementary row transformation can optimize the encoding of quantum states to enhance security. Matrix Transpose can achieve efficient information routing in quantum communication networks, and the matrix trace can be used for the integrity detection of quantum states. In the field of quantum machine learning [ 15 ] , elementary row transformation can accelerate the feature extraction of Quantum Support Vector Machines (QSVMs). Matrix Transpose can improve the backpropagation efficiency of quantum neural networks, and the matrix trace operation can quickly calculate kernel functions to evaluate model performance. Given the wide-ranging influence of matrix operations in interdisciplinary fields, exploring efficient quantum computing methods to solve matrix-related algebraic problems has become a current research hotspot. In recent years, researchers have proposed several quantum algorithms for matrix operations. For example, the Trotter approximation formula [ 16 ] has been utilized to simulate quantum circuits, addressing complex operations such as matrix addition, multiplication and Kronecker products. Quantum algorithms for computing vector inner products [ 17 , 18 , 19 , 20 , 21 ] have also been developed. These algorithms leverage the superposition and entanglement of qubits and have potential applications in fields like machine learning and data processing. Based on a “sender-receiver” quantum computing model, in 2022 Wen-Tao Qi et al. [ 19 ] proposed a class of quantum algorithms for matrix operations, including matrix-vector multiplication, matrix-matrix multiplication, matrix addition, determinant computation and matrix inversion. In 2023 A.I. Zenchuk et al. [ 20 ] further developed the idea of using specific types of unitary transformations to implement linear algebra protocols according to multi-qubit Toffoli gates and the simplest single-qubit operations. Auxiliary measurements were employed to remove redundant information and extract desired results. Building on this work, in 2024 they [ 21 ] also introduced a method to encode the N rows of a matrix into pure states of N independent quantum subsystems. By selecting appropriate unitary operators, the determinant can be computed efficiently. Furthermore, in 2025 they [ 22 ] discussed the method of encording unnormalized matrices, and the system encoding the matrix was extended adding one more probability amplitude that satisfy the normalization condition. However, these quantum algorithms for basic matrix operations still face challenges such as high computational complexity and low success probabilities, which limit their broader applicability. The elementary row transformations of matrices play significant roles in solving linear systems of equations, determining matrix rank, finding invertible matrices and simplifying determinant computations, with wide-ranging value in both theoretical research and practical applications. In quantum computing, elementary row transformations can simplify matrices for efficient linear equation solving, provide theoretical support for matrix decomposition, advance large-scale matrix operations, and help to interpret the geometric meanings of linear transformations. These contributions offer new insights into the designs of quantum algorithms. Currently, there are no specialized quantum algorithms specifically designed for elementary row transformations of matrices. Drawing on the foundational ideas from [ 20 ] , this paper proposes algorithms for two elementary row transformations of matrices, transpose and trace of matrices, along with their corresponding quantum circuits. These algorithms collectively involve the following key steps: 1. Construction of the initial state: matrix elements are first encoded into the probability amplitudes of quantum pure states by using tensor product operations. 2. Information separation and labeling: combining multi-qubit control operators with ancillary states, where the ancillary states are used to accurately label the useful and redundant parts of the information, achieving effective separation of the data. 3. State swaping operations: depending on the specific algorithms, C-SWAP operations are flexibly employed to precisely exchange the states of two quantum bits. 4. State superposition processing: Hadamard operators are applied to induce superposition states among quantum bits. 5. Measurement on the ancillary states: auxiliary measurement techniques are used to eliminate redundant information, ensuring that the desired results are accurately reflected in the probability amplitudes of the final state. This paper focuses on the core algorithm layer of quantum computers and aims to design a set of quantum circuit schemes for implementing basic matrix operations. The research is carried out under the following premise: the input state, which is the quantum state encoding matrix elements, is successfully prepared. On this basis, we systematically construct a quantum circuit architecture capable of performing basic matrix operations such as row transformation transposition, and trace calculation. This approach is of great value in the current development of quantum computing. On the one hand, quantum state preparation and quantum state measurement, as crucial aspects in quantum computing, have attracted much attention on conducting specialized studies. Transforming classical matrices into quantum pure states is a fundamental issue that needs to be addressed in the field of quantum state preparation. Moreover, converting the results of quantum state measurements into classical data interpretable by humans makes quantum readout the core part of quantum state measurement research. On the other hand, the algorithm designed in this paper fully considers the compatibility with quantum state preparation and quantum state measurement schemes, laying