What problem does it solve? Scientific code often loses track of physical units, causing silent errors like adding meters to seconds or misreading millivolts as volts. BrainUnit keeps physical meaning attached to every numerical value, catching dimensional mismatches automatically in BrainX brain-dynamics modeling. ## Core Features & Use Cases - Unit-Aware Quantities: Create Quantity objects combining mantissas with SI units, with automatic dimension tracking through arithmetic, conversion via in_unit() and to_decimal(), and predefined neuroscience units like u.mV, u.ms, and u.nA. - JAX Integration and Autodiff: Quantities work with jax.jit and jax.vmap, and u.autograd.grad returns derivatives with correct physical units (e.g., kg·m/s for dEnergy/dv). - Typing and Validation: Annotate functions with u.Quantity["length"] and enforce contracts at runtime using @u.typing.validate_units with optional strict exact-unit checking. - Use Case: When building a neuron model, define membrane voltage in mV, conductance in nS, and time in ms; BrainUnit raises a dimension error if you accidentally add current to voltage, and converts units automatically at external-library boundaries. ## Quick Start Ask the agent to write a BrainX simulation snippet that creates a 20 ms time quantity, converts it to seconds, and computes a unit-aware gradient with brainunit.