Quantium is a lightweight Python library for unit-safe scientific and mathematical computation.
It combines a clean, dependency-minimal architecture with a powerful system for dimensional analysis — ensuring that every calculation you perform respects physical consistency.
Beyond correctness, Quantium emphasizes clarity.
Its advanced formatting engine automatically simplifies, normalizes, and beautifully renders units using Unicode superscripts, SI prefixes, and canonical symbols.
-
Dimensional Analysis: Guarantees physical consistency in all calculations.
-
Unit Simplification: Automatically recognizes and simplifies composite units to their standard named forms (e.g.,
kg*m/s**2is displayed asN). -
Beautiful Formatting: Renders all units into a clean, human-readable format using Unicode dots for multiplication and superscripts for exponents (e.g.,
kg*m**2becomeskg·m²). -
SI Prefix Support: Easily convert between base units and their prefixed forms (e.g., a Quantity of
1000 mcan be converted to1 km). -
Extensible: Easily define your own custom units and dimensions.
View the official Quantium documentation for installation guides, tutorials, and the complete API reference.
Quantium can be installed from the Python Package Index (PyPI):
pip install quantium
After installation, verify that Quantium is correctly installed by checking its version:
import quantium
print("Quantium version:", quantium.__version__)To make sure Quantium is ready to use, open a Python shell and run:
>>> from quantium import u
>>> (10 * u.kg) * (5 * u.m) / (2 * u.s**2)
25 NQuantium is built to work seamlessly in modern environments and is compatible with current development tools and workflows.
Quantium currently supports Python 3.10 and above.
Contributions are welcome! If you'd like to fix a bug, add a feature, or improve the documentation, please feel free to open an issue or submit a pull request.
