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

BasisRotator: A General Operator Basis Translator in Python

P. K. Majumdar

Published Sep 4, 2026• 0 citations
Publisher

Abstract

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.

DOI
10.5281/zenodo.22293139

Related papers

Diagonalise Hermitian operators and change quantum basis with NumPy

P. K. Majumdar

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).

•Aug 30, 2026•0 citations

Adjoints and Unitary Transformations

We saw in Chapter 1 that a linear transformation on a vector space V can be represented by an n × n matrix with respect to a particular choice of basis { e i } of V . We also studied an important class of linear transformations called orthogonal transformations. These are represented by orthogonal matrices a satisfying the condition aa T = a T a = 1. For Euclidean spaces, that is, spaces equipped with the Euclidean inner product (8.2), orthogonal transformations preserve the length of vectors. In this chapter, we will study the generalization of an orthogonal transformation to a so-called unitary transformation, which plays the same role in unitary spaces [complex spaces equipped with inner products satisfying (8.27) and (8.28)] as orthogonal transformations do in real Euclidean spaces. Unitary transformations preserve the lengths (norms) of vectors in unitary spaces, and are of fundamental importance in quantum mechanics. First, we need to introduce the notion of an adjoint operator (transformation).

WORLD SCIENTIFIC eBooks•Sep 17, 2015•0 citations

Matrix representation of vectors and operators in nonorthogonal basis vectors

S. D. Deshpande, R. B. Pode

The bases used in quantum mechanics, in general, are orthonormal. The relations in orthonormal basis vectors are simpler than those in nonorthogonal basis vectors. Also, the operators that represent different physical quantities are Hermitian and the eigenvectors of these operators belonging to different eigenvalues are orthonormal to each other. But, in many cases, such as sets of screened hydrogenic wavefunctions, nonorthogonal sets of basis vectors occur. It is, therefore, necessary to consider the representation of vectors and operators in nonorthogonal bases. Making use of the set of vectors reciprocal to the given set of nonorthogonal base vectors, the expression for the norms of vectors and for the matrix elements has been found. Also, adjoint and Hermitian matrices in nonorthogonal bases have been worked out using a set of reciprocal basis vectors.

American Journal of Physics•Apr 1, 1988•8 citations

Finite Dimensional Spaces

Ravinder Rupchand Puri

In Chapter 2, we showed that the vectors in the Hilbert space can be represented by column vectors and the operators by n × n matrices. The algebra of operators in a finite dimensional space is thus equivalent with the algebra of finite dimensional matrices. In this chapter we summarize some results of relevance to us in matrix algebra. Matrix Algebra Consider the space of finite dimension n spanned by the orthonormal basis f﹛ | k ﹜. As discussed in Chapter 2, a vector j u i in the space is represented by the column vector u e constituted by as its elements, whereas its dual h u j is represented †. Similarly an operator A O is represented by the n × n matrix A Q constituted by as its elements. We restate below in matrix notation some notions of abstract operator algebra introduced in Chapter 2. 1. In terms of their representation by column vectors, the scalar or inner product h u jvi between j u i and is given by where ﹛ṵ﹜ and ﹛ṵ﹜ are the elements of ṵ and ṵ , respectively. It may be verified that the definition of the scalar product given above is in accordance with the axioms of the scalar product. Let ﹛u i ﹜ be an orthonormal basis spanning the given space. By virtue of (3.1) and (3.2), the completeness and the orthonormality relations,

Cambridge University Press eBooks•Apr 17, 2017•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

Quantum Computing Preliminaries: The Mathematical Language of Quantum Computing

P. K. Majumdar

Quantum computing uses a mathematical language that can seem unfamiliar to readers from programming, engineering and other technical backgrounds. Qubits are represented by vectors, quantum gates by matrices, measurement outcomes by eigenvalues, and probability amplitudes by complex numbers. Quantum Computing Preliminaries develops this language carefully, connecting each mathematical idea with its computational and physical meaning. The book begins with complex vector spaces and explains why quantum states require more than classical probabilities. It introduces qubits, superposition, normalisation, basis vectors and Dirac bra–ket notation, supported by worked calculations and geometric interpretation using the Bloch sphere. The discussion then turns to inner products and the geometry of quantum states. Readers learn how to calculate norms, test orthogonality, determine state overlap and apply the Born rule. Particular attention is given to complex conjugation and the distinction between the ordinary dot product and the Hermitian inner product used in quantum mechanics.The treatment of matrix operators establishes the roles of linear, unitary and Hermitian operators. It explains matrix multiplication, non-commutativity, eigenvalues, eigenvectors, reversibility and norm preservation. The Pauli and Hadamard gates provide concrete examples that link matrix algebra to rotations, the Bloch sphere, quantum-state evolution, and measurement. Outer products and projection operators are developed as tools for constructing operators, selecting state components and describing ideal projective measurements. The book examines idempotence, completeness, repeated measurement and the distinction between the ket–bra outer product and the tensor product used to form composite quantum systems. The final chapter explores changes of basis, operator representations and diagonalisation. It shows how the same physical state or operation can have different numerical representations in the computational and Hadamard bases. Readers derive the similarity transformation, use outer-product substitution, diagonalise Hermitian operators and interpret the spectral decomposition geometrically. Examples involving the Pauli-X, Pauli-Y, Pauli-Z and Hadamard operators demonstrate how basis choice exposes phase, population and measurement structure without changing the underlying physics. Throughout the book, Python and NumPy examples translate the mathematics into executable calculations. The programs demonstrate complex-vector operations, inner products, eigendecomposition, basis transformation and numerical verification while explaining the importance of using operations suited to complex Hilbert spaces. Each chapter includes conceptual, mathematical, computational and challenge exercises. Detailed solutions provide step-by-step derivations, program output and physical interpretation, allowing the book to support both guided study and independent practice. Quantum Computing Preliminaries is intended for students, software developers, engineers and technically minded readers preparing to study quantum circuits, algorithms, simulation, measurement, entanglement or error correction. It assumes familiarity with elementary algebra and programming but does not require prior training in quantum mechanics. Its purpose is to provide a clear mathematical foundation for understanding how quantum information is represented, transformed and measured.

•Sep 4, 2026•0 citations
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.
We saw in Chapter 1 that a linear transformation on a vector space V can be represented by an n × n matrix with respect to a particular choice of basis { e i } of V . We also studied an important class of linear transformations called orthogonal transformations. These are represented by orthogonal matrices a satisfying the condition aa T = a T a = 1. For Euclidean spaces, that is, spaces equipped with the Euclidean inner product (8.2), orthogonal transformations preserve the length of vectors. In this chapter, we will study the generalization of an orthogonal transformation to a so-called unitary transformation, which plays the same role in unitary spaces [complex spaces equipped with inner products satisfying (8.27) and (8.28)] as orthogonal transformations do in real Euclidean spaces. Unitary transformations preserve the lengths (norms) of vectors in unitary spaces, and are of fundamental importance in quantum mechanics. First, we need to introduce the notion of an adjoint operator (transformation).
The bases used in quantum mechanics, in general, are orthonormal. The relations in orthonormal basis vectors are simpler than those in nonorthogonal basis vectors. Also, the operators that represent different physical quantities are Hermitian and the eigenvectors of these operators belonging to different eigenvalues are orthonormal to each other. But, in many cases, such as sets of screened hydrogenic wavefunctions, nonorthogonal sets of basis vectors occur. It is, therefore, necessary to consider the representation of vectors and operators in nonorthogonal bases. Making use of the set of vectors reciprocal to the given set of nonorthogonal base vectors, the expression for the norms of vectors and for the matrix elements has been found. Also, adjoint and Hermitian matrices in nonorthogonal bases have been worked out using a set of reciprocal basis vectors.
In Chapter 2, we showed that the vectors in the Hilbert space can be represented by column vectors and the operators by n × n matrices. The algebra of operators in a finite dimensional space is thus equivalent with the algebra of finite dimensional matrices. In this chapter we summarize some results of relevance to us in matrix algebra. Matrix Algebra Consider the space of finite dimension n spanned by the orthonormal basis f﹛ | k ﹜. As discussed in Chapter 2, a vector j u i in the space is represented by the column vector u e constituted by as its elements, whereas its dual h u j is represented †. Similarly an operator A O is represented by the n × n matrix A Q constituted by as its elements. We restate below in matrix notation some notions of abstract operator algebra introduced in Chapter 2. 1. In terms of their representation by column vectors, the scalar or inner product h u jvi between j u i and is given by where ﹛ṵ﹜ and ﹛ṵ﹜ are the elements of ṵ and ṵ , respectively. It may be verified that the definition of the scalar product given above is in accordance with the axioms of the scalar product. Let ﹛u i ﹜ be an orthonormal basis spanning the given space. By virtue of (3.1) and (3.2), the completeness and the orthonormality relations,
Quantum computing uses a mathematical language that can seem unfamiliar to readers from programming, engineering and other technical backgrounds. Qubits are represented by vectors, quantum gates by matrices, measurement outcomes by eigenvalues, and probability amplitudes by complex numbers. Quantum Computing Preliminaries develops this language carefully, connecting each mathematical idea with its computational and physical meaning. The book begins with complex vector spaces and explains why quantum states require more than classical probabilities. It introduces qubits, superposition, normalisation, basis vectors and Dirac bra–ket notation, supported by worked calculations and geometric interpretation using the Bloch sphere. The discussion then turns to inner products and the geometry of quantum states. Readers learn how to calculate norms, test orthogonality, determine state overlap and apply the Born rule. Particular attention is given to complex conjugation and the distinction between the ordinary dot product and the Hermitian inner product used in quantum mechanics.The treatment of matrix operators establishes the roles of linear, unitary and Hermitian operators. It explains matrix multiplication, non-commutativity, eigenvalues, eigenvectors, reversibility and norm preservation. The Pauli and Hadamard gates provide concrete examples that link matrix algebra to rotations, the Bloch sphere, quantum-state evolution, and measurement. Outer products and projection operators are developed as tools for constructing operators, selecting state components and describing ideal projective measurements. The book examines idempotence, completeness, repeated measurement and the distinction between the ket–bra outer product and the tensor product used to form composite quantum systems. The final chapter explores changes of basis, operator representations and diagonalisation. It shows how the same physical state or operation can have different numerical representations in the computational and Hadamard bases. Readers derive the similarity transformation, use outer-product substitution, diagonalise Hermitian operators and interpret the spectral decomposition geometrically. Examples involving the Pauli-X, Pauli-Y, Pauli-Z and Hadamard operators demonstrate how basis choice exposes phase, population and measurement structure without changing the underlying physics. Throughout the book, Python and NumPy examples translate the mathematics into executable calculations. The programs demonstrate complex-vector operations, inner products, eigendecomposition, basis transformation and numerical verification while explaining the importance of using operations suited to complex Hilbert spaces. Each chapter includes conceptual, mathematical, computational and challenge exercises. Detailed solutions provide step-by-step derivations, program output and physical interpretation, allowing the book to support both guided study and independent practice. Quantum Computing Preliminaries is intended for students, software developers, engineers and technically minded readers preparing to study quantum circuits, algorithms, simulation, measurement, entanglement or error correction. It assumes familiarity with elementary algebra and programming but does not require prior training in quantum mechanics. Its purpose is to provide a clear mathematical foundation for understanding how quantum information is represented, transformed and measured.