Skip to main content

BoseQX

Quantum Mathematics for Python

BoseQX is an open-source, Python-native library for expressing, manipulating, visualizing, and learning quantum mathematics.

The project focuses on building quantum computing foundations from the mathematics upward — starting with vectors, inner products, complex numbers, bras and kets, and gradually expanding toward quantum states, operators, gates, circuits, algorithms, and simulation.

Mathematics first. Quantum computing second.


Why BoseQX?

Quantum computing libraries often focus primarily on building and executing circuits.

BoseQX takes a different approach.

The goal is to make the mathematics behind quantum computing explicit, accessible, and programmable.

For example:

$$ |\psi\rangle = \alpha|0\rangle + \beta|1\rangle $$

should not just be something a framework accepts as input. It should be something developers can represent, manipulate, inspect, and understand directly in Python.


🧑‍🔬 Inspiration — Satyendra Nath Bose

BoseQX is inspired by the legacy of Satyendra Nath Bose, the pioneering Indian physicist whose work laid the foundation for Bose–Einstein statistics and whose name lives on in the class of particles known as bosons.

Bose's work demonstrated the power of approaching fundamental physics through deep mathematical insight. His collaboration with Albert Einstein helped establish what became known as Bose–Einstein statistics, a fundamental idea in quantum physics.

The name BoseQX is a tribute to that legacy:

Bose — in honor of Satyendra Nath Bose QX — Quantum eXploration through mathematics and code

BoseQX aims to carry forward the spirit of curiosity, mathematical thinking, and exploration that characterized Bose's contributions to modern physics.


Current Status

Version: 0.1.0 Status: Early development 🚧

The current foundation includes:

  • Mathematical vectors
  • Vector addition and subtraction
  • Scalar multiplication
  • Vector norms and normalization
  • Complex-valued vectors
  • Complex conjugation
  • Inner products
  • Basic Ket and Bra representations

More quantum functionality is being developed incrementally.


Project Vision

BoseQX aims to evolve into a mathematical toolkit covering areas such as:

BoseQX
│
├── Core Mathematics
│   ├── Vectors
│   ├── Matrices
│   ├── Tensors
│   └── Linear Algebra
│
├── Quantum Mathematics
│   ├── Kets
│   ├── Bras
│   ├── Quantum States
│   ├── Density Matrices
│   ├── Observables
│   └── Measurement
│
├── Quantum Operations
│   ├── Quantum Gates
│   ├── Multi-Qubit Operations
│   ├── Operators
│   └── Circuits
│
├── Symbolic Mathematics
│   └── SymPy Integration
│
├── Algorithms
│   └── Quantum Algorithms
│
├── Visualization
│   └── Quantum Mathematics & Circuits
│
└── Backends
    ├── NumPy
    ├── GPU Computing
    └── Future Hardware Backends

Installation

Clone the repository:

git clone https://github.com/DevKumar57-67/BoseQX.git
cd BoseQX

Create a virtual environment:

Windows

python -m venv .venv
.venv\Scripts\activate

Linux / macOS

python3 -m venv .venv
source .venv/bin/activate

Install the project dependencies:

pip install numpy sympy

For development and testing:

pip install pytest

Basic Usage

Vectors

from boseqx import Vector

v = Vector([3, 4])

print(v.norm())

Output:

5.0

Vector Operations

from boseqx import Vector

a = Vector([1, 2, 3])
b = Vector([4, 5, 6])

print(a + b)
print(a - b)
print(2 * a)

Complex Vectors

BoseQX is designed to support complex-valued mathematics required in quantum mechanics.

from boseqx import Vector

v = Vector([1 + 2j, 3 - 4j])

print(v.norm())
print(v.conjugate())

Inner Product

from boseqx import Vector

u = Vector([1 + 1j, 2])
v = Vector([1, 1j])

print(u.inner(v))

The inner product follows:

$$ \langle u|v\rangle

\sum_i u_i^*v_i $$


Quantum Mathematics

BoseQX represents quantum notation directly through Python abstractions.

For example:

from boseqx.quantum import Ket

psi = Ket([1 / 2**0.5, 1 / 2**0.5])

print(psi)
print(psi.bra())

Conceptually:

$$ |\psi\rangle

\frac{1}{\sqrt{2}}|0\rangle + \frac{1}{\sqrt{2}}|1\rangle $$

The long-term objective is to make expressions such as quantum states, operators, measurements, tensor products, and observables natural to work with in Python.


Development Philosophy

BoseQX is being developed incrementally rather than as a large abstraction layer from the beginning.

The development workflow is:

Mathematical Concept
        ↓
Mathematical Definition
        ↓
API Design
        ↓
Implementation
        ↓
User Testing
        ↓
Automated Tests
        ↓
Documentation

This keeps the mathematical model and software design closely connected.


Roadmap

Phase 1 — Mathematical Foundation

  • Vector representation
  • Vector arithmetic
  • Norm
  • Normalization
  • Complex numbers
  • Complex conjugation
  • Inner product
  • Ket
  • Bra

Phase 2 — Quantum States

  • QuantumState
  • Computational basis states
  • State normalization
  • Measurement
  • Probability amplitudes
  • Expectation values

Phase 3 — Quantum Operations

  • Matrix framework
  • Quantum operators
  • Pauli-X, Y, Z
  • Hadamard
  • CNOT
  • Tensor products
  • Multi-qubit states

Phase 4 — Advanced Mathematics

  • Density matrices
  • Partial trace
  • Hermitian operators
  • Eigenvalues and eigenvectors
  • Symbolic quantum mathematics
  • Advanced linear algebra

Phase 5 — Quantum Computing

  • Quantum circuits
  • Quantum algorithms
  • Circuit simulation
  • Visualization
  • Performance optimization
  • Future external/hardware backends

Testing

Run the test suite from the repository root:

python -m pytest

BoseQX aims to maintain mathematical correctness through automated tests as the project grows.


Project Structure

BoseQX/
│
├── boseqx/
│   ├── core/
│   │   ├── vector.py
│   │   ├── matrix.py
│   │   └── tensor.py
│   │
│   ├── quantum/
│   │   ├── ket.py
│   │   ├── bra.py
│   │   ├── state.py
│   │   ├── operator.py
│   │   └── measurement.py
│   │
│   ├── gates/
│   ├── algorithms/
│   ├── symbolic/
│   └── visualization/
│
├── tests/
├── examples/
├── docs/
├── README.md
├── LICENSE
├── pyproject.toml
└── requirements-dev.txt

Contributing

BoseQX is being built as an open-source learning and engineering project.

Contributions are welcome in areas including:

  • Mathematics
  • Quantum computing
  • Python development
  • Testing
  • Documentation
  • Algorithms
  • Performance
  • Visualization
  • Bug fixes and improvements

Before contributing, please check the repository issues and contribution guidelines.


License

BoseQX is released under the MIT License.

See LICENSE for details.


Author

Dev Kumar

B.Tech CSE Student • AI & Cybersecurity Builder • Open Source Learner

GitHub: @DevKumar57-67 Linkedin: @Dev Kumar X handle: [@DevKumar]


⭐ Vision

BoseQX is more than a quantum simulator.

The long-term goal is to build a mathematical ecosystem for quantum computing in Python where the mathematics remains visible, understandable, and programmable.

Understand the mathematics. Express it in code. Build quantum systems from first principles.


🧑‍🔬 In memory of Satyendra Nath Bose

Inspired by the physicist whose mathematical ideas helped shape our understanding of the quantum world.

BoseQX is a small contribution to the continued exploration of the mathematical foundations of quantum science.

A tribute of India's contribution to the world of Quantum Physics

Release files for boseqx 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for boseqx 0.1.0
File Size Uploaded
boseqx-0.1.0.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for boseqx 0.1.0
File Interpreter ABI Platform
boseqx-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.2 kB

Release files / boseqx-0.1.0.tar.gz

Download URL boseqx-0.1.0.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e6e794c4fa822685bcf47e347bde13415f89e3a08d5a253b5a3d5ee0d8c28a8f
BLAKE2b-256 checksum
How to use checksums
ad41f2abeba75bb219db2d6f03609e65a5c9c822e7f1995232c7d3b1076d5e14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / boseqx-0.1.0-py3-none-any.whl

Download URL boseqx-0.1.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2b4cc6baf6ec0b3dd326c8280dfab56d6321e03ad331ba1bfc0ee17a70b9f0c
BLAKE2b-256 checksum
How to use checksums
cd92d4f3f3ff2a878ca0134f2afe7060fb14f704721dec065e74ceed0459c916
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page