Metadata-Version: 2.4
Name: quantum-unified
Version: 0.0.1
Summary: Core utilities for the curvature–information invariant Y = sqrt(d_eff-1) * A^2 / I
Project-URL: Homepage, https://github.com/ANTHONY-OLEVESTER/quantum_unified
Project-URL: Repository, https://github.com/ANTHONY-OLEVESTER/quantum_unified
Project-URL: Issues, https://github.com/ANTHONY-OLEVESTER/quantum_unified/issues
Author-email: Anthony Olevester <olevester.joram123@gmail.com>
License: BSD 3-Clause License
        
        Copyright (c) 2025, Anthony Olevester
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.9
Requires-Dist: numpy>=1.22
Description-Content-Type: text/markdown

﻿# quantum-unified

[![PyPI](https://img.shields.io/pypi/v/quantum-unified.svg)](https://pypi.org/project/quantum-unified/)
[![License](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](LICENSE)

Curvature–Information utilities: compute and analyze the invariant

  Y = sqrt(d_eff - 1) * A^2 / I

where
- A is the Bures (Uhlmann) angle between two density matrices,
- I is mutual information in bits from a Stinespring dilation, and
- d_eff = 1 / Tr(rho^2) is the effective dimension.

The package provides stable, dependency‑light helpers for fidelity/angle, effective dimension,
entropies in bits, mutual information, and convenience functions to assemble Y from reduced
or joint states.

## Install

`ash
pip install quantum-unified
`

## Quick start

`python
import numpy as np
from quantum_unified import (
    bures_angle,
    effective_dimension,
    von_neumann_entropy_bits,
    mutual_information_bits,
    compute_Y,
)

# Two qubit states (example)
rho0 = np.array([[1,0],[0,0]], dtype=complex)
rho1 = np.array([[0.9, 0.1],[0.1, 0.1]], dtype=complex)

A = bures_angle(rho0, rho1)                 # Uhlmann/Bures angle (radians)
De = effective_dimension(rho1)              # 1 / Tr(rho^2)
Y  = compute_Y(rho0, rho1, Ibits=0.5)      # needs mutual information in bits
print(A, De, Y)
`

## API

- ures_angle(rho, sigma) -> float: Bures angle A.
- effective_dimension(rho) -> float: Effective dimension d_eff.
- on_neumann_entropy_bits(rho) -> float: Entropy in bits.
- mutual_information_bits(rhoS, rhoE, rhoSE) -> float: I = S(S)+S(E)-S(SE) in bits.
- compute_Y(rhoS, rhoS_prime, Ibits) -> float: Y from reduced states and Ibits.
- partial_trace_SE(rhoSE, dims, subsystem) / compute_Y_from_SE(...): helpers with joint state.

## Background: the curvature–information invariant

Y couples the Bures geometry of quantum states (via the fidelity angle) to informational change (mutual
information). In isotropic/2‑design regimes, Y concentrates with mean Y0 + O(D^{-1}) and variance Θ(D^{-1}).
This package exposes the building blocks to evaluate Y in your own models and data.

## License

BSD 3‑Clause. See [LICENSE](LICENSE).

## Author

Anthony Olevester (olevester.joram123@gmail.com)
