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

Simulating Sequential Single-Qubit State Evolution with NumPy

P. K. Majumdar

Published Aug 14, 2026• 0 citations
Publisher

Abstract

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.

DOI
10.5281/zenodo.21937583

Related papers

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

Simulation of Single Qubit Measurement Probabilities in Computational and Hadamard Bases

P. K. Majumdar

This Jupyter Notebook provides a reproducible classical simulation of measurement probabilities for a single qubit using the Born rule The notebook accompanies Chapter 2 of Quantum Computing Preliminaries and demonstrates how the same quantum state produces different probability distributions when measured in different orthonormal bases A generic pure qubit state is constructed from a polar angle of pi divided by 3 and an azimuthal angle of pi divided by 4 on the Bloch sphere The notebook calculates the probabilities of measuring this state in the computational basis and in the Hadamard basis In the computational basis the probabilities of the zero and one outcomes are three quarters and one quarter In the Hadamard basis the probabilities of the plus and minus outcomes are calculated from the corresponding complex inner products The implementation validates that the quantum state is finite one dimensional and normalised It also verifies that each supplied measurement basis has the correct dimensions and is orthonormal Numerical consistency checks confirm that the probabilities obtained in each basis independently sum to 1 within a suitable floating point tolerance The notebook uses Python 3 and NumPy No external datasets internet connection quantum computing framework or physical quantum hardware are required

•Aug 11, 2026•0 citations

Simulating qubit measurement probabilities with the Born rule

P. K. Majumdar

This Jupyter Notebook provides a reproducible simulation of single qubit measurement probabilities using the Born rule. It accompanies Chapter 2 of Quantum Computing Preliminaries and demonstrates the relationship between complex vector calculations, Bloch sphere geometry and experimentally observed measurement frequencies. The notebook implements a validated Python function that calculates both the complex probability amplitude and the corresponding transition probability for an initial quantum state and a measurement state. It checks that the supplied vectors are finite, one dimensional, equal in size and correctly normalised. Invalid or physically inconsistent inputs produce informative errors. A worked example prepares a qubit in the computational zero state and measures it in the Pauli X basis. The calculated probabilities of obtaining the plus and minus outcomes are both 0.5, and their sum is verified to be 1. The result is independently confirmed using the geometric relationship between the corresponding Bloch sphere vectors. The notebook also constructs general pure qubit states at different polar and azimuthal angles. It compares numerical transition probabilities with the Bloch sphere half angle prediction across a range of sampled angles and verifies agreement within a numerical tolerance. A finite measurement simulation using 10000 trials illustrates the distinction between an exact theoretical probability and an observed experimental frequency. A fixed random seed of 2026 ensures that this demonstration is reproducible. The notebook records the Python version, NumPy version and execution platform. It requires only Python 3, Jupyter Notebook or JupyterLab, and NumPy. No external datasets, internet connection, quantum computing framework or physical quantum hardware are required.

•Aug 11, 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

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

Reconstructing the Hadamard Gate from Euler-Angle Parameters

P. K. Majumdar

This notebook implements the general single-qubit unitary matrix U(θ, φ, λ) and evaluates it for θ = π/2, φ = 0 and λ = π. It compares the generated array with the exact Hadamard matrix, uses matrix multiplication to verify their equivalence, and independently confirms that the resulting operator satisfies the unitarity condition U†U = I. The exercise demonstrates how familiar quantum gates can be recovered as particular cases of a general parameterised single-qubit transformation.

•Aug 19, 2026•0 citations
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 Jupyter Notebook provides a reproducible classical simulation of measurement probabilities for a single qubit using the Born rule The notebook accompanies Chapter 2 of Quantum Computing Preliminaries and demonstrates how the same quantum state produces different probability distributions when measured in different orthonormal bases A generic pure qubit state is constructed from a polar angle of pi divided by 3 and an azimuthal angle of pi divided by 4 on the Bloch sphere The notebook calculates the probabilities of measuring this state in the computational basis and in the Hadamard basis In the computational basis the probabilities of the zero and one outcomes are three quarters and one quarter In the Hadamard basis the probabilities of the plus and minus outcomes are calculated from the corresponding complex inner products The implementation validates that the quantum state is finite one dimensional and normalised It also verifies that each supplied measurement basis has the correct dimensions and is orthonormal Numerical consistency checks confirm that the probabilities obtained in each basis independently sum to 1 within a suitable floating point tolerance The notebook uses Python 3 and NumPy No external datasets internet connection quantum computing framework or physical quantum hardware are required
This Jupyter Notebook provides a reproducible simulation of single qubit measurement probabilities using the Born rule. It accompanies Chapter 2 of Quantum Computing Preliminaries and demonstrates the relationship between complex vector calculations, Bloch sphere geometry and experimentally observed measurement frequencies. The notebook implements a validated Python function that calculates both the complex probability amplitude and the corresponding transition probability for an initial quantum state and a measurement state. It checks that the supplied vectors are finite, one dimensional, equal in size and correctly normalised. Invalid or physically inconsistent inputs produce informative errors. A worked example prepares a qubit in the computational zero state and measures it in the Pauli X basis. The calculated probabilities of obtaining the plus and minus outcomes are both 0.5, and their sum is verified to be 1. The result is independently confirmed using the geometric relationship between the corresponding Bloch sphere vectors. The notebook also constructs general pure qubit states at different polar and azimuthal angles. It compares numerical transition probabilities with the Bloch sphere half angle prediction across a range of sampled angles and verifies agreement within a numerical tolerance. A finite measurement simulation using 10000 trials illustrates the distinction between an exact theoretical probability and an observed experimental frequency. A fixed random seed of 2026 ensures that this demonstration is reproducible. The notebook records the Python version, NumPy version and execution platform. It requires only Python 3, Jupyter Notebook or JupyterLab, and NumPy. No external datasets, internet connection, quantum computing framework or physical quantum hardware are required.
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.