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

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

The Orthogonality Filter: Gram–Schmidt Projection in a Complex State Space

P. K. Majumdar

This Python/NumPy program generates a reproducible, normalised random quantum state and constructs its rank-one projection operator. It then generates a second complex state and applies the Gram–Schmidt procedure to remove every component parallel to the first state, producing a normalised orthogonal vector. The program verifies the inner-product orthogonality, confirms that the projector is Hermitian and idempotent, and demonstrates that applying the projector to the orthogonal state produces a vector whose norm is numerically zero within a declared floating-point tolerance. This illustrates, computationally, how a projector completely filters out a state that lies in its orthogonal complement.

•Aug 28, 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.
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.
This Python/NumPy program generates a reproducible, normalised random quantum state and constructs its rank-one projection operator. It then generates a second complex state and applies the Gram–Schmidt procedure to remove every component parallel to the first state, producing a normalised orthogonal vector. The program verifies the inner-product orthogonality, confirms that the projector is Hermitian and idempotent, and demonstrates that applying the projector to the orthogonal state produces a vector whose norm is numerically zero within a declared floating-point tolerance. This illustrates, computationally, how a projector completely filters out a state that lies in its orthogonal complement.