In quantum computing, every operation must be unitary to ensure reversibility and preserve probability amplitudes, which is a fundamental requirement for any quantum process. However, many real-world computations in areas such as machine learning, signal processing, and dynamical modeling inherently involve non-unitary matrices. Since these cannot be directly implemented on quantum hardware, a practical workaround is required. One promising solution is block-encoding, a framework that embeds a non-unitary matrix A in C^{n x n} into a larger unitary matrix U_A in C^{2n x 2n}, enabling the simulation of non-unitary actions within quantum circuits through ancilla preparation and post-selection. This thesis presents a novel and efficient method for block-encoding based on Gram-Schmidt orthogonalization. The algorithm constructs a unitary U_A with A embedded as the top-left block and remaining components filled to ensure global unitarity. Compared to traditional Singular Value Decomposition (SVD)-based approaches, the proposed method achieves at least 20% improvement in execution time, without compromising output fidelity or numerical stability. A corresponding quantum circuit is developed to extract A|psi> (that is, the transformed version of the input quantum state |psi> after applying the linear operator A) using post-selection on ancilla qubits, with the success probability determined by
In quantum computing, every operation must be unitary to ensure reversibility and preserve probability amplitudes, which is a fundamental requirement for any quantum process. However, many real-world computations in areas such as machine learning, signal processing, and dynamical modeling inherently involve non-unitary matrices. Since these cannot be directly implemented on quantum hardware, a practical workaround is required. One promising solution is block-encoding, a framework that embeds a non-unitary matrix A in C^{n x n} into a larger unitary matrix U_A in C^{2n x 2n}, enabling the simulation of non-unitary actions within quantum circuits through ancilla preparation and post-selection. This thesis presents a novel and efficient method for block-encoding based on Gram-Schmidt orthogonalization. The algorithm constructs a unitary U_A with A embedded as the top-left block and remaining components filled to ensure global unitarity. Compared to traditional Singular Value Decomposition (SVD)-based approaches, the proposed method achieves at least 20% improvement in execution time, without compromising output fidelity or numerical stability. A corresponding quantum circuit is developed to extract A|psi> (that is, the transformed version of the input quantum state |psi> after applying the linear operator A) using post-selection on ancilla qubits, with the success probability determined by
Block encoding of non-unitary matrices in a quantum framework is a transformative technique for broadening the capabilities of quantum algorithms, allowing them to address a wider range of computational challenges. This paper introduces a novel embedding method to construct unitary matrices from non-unitary matrices, enabling their efficient encoding into quantum circuits. Utilizing the Gram-Schmidt process, the proposed approach embeds ann×nnon-unitary matrixAinto a2n×2nunitary matrixUA. When Compared to conventional methods such as Singular Value Decomposition (SVD), our approach achieves a 20 % faster execution time while maintaining high accuracy. Block encoding method has the potential to significantly advance quantum computing applicability by building unitary matrices from non-unitary ones in areas like optimization, quantum machine learning, and large-scale quantum simulations.
We introduce Unitaria, a Python library that brings the simplicity of classical linear algebra toolkits such as NumPy and SciPy to the implementation of quantum algorithms based on block encodings, a general-purpose abstraction in which a matrix is embedded as a sub-block of a larger unitary operator. Their implementation has so far required deep knowledge of low-level circuit construction, which Unitaria aims to eliminate. The library provides a composable, array-like interface through which users can define block encodings of matrices and vectors, combine them through standard operations such as addition, multiplication, tensor products, and the Quantum Singular Value Transformation, and extract the resulting quantum circuits automatically. A key feature is a matrix-arithmetic evaluation path in which every operation can be computed directly on encoded vectors and matrices without dependence on ancilla qubits or circuit simulation. This enables correctness verification and classical simulation that scale well beyond what state vector simulation permits and also allows resource estimation, including gate counts, qubit counts, and normalization constants, without executing any circuit. Together, these capabilities allow researchers to develop, verify, and analyze quantum linear algebra algorithms today, ahead of the availability of error-corrected hardware. Unitaria is open source and available at https://github.com/tequilahub/unitaria.
The rapid advancement of quantum computing has created new opportunities for solving computationally intensive problems across diverse fields such as optimization, physical system simulation, and machine learning. However, practical implementation on Noisy Intermediate-Scale Quantum (NISQ) devices remains challenging due to hardware limitations including noise, decoherence, and restricted qubit connectivity. A fundamental constraint further complicating this effort is that all quantum operations must be unitary, while many real-world problems are naturally expressed in non-unitary forms. This discrepancy necessitates novel techniques for transforming non-unitary mathematical structures into unitary or Hamiltonian representations compatible with quantum hardware.This thesis proposes a unified framework for converting structured, sparse, or otherwise non-unitary classical matrices into unitary forms that can be executed efficiently on NISQ devices. The methodology introduces general transformation strategies such as linear combinations of unitaries, structured embeddings, and resource-aware circuit construction, enabling the deployment of quantum algorithms without incurring prohibitive overhead. Each technique is developed with an emphasis on preserving problem structure, minimizing circuit depth, and ensuring compatibility with IBM’s NISQ hardware. The proposed frameworks are validated through theoretical analysis and quantum simulations, with performance benchmarks based on gate count, circuit fidelity, convergence behavior, and scalability. This work demonstrates how non-unitary formulations arising in various computational contexts can be systematically adapted for quantum execution, advancing the practical utility of NISQ-era devices.
Quantum Signal Processing (QSP) and Quantum Singular Value Transformation (QSVT) provide an efficient framework for implementing polynomials of block-encoded matrices, and thus offer a systematic approach to quantum algorithm design. However, despite a number of recent advances, important limitations remain. In particular, QSP can only transform unitary matrices, by applying a polynomial to their eigenvalues, while QSVT is a singular-value transformation and thus one can only obtain the polynomial of Hermitian matrices. As a consequence, these techniques do not directly apply to an arbitrary non-Hermitian matrix that is not diagonalizable. In this work, we propose a simple yet powerful method to extend these ideas to arbitrary square matrices by acting on their eigenvalues. To this end, we introduce the notion of an n-regular block encoding, namely, a block encoding whose k-th power reproduces the k-th power of the encoded matrix for every 0<k<n. We show that applying QSP to any unitary with this property is equivalent to applying a polynomial of degree at most n to the block-encoded matrix, independently of its internal structure. Moreover, we provide a simple construction that transforms any block encoding into an n-regular one using only O(logn) ancillary qubits and operations. Finally, we show that this construction induces the desired transformation on the eigenvalues associated with the Jordan normal form of the matrix; for non-diagonalizable matrices this yields the full matrix function P(A), whose action on each Jordan block involves the derivatives of P, and not merely the map λ↦P(λ).
Block encoding allows quantum computers to simulate non-unitary matrices by embedding them into larger unitary operations [1]. This approach plays a critical role in many quantum algorithms that require matrix-vector multiplication such as quantum linear solvers, quantum machine learning models, and quantum reservoir computing. However, recovering the desired output state using block encoding is inherently probabilistic. The correct result is obtained only when the ancilla qubits collapse to the zero state during measurement, and the probability of this happening can be very low. As a result, repeated trials are often needed, which increases resource usage and reduces efficiency. In this work, we present a Grover-style amplitude amplification technique that significantly boosts the success probability without altering the final output state. By applying a series of unitary reflections, the method amplifies the amplitude of the successful outcome, reducing the number of repetitions required to obtain the correct result. This results in a quadratic improvement in efficiency compared to repeated sampling. Our results show that the success probability improved significantly from as low as 15 % to over 85 % after applying the amplification method. This improvement could help quantum programs run more efficiently in noisy environments and makes it easier to use block-encoded matrices in real applications.
Implementing polynomial functions of Hermitian matrices on quantum hardware is a foundational task in quantum computing, critical for accurate Hamiltonian simulation, quantum linear system solving, high-fidelity state preparation, machine learning kernels, and other advanced quantum algorithms. Existing state-of-the-art techniques, including Qubitization, Quantum Singular Value Transformation (QSVT), and Quantum Signal Processing (QSP), rely heavily on block-encoding the Hermitian matrix. These methods are often constrained by the complexity of preparing the block-encoded state, the overhead associated with the required ancillary qubits, or the challenging problem of angle synthesis for the polynomial's phase factors, which limits the achievable circuit depth and overall efficiency. In this work, we propose a novel and resource-efficient approach to implement arbitrary polynomials of a Hermitian matrix by leveraging the Generalized Quantum Signal Processing (GQSP) framework. Our method circumvents the need for block-encoding and avoids the compounding post-selection overheads characteristic of LCU-based constructions, achieving a stable, degree-independent success probability. We derive closed-form expressions for symmetric polynomial expansions and demonstrate how linear combinations of GQSP circuits can realize the desired transformation. This approach reduces resource overhead and opens new pathways for quantum algorithm design for functions of Hermitian matrices, particularly in settings where the Hermitian operator arises naturally from symmetric combinations of unitaries.