This repository hosts the manuscript and companion code for: "The Qang (qg): A Unified Angular-Probability Unit and Metric for Parametric Quantum Circuit Design." Abstract:We introduce the Qang (qg), a unified angular-probability metric designed to bridge the gap between physical rotation angles in the Bloch sphere and measurement probability distributions in parametric quantum circuits. We formalize two complementary operational modes:1. The Polar Bias Qang (qg_Z), defined as qg_Z(θ) = cos(θ) = <σ_z>, mapping directly to the computational basis expectation value in [-1.0, 1.0].2. The Measurement-Outcome Entropy Qang (qg_S), defined as qg_S(θ) = H(cos²(θ/2)), quantifying the binary Shannon entropy of Born-rule outcomes in [0.0, 1.0]. We analyze the domain limitations, phase decoupling, and scale invariance properties of these metrics, as well as the gradient singularity at the poles (|qg_Z| -> 1). Numerical implementations, closed-form verification, and an interactive explorer notebook are included. Repository & Companion Code:GitHub: https://github.com/Viny2030/quangORCID: 0000-0001-8884-4811
This repository hosts the manuscript and companion code for: "The Qang (qg): A Unified Angular-Probability Unit and Metric for Parametric Quantum Circuit Design." Abstract:We introduce the Qang (qg), a unified angular-probability metric designed to bridge the gap between physical rotation angles in the Bloch sphere and measurement probability distributions in parametric quantum circuits. We formalize two complementary operational modes:1. The Polar Bias Qang (qg_Z), defined as qg_Z(θ) = cos(θ) = <σ_z>, mapping directly to the computational basis expectation value in [-1.0, 1.0].2. The Measurement-Outcome Entropy Qang (qg_S), defined as qg_S(θ) = H(cos²(θ/2)), quantifying the binary Shannon entropy of Born-rule outcomes in [0.0, 1.0]. We analyze the domain limitations, phase decoupling, and scale invariance properties of these metrics, as well as the gradient singularity at the poles (|qg_Z| -> 1). Numerical implementations, closed-form verification, and an interactive explorer notebook are included. Repository & Companion Code:GitHub: https://github.com/Viny2030/quangORCID: 0000-0001-8884-4811
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.
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
Quantum computing introduces unique forms of randomness arising from measurement processes, gate noise, and hardware imperfections. Ensuring reliable uncertainty quantifi- cation in such quantum-driven or quantum-derived predictions is an emerging challenge. In classical machine learning, conformal prediction has proven to be a robust frame- work for distribution-free uncertainty calibration, often focusing on univariate or low- dimensional outputs. Recent advances have extended conformal methods to handle multi-output or multi-dimensional responses, addressing sophisticated tasks such as time-series, image classification sets, and quantum-generated probability distributions. However, bridging the gap between these powerful conformal frameworks and the high- dimensional, noise-prone distributions typical of quantum measurement scenarios remains largely open. In this paper, we propose a unified approach to harness quantum conformal methods for multi-output distributions, with a particular emphasis on two experimental paradigms: (i) a standard 2-qubit circuit scenario producing a four-dimensional outcome distribution, and (ii) a multi-basis measurement setting that concatenates measurement probabilities in different bases (Z, X, Y) into a twelve-dimensional output space. By combining a multi- output regression model (e.g., random forests) with distributional conformal prediction, we validate coverage and interval-set sizes on both simulated quantum data and multi-basis measurement data. Our results confirm that classical conformal prediction can effectively provide coverage guarantees even when the target probabilities derive from inherently quantum processes. Such synergy opens the door to next-generation quantum-classical hybrid frameworks, providing both improved interpretability and rigorous coverage for quantum machine learning tasks. All codes and full reproducible Colab notebooks are made available at https://github.com/detasar/QECMMOU.
This Jupyter Notebook provides a reproducible numerical demonstration of the Born rule for projective measurements of a single qubit. It explains how a complex inner product is converted into a physically meaningful measurement probability. Using Python and NumPy, the notebook defines a validated function that calculates the probability amplitude between an initial quantum state and a measurement state. It then calculates the transition probability by taking the squared absolute value of that amplitude. The implementation checks that both state vectors are finite, one dimensional, equal in size and correctly normalised. It uses the NumPy vdot function to apply complex conjugation to the measurement state correctly. In the worked example, the qubit is prepared in the computational zero state and measured in the Pauli X basis. The calculation shows that the probabilities of obtaining the plus and minus outcomes are both 0.5. It also confirms that the two probabilities sum to 1. The numerical result is compared with the corresponding Bloch sphere prediction. The notebook verifies that the vector calculation and the geometric calculation both produce a transition probability of 0.5. Numerical consistency checks confirm agreement between the two calculation methods and verify probability conservation. The notebook requires Python 3, Jupyter Notebook or JupyterLab, and NumPy. It does not require a quantum computing framework or access to physical quantum hardware.
Qiskit and Cirq both parameterize single-qubit rotations by a raw angle in radians (RYGate(theta), cirq.ry(theta)), with no built-in notion of the physically meaningful quantity that angle controls: the Born-rule population bias of the resulting state. The qang unit (qg), published in Monteverde (2026), gives that quantity a name and a closed algebra: qg_Z = cos(theta) = <sigma_z> (the "Polar Bias Qang") and qg_S = H(p0) (the "Entropic Qang", binary Shannon entropy of the outcome distribution), with explicit, tested inversion formulas back to theta. A reference implementation already exists and runs today: native RQangGate/FullRQangGate classes for Qiskit, an equivalent native gate for Cirq, and a quang.transformations module (Householder reflections, the Grover diffuser, and Born-rule transition probabilities, all written directly in terms of qg_Z with no runtime trigonometry beyond the algebra's own square root). This has been validated locally against both simulators and, for the Qiskit gate, against IonQ's cloud simulator via qiskit-ionq, with results matching theory within ordinary shot noise. This RFC proposes upstreaming a qang module into each library: a first-class way to parameterize rotations, transition probabilities, and (per Section 6 below) calibration/estimation by qg value instead of by raw angle, alongside -- not replacing -- the existing angle-based API.
Quantum computing is the basis of a new revolution. Several quantum computers are already available and, with them, quantum programming languages, quantum software development kits and platforms, quantum error correction and optimization tools are proposed and presented continuously. In connection with this, disciplines such as the Quantum Software Engineering are appearing for applying the knowledge acquired through time in their corresponding classical relatives. Besides, measurement is well known as a key factor for assessing, and improving if needed, the quality of any model in terms of, for instance, its understandability. The easier to understand a model is, the easier to maintain, reuse, etc. In this work, we present the definition of a set of metrics for assessing the understandability of quantum circuits. Some examples of the calculation of the metrics are also presented. This is just the beginning of a more thorough process in which they will be empirically validated by the performance of empirical studies, especially experiments.