quantax.utils.precision_context#

quantax.utils.precision_context(dtype: str | type[Any] | dtype | SupportsDType | None)#

Context manager that sets x64 to match the precision of dtype, also disabling it for single precision so that python scalars inside lax primitives are not promoted to float64. None leaves the x64 setting unchanged.