Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

Diagonalise Hermitian operators and change quantum basis with NumPy

P. K. Majumdar

Published Aug 30, 2026• 0 citations
Publisher

Abstract

This program uses NumPy’s Hermitian eigensolver to diagonalise the Pauli-(X) operator, construct its unitary eigenvector matrix and verify the similarity transformation numerically. It also distinguishes NumPy’s automatically ordered eigenbasis from the conventional Hadamard basis, demonstrating that (H†XH=Z).
DOI
10.5281/zenodo.22180260

Related papers

Comparing General and Hermitian Eigensolvers

P. K. Majumdar

This educational Jupyter notebook compares NumPy’s general-purpose numpy.linalg.eig eigensolver with the Hermitian-optimised numpy.linalg.eigh solver using the Pauli-Y operator. It examines eigenvalue ordering, eigenvector orthonormality, numerical residuals and phase-independent agreement between the eigendirections returned by the two methods. The notebook demonstrates that both functions produce valid results for this simple Hermitian matrix while explaining why eigh is the mathematically appropriate and computationally preferable choice for Hermitian operators. It is intended as a transparent, reproducible resource for students and educators studying numerical linear algebra in quantum computing.

•Aug 14, 2026•0 citations

Simulating Sequential Single-Qubit State Evolution with NumPy

P. K. Majumdar

This educational Jupyter notebook demonstrates how to simulate sequential quantum-gate operations using NumPy. Beginning with the computational-basis state |0>, it applies the Hadamard and Pauli-X operators in chronological circuit order while explaining the corresponding right-to-left order of matrix multiplication. The notebook uses NumPy's matrix-multiplication operator to compute intermediate and final state vectors, verifies the equivalence of composite-operator evaluation, and confirms that unitary evolution preserves state normalisation. It is intended as a transparent, reproducible introduction to matrix-based single-qubit simulation for students, educators and readers beginning their study of quantum computing.

•Aug 14, 2026•0 citations

Simulating a Sequential Pauli-Y–Hadamard–Pauli-Z Quantum Circuit

P. K. Majumdar

This notebook demonstrates how NumPy can be used to construct the unified matrix operator for a single-qubit circuit in which the Pauli-Y, Hadamard and Pauli-Z gates are applied sequentially. It explains the relationship between chronological circuit order and right-to-left matrix multiplication, computes the composite operator as Z @ H @ Y, prints the resulting 2 × 2 complex matrix and verifies numerically that the composite transformation remains unitary.

•Aug 19, 2026•0 citations

Unitaria: Quantum Linear Algebra via Block Encodings

Matthias Deiml, Oliver Hüttenhofer, Ram Mosco +2 more

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.

quant-pharXiv:2605.10768•May 12, 2026•0 citations

BasisRotator: A General Operator Basis Translator in Python

P. K. Majumdar

This program defines a reusable BasisRotator class that transforms the matrix representation of any finite-dimensional complex operator into a new orthonormal basis. The operator itself need not be unitary. The class constructs the change-of-basis matrix S from the supplied basis vectors, verifies that S†S = I, and calculates the transformed representation S†AS. It then confirms that the trace and determinant are preserved, providing numerical checks that the new matrix represents the same linear operator in a different coordinate basis. An example transforms a non-unitary two-dimensional operator from the computational basis into the Hadamard basis.

•Sep 4, 2026•0 citations

Constructing and Validating Quantum Projection Operators with NumPy

P. K. Majumdar

This program constructs a projection operator from a normalised complex state vector and verifies its Hermiticity, idempotence, trace and eigenvalues. It also generates the complementary projector, confirms that the two outcome projectors resolve the identity, and calculates measurement probabilities for an example input state. Numerical tolerances are used to accommodate floating-point arithmetic.

•Aug 25, 2026•0 citations
This educational Jupyter notebook compares NumPy’s general-purpose numpy.linalg.eig eigensolver with the Hermitian-optimised numpy.linalg.eigh solver using the Pauli-Y operator. It examines eigenvalue ordering, eigenvector orthonormality, numerical residuals and phase-independent agreement between the eigendirections returned by the two methods. The notebook demonstrates that both functions produce valid results for this simple Hermitian matrix while explaining why eigh is the mathematically appropriate and computationally preferable choice for Hermitian operators. It is intended as a transparent, reproducible resource for students and educators studying numerical linear algebra in quantum computing.
This educational Jupyter notebook demonstrates how to simulate sequential quantum-gate operations using NumPy. Beginning with the computational-basis state |0>, it applies the Hadamard and Pauli-X operators in chronological circuit order while explaining the corresponding right-to-left order of matrix multiplication. The notebook uses NumPy's matrix-multiplication operator to compute intermediate and final state vectors, verifies the equivalence of composite-operator evaluation, and confirms that unitary evolution preserves state normalisation. It is intended as a transparent, reproducible introduction to matrix-based single-qubit simulation for students, educators and readers beginning their study of quantum computing.
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.
This program defines a reusable BasisRotator class that transforms the matrix representation of any finite-dimensional complex operator into a new orthonormal basis. The operator itself need not be unitary. The class constructs the change-of-basis matrix S from the supplied basis vectors, verifies that S†S = I, and calculates the transformed representation S†AS. It then confirms that the trace and determinant are preserved, providing numerical checks that the new matrix represents the same linear operator in a different coordinate basis. An example transforms a non-unitary two-dimensional operator from the computational basis into the Hadamard basis.